Step 1: Set up
Create an account and API key at Getting Started.Step 2: Authenticate API Requests
Use theX-CC-Api-Key
header to authenticate requests with your API key.
Example:
401 errorsIf authentication fails, a JSON object with an error message is returned with HTTP status
401
.Step 3: Create a Charge
To start accepting payments, create a charge. You can navigate to the charge by pasting thehosted_url
into your browser
Example:
Step 4: Retrieve a Charge
Retrieve the charge to get payment information. Theid
field in the response is the CHARGE_UUID
.
Example:
Step 5: Add a ‘Pay with Crypto’ Button
You can add a payment button to your website using a payment link or programmatically. See Adding a ‘Pay with Crypto’ Payment Button.Step 6: Set Up Webhooks
Subscribe to webhooks for real-time updates on charges. Learn more about webhooks at Commerce API Webhooks Overview.Conclusion
You are now ready to accept cryptocurrency payments with Coinbase Commerce. For more detailed information, refer to our API reference and the rest of the Coinbase Commerce API documentation.See Also: