Copy this prompt
Paste this into your agent together with your task. It is written to prevent the most common integration mistakes.Copy-paste prompt
Machine-readable resources
Connect the docs as an MCP server
Agents that support remote HTTP MCP servers can read this documentation directly through tools instead of scraping pages:Example MCP config
Ground truth
Keep these facts in context; they override anything the agent inferred from another source.Minimal happy path
1
Create the payment (server-side)
id against your order. Never expose the API key to the browser.2
Send the customer to checkout
Redirect to
checkout_url. Tribridge handles chain selection, the one-time deposit address, amount display, and on-chain confirmation.3
Track status
status, chain, wallet_address, tx_hash, expires_at. Terminal states are completed, expired, and cancelled.4
Complete a test payment
completed and fires your test webhooks, so you can validate fulfillment without a chain transaction.5
Trust webhooks, not the redirect
Verify
X-Tribridge-Signature (HMAC-SHA256 over the raw body with your endpoint secret) and make the handler idempotent. Events: payment.confirmed, payment.swept, payment.completed, payment.expired, payment.underpaid, payment.overpaid.Implementation checklist
- Payment creation runs on the server with
x-api-keyfrom an environment variable. - The app redirects to
checkout_urland never derives its own deposit address. - Status is driven by
GET /payments/checkout/{id}and by webhooks, not by the customer’s browser. - Webhook signatures are verified against the raw body before parsing.
- Webhook handling is idempotent (dedupe on
payment_id+event). - Test mode is exercised end to end with
/simulatebefore switching totri_live_.... - API keys and webhook secrets are never committed or shipped to the client.
What not to do
- Do not use dashboard, admin, auth/OTP, payout, wallet, or webhook-management endpoints - they are dashboard-only and not part of the public API.
- Do not treat the redirect to
redirect_urlas proof of payment. Onlypayment.completed(after signature verification) means funds are settled. - Do not assume a fixed amount in native units - read the amount from the checkout session or webhook payload.
- Do not assume exactly-once webhook delivery; retries can repeat an event.
- Do not guess response fields. Everything is documented in the API Reference and the OpenAPI file.

