Skip to main content
Authorization places a hold on the buyer’s funds. Once authorized, you can capture (collect) the funds. Only one authorization is allowed per session. Payment Acceptance supports three authorization methods. All are asynchronous — the authorization is returned in 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.
You can provide up to 5 addresses (comma-separated) and optionally filter by 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):
The response contains one or more options, each with payloads the buyer must process:
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. The type 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:
The authorization is returned in 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.
If 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 the PAYMENT-SIGNATURE header. Designed for machine-to-machine payments and API monetization.

402 Payment Required

If the PAYMENT-SIGNATURE header is missing or invalid, the API returns 402 Payment Required with a PAYMENT-REQUIRED header describing accepted payment parameters:
The PAYMENT-REQUIRED header is base64-encoded and contains accepted networks, assets, amounts, and payment addresses.

Successful x402 authorization

On success, the response includes a PAYMENT-RESPONSE header and a message field:

Authorization outcomes

Success

When authorization succeeds:
  • Session status moves to authorization_succeeded
  • balances.capturable equals the authorized amount
  • source is set on the session (buyer’s wallet address or Coinbase account)
  • If autoCapture is enabled, a capture is automatically created

Failure

When authorization fails:
  • Session status moves to authorization_failed
  • The error object on the authorization contains a code and message
  • Authorization endpoints require the session to be in created status, so this session can’t be re-authorized — create a new payment session before retrying
Common failure reasons:

Idempotency

All authorization endpoints accept an X-Idempotency-Key header. Use a UUID v4 to safely retry requests:
Duplicate requests with the same key return identical responses.

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