Skip to navigation

Build a P2P flow with Sinbad

The Sinbad Partner API lets your product offer peer-to-peer trades between local currency and USDT without building matching, escrow tracking or settlement. Your server authenticates with a partner secret and creates a short-lived session for each customer. That session is the only credential your customer app ever holds.

What you can build

  • Customer sessions. Your server asserts an authenticated customer’s identity, wallet and chain.
  • Payment accounts. Collect the fiat account details a trade needs, using fields from Sinbad’s live catalog.
  • Offers. Find a matching offer and show the customer a priced breakdown, with fees and a signing deadline.
  • Escrow. Prepare approvals and escrow transactions, submit them signed, and follow confirmation.
  • Settlement. Mark payment, upload proof, chat with the merchant, release escrow or open a dispute.
  • Webhooks. Receive signed trade and message notifications and keep your records in step.

How an integration works

  1. Your server verifies the customer with your own login and customer verification (KYC).
  2. Your server calls POST /v1/sessions with your partner secret and the customer’s stable ID.
  3. Your app receives the session token, which is valid for 24 hours.
  4. Your app loads the customer’s profile and reference data, and saves their payment account.
  5. The customer picks an offer and reviews a priced breakdown.
  6. The customer’s registered wallet signs any token approval and the escrow transaction. Sinbad tracks the transaction until funding is confirmed.
  7. The fiat payer sends the payment outside Sinbad. The crypto seller checks that it arrived and releases the escrow.

Keep partner secrets (sk_…) on your server. Give the customer app only the session token. A partner secret has full access to your partner’s data, and there are no permission scopes.

Before you start

Sinbad provisions your partner account, your integration and your server credential. The integration records your exact browser origins, the chains your customers can use, and whether Sinbad trusts your email and phone verification. Its publishable key (pk_…) identifies the integration but cannot authenticate a request.

Trading also needs an enabled escrow and a fee schedule for your partner. Sinbad relies on your own customer verification: there is no separate screening API, and the session’s kycStatus is always null.

The examples in these docs use the staging environment on Polygon Amoy (chain 80002). Sinbad provides the production base URL, network and contract addresses during onboarding. See Go-live checklist.

Find the right guide

Quick reference

ItemValue
Staging base URLhttps://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1
Server credentialAuthorization: Bearer sk_…, from your server only
Customer credentialAuthorization: Bearer <sessionToken>, valid for 24 hours
Publishable keypk_…. It identifies the integration and cannot authenticate.
Staging chainPolygon Amoy, chain ID 80002
Webhook signaturesHMAC-SHA256 over the timestamp and raw body, with a 5-minute tolerance