Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/coinbase-api/llms.txt
Use this file to discover all available pages before exploring further.
CBCommerceClient is the REST client for the Coinbase Commerce API. It enables merchants to accept cryptocurrency payments by creating on-demand payment charges, setting up reusable hosted checkout pages, and querying webhook delivery events. All endpoints require an API key.
Installation & Setup
Commerce API keys are generated in the Coinbase Commerce merchant dashboard — they are separate from CDP API keys used by other Coinbase clients. The base URL is
https://api.commerce.coinbase.com.All Methods
| Method | Auth | HTTP | Endpoint |
|---|---|---|---|
createCharge() | 🔒 | POST | /charges |
getAllCharges() | 🔒 | GET | /charges |
getCharge() | 🔒 | GET | /charges/{charge_code_or_charge_id} |
createCheckout() | 🔒 | POST | /checkouts |
getAllCheckouts() | 🔒 | GET | /checkouts |
getCheckout() | 🔒 | GET | /checkouts/{checkout_id} |
listEvents() | 🔒 | GET | /events |
showEvent() | 🔒 | GET | /events/{event_id} |
Charges
A charge represents a single payment request for a specific amount. When a customer pays a charge, Coinbase Commerce monitors the blockchain and updates its status.createCharge(params)
Creates a new charge. The customer is directed to a hosted payment page where they can pay with any supported cryptocurrency.
The price of the charge in fiat. Contains
amount (string) and currency (ISO 4217 code)."fixed_price" to charge a specific fiat amount, or "no_price" for open-ended donations.BCP 47 locale for the hosted payment page (e.g.
"en-US").URL to redirect the customer to if they cancel the payment.
URL to redirect the customer to after a successful payment.
Associate this charge with an existing checkout.
Custom key-value pairs (max 2 fields:
custom_field and custom_field_two) for your own reference.getAllCharges()
Returns all charges associated with the authenticated merchant account. Results are paginated.
getCharge(params)
Retrieves a specific charge by its short code (e.g. "ABCD1234") or full UUID.
The charge’s short code or UUID.
Checkouts
A checkout is a reusable payment page template. Create one checkout and generate multiple charges from it, or share the checkout URL for repeated payments (e.g. a recurring tip jar).createCheckout(params)
Creates a reusable hosted checkout page.
The price to charge. Contains
amount (string) and currency (ISO 4217 code)."fixed_price" or "no_price".BCP 47 locale for the checkout page.
Additional information to collect from the buyer. Supported values:
"email", "name".Custom key-value metadata (
custom_field, custom_field_two).getAllCheckouts()
Returns all checkouts for the authenticated merchant.
getCheckout(params)
Retrieves a specific checkout session by its UUID.
Checkout UUID.
Events
Events are created by Coinbase Commerce whenever the status of a charge or checkout changes. They are delivered via webhooks and can also be queried via the API.listEvents(headers)
Returns a paginated list of all events for the merchant. Requires the X-CC-Version header to specify the API version.
The API version date, e.g.
"2018-03-22".showEvent(params, headers)
Retrieves the full details of a specific event by its UUID. Useful for re-processing a webhook payload.
Event UUID (typically received in a webhook body).
The API version date.
Webhook Event Types
Coinbase Commerce sends webhook notifications for the following event types:| Event Type | Description |
|---|---|
charge:created | A new charge has been created. |
charge:confirmed | Sufficient payment received and confirmed on-chain. |
charge:failed | Payment expired or was otherwise unsuccessful. |
charge:delayed | Payment received after the charge expired. |
charge:pending | An on-chain transaction has been detected but is not yet confirmed. |
charge:resolved | A previously unresolved charge has been manually resolved. |
Always verify webhook signatures using the webhook secret from your Commerce dashboard. The
X-CC-Webhook-Signature header on inbound webhooks contains the HMAC-SHA256 signature.