Skip to main content
Server-side only. These functions send your secret key and throw if window exists. Create the session on your server and hand the browser the returned id or url.

Create a session

createDeposit and createWithdrawal take the same request shape.

Request fields

Beyond chain / token / recipient, the create call accepts: For a session that offers the payer more than one destination, see multi-destination deposits (destinations / destinationRecipients) — those replace the top-level chain / token / recipient.
For a checkout, recipient must be on your payout allowlist. An un-allowlisted recipient is refused with 403 RECIPIENT_NOT_ALLOWLISTED — add it in the partner portal first. Deposits and withdrawals are not allowlist-checked this way (a deposit lands in the payer’s own wallet).

Idempotency

Creation is idempotent on orderId. Replaying the same orderId while a session is still open returns the existing session rather than opening a second one:
So a retry after a network timeout is safe — it cannot double-charge. Use your own order identifier and this property comes for free.

Reading a session

Prefer a webhook over polling. The webhook fires as soon as funds land; polling adds latency and load for the same answer. Read the session to confirm what a webhook told you, not to discover it.

Sandbox

Pass an sk_test_… key. Nothing else changes — same functions, same host, same payloads, testnets only. See Environments.

Options