pending status and transitions to succeeded or failed.
You only need these APIs if you’re building the checkout yourself. If you use Coinbase’s hosted payment page or redirect flow, Coinbase handles the entire authorization flow (wallet connection, option resolution, signing, and submission) — you don’t need to implement anything on this page. Call these endpoints directly only when you’re embedding the checkout in your own UI or building an agentic (machine-to-machine) integration.
Wallet authorization
The buyer connects a self-custody wallet and signs cryptographic payloads to authorize the payment. Supports 500+ EVM-compatible wallets including MetaMask, Trust Wallet, Base Pay, Rabby, and more.How it works
When Coinbase’s hosted page drives this flow, it passes every address the connected wallet controls, and Coinbase resolves the best funding option per asset across them.
Step 1: Get wallet authorization options
Pass one or more buyer wallet addresses to get available payment options. Each option specifies the network, asset, amount, and payloads the buyer must sign.network or asset. Coinbase returns at most one option per asset, selected across all supplied addresses — addresses that aren’t chosen are omitted from the response (for example, because they have insufficient funds or a better-funded address was selected instead):
This is a stateless read — the session is not modified. If a requested address has no eligible options, it is simply absent from the response.
Payload types
Each option includes payloads the buyer must sign or submit. Thetype field tells you how to handle the data:
Step 2: Submit signed payloads
After the buyer signs, submit the signed payloads with the selected option ID:pending status. Subscribe to webhooks to know when it transitions to succeeded or failed.
Coinbase authorization
The buyer authorizes the payment using their Coinbase account via OAuth. This flow is for enterprise partners with Coinbase OAuth integration (e.g., Pay with Coinbase).This endpoint requires OAuth authentication (the buyer’s Coinbase bearer token), not API key authentication. It cannot be called with
cdp api, which authenticates with your CDP API key. The buyer must have previously connected their Coinbase account via OAuth.autoCapture is enabled on the session, a capture is automatically created after authorization succeeds.
x402 authorization
x402 is an HTTP-native payment protocol. The buyer submits a base64-encoded payment payload in thePAYMENT-SIGNATURE header. Designed for machine-to-machine payments and API monetization.
402 Payment Required
If thePAYMENT-SIGNATURE header is missing or invalid, the API returns 402 Payment Required with a PAYMENT-REQUIRED header describing accepted payment parameters:
PAYMENT-REQUIRED header is base64-encoded and contains accepted networks, assets, amounts, and payment addresses.
Successful x402 authorization
On success, the response includes aPAYMENT-RESPONSE header and a message field:
Authorization outcomes
Success
When authorization succeeds:- Session status moves to
authorization_succeeded balances.capturableequals the authorized amountsourceis set on the session (buyer’s wallet address or Coinbase account)- If
autoCaptureis enabled, a capture is automatically created
Failure
When authorization fails:- Session status moves to
authorization_failed - The
errorobject on the authorization contains acodeandmessage - Authorization endpoints require the session to be in
createdstatus, so this session can’t be re-authorized — create a new payment session before retrying
Idempotency
All authorization endpoints accept anX-Idempotency-Key header. Use a UUID v4 to safely retry requests:
Related
Payment Sessions
Session lifecycle, expiries, and balances
Webhooks
Get notified when authorization succeeds or fails
API Reference - Wallet Auth
Wallet authorization API
API Reference - Coinbase Auth
Coinbase authorization API