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 four 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, and Rabby, as well as Solana wallets such as Phantom and Solflare. The session target stays a CDP account or a Base address.

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, choosing the address with the highest stablecoin balance. That includes a Solana address when it is the best funded. Pass network only when you want to restrict the choice. Addresses that aren’t chosen are omitted from the response, for example because they have insufficient funds. The Solana network name is solana in every environment, including sandbox.

EVM wallet

Add network=solana only when the payment must come from Solana.
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:

Solana signatures

data.transaction is the unsigned transaction, base64-encoded. Coinbase broadcasts it. Submit the signature string, not the signed transaction:
  1. Base64-decode data.transaction.
  2. Pass the bytes to Wallet Standard signTransaction.
  3. From the signed transaction, take the customer’s 64-byte ed25519 signature. On a wallet payment that address is data.signerAddress. On a mandate approval it is the customer’s Solana address.
  4. Base58-encode that signature and submit it as signature.
A Solana transaction ID is not a valid signature. Submitting the signed transaction bytes or a transaction ID returns invalid_signature.

Step 2: Submit signed payloads

After the buyer signs, submit the signed payloads with the selected option ID.

EVM wallet

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:

Mandate authorization

A mandate is a customer’s one-time approval for you to pull payments from their wallet later, within spending limits you set. Authorizing with a mandate needs no fresh signature, so the customer doesn’t need to be present. Use it for subscriptions, usage-based billing, and auto top-ups. Unlike the other methods, you always call this endpoint yourself, authenticated with your API key:
The mandate must be approved and the amount must fit within its spending limits. See Recurring Payments to create a mandate, get the customer’s approval, and handle mandate errors.

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

Recurring Payments

Create mandates and authorize payments on your schedule

API Reference - Wallet Auth

Wallet authorization API

API Reference - Coinbase Auth

Coinbase authorization API