Skip to navigation

Integration overview

An integration has two halves. Your server holds the partner secret and handles anything that affects a customer’s identity or your partner configuration. Your customer app holds only the session token and handles the trade itself.

Who calls what

StageRuns onCredentialMain calls
Authenticate the customerYour serverPartner secretPOST /v1/sessions
Prepare the customer’s accountYour appSession tokenGET /v1/me, POST /v1/me/payment-methods
Find an offer and fund the tradeYour appSession tokenPOST /v1/offers/best, POST /v1/trade-breakdowns, POST /v1/transactions
Settle the tradeYour appSession tokenPOST /v1/trades/{tradeId}/actions/{action}/execution, POST /v1/trades/{tradeId}/messages, POST /v1/trades/{tradeId}/proof
Keep your records currentYour serverPartner secretGET /v1/trades, POST /v1/webhooks

1. Authenticate the customer on your server

Use your existing login. Associate your own stable user ID with partnerUserId on every session request. Never use an identifier that can change, such as an email address.

2. Prepare the customer’s account

Your app uses the session token to read the customer’s profile and to save a payment account from the catalog’s required fields. See Profile and preferences and Saved payment accounts.

3. Offer a BUY or SELL journey

Your app reads the exact terms, shows them to the customer, and asks the customer’s wallet to sign the calls Sinbad prepares. The customer’s wallet signs and sends every transaction. See the Buy walkthrough and Sell walkthrough.

4. Keep your view current

Refresh trade history from your app, and use signed webhooks for server-side reconciliation. See Trades and history and Webhooks.