> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getsinbad.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getsinbad.com/_mcp/server.

# Build a P2P flow with Sinbad

> Your server creates a customer session. Your app uses it to find an offer, sign an escrow transaction and complete the trade.

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.

#### [Quick start](/getting-started)

Create a session, save an account and start a trade.

#### [Concepts](/concepts)

Partner, integration, credential, user and session.

#### [API reference](/api-reference)

Every endpoint, trade action and webhook event.

## 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`](https://docs.getsinbad.com/api-reference/sessions/create-customer-session) 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.

> **Warning**
>
> 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](/go-live).

## Find the right guide

#### [Buy walkthrough](/buy-walkthrough)

A customer buys USDT, from offer to release.

#### [Sell walkthrough](/sell-walkthrough)

A customer sells USDT, from offer to release.

#### [Offers and breakdowns](/offers-quotes)

Choose an offer and review the exact terms.

#### [Sign and track transactions](/transactions)

Approvals, wallet signing and recovery.

#### [Trade lifecycle](/trades)

Statuses, and who can act in each.

#### [Webhooks](/webhooks)

Register, verify and operate an endpoint.

## Quick reference

| Item                | Value                                                                  |
| ------------------- | ---------------------------------------------------------------------- |
| Staging base URL    | `https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1`     |
| Server credential   | `Authorization: Bearer sk_…`, from your server only                    |
| Customer credential | `Authorization: Bearer <sessionToken>`, valid for 24 hours             |
| Publishable key     | `pk_…`. It identifies the integration and cannot authenticate.         |
| Staging chain       | Polygon Amoy, chain ID `80002`                                         |
| Webhook signatures  | HMAC-SHA256 over the timestamp and raw body, with a 5-minute tolerance |