Skip to main content
Onramp and offramp webhooks provide your app with real-time transaction status updates. Subscribe your endpoint to receive a notification every time a transaction made by your users is created or updated.

Setup

Prerequisites

Sign up at portal.cdp.coinbase.com, then navigate to API Keys and select Create API key under the Secret API Keys tab.
  1. Enter an API key nickname (restrictions are optional)
  2. Click Create
  3. Secure your API Key ID and Secret in a safe location
You’ll need an HTTPS URL to receive webhook events. For quick testing, webhook.site gives free temporary URLs instantly.For production, use your own HTTPS endpoint.
The CDP CLI handles authentication and exposes webhook subscription endpoints as typed commands (cdp data webhooks subscriptions create, list, update, delete). For raw HTTP, use cdp api.

Create a webhook subscription

  1. Review the configuration you’ll submit:
Important configuration notes:
  • target.url should be your webhook endpoint that will receive the events
  • You can also set a headers object in target if your url requires specific headers. Pass it inline with 'target.headers:={"custom-header":"value"}'.
  • All Onramp event types should be included to ensure you receive notifications for every Onramp transaction state change:
Offramp transactions are also supported:
  1. Create the webhook subscription with the CDP CLI:
Sample webhook subscription response:

Manage subscriptions

Use the subscriptionId from the response to view, update, or delete the subscription. List all subscriptions
View specified subscription details by subscription ID
Update subscription update is a full replace — pass every field, including ones you aren’t changing:
Delete subscription

Webhook signature verification

Use the standard CDP webhook verification flow — the same code works for all webhook event domains. See Verify signatures for the full step-by-step implementation.

Next steps

Once your subscription is created, your endpoint will begin receiving webhook events for transactions!

Sample transaction event payloads

Best practices

To ensure reliable webhook delivery:
  • Test endpoints locally before enabling subscriptions in production
  • Handle concurrent requests - ensure your target URL can process multiple events simultaneously
  • Process events asynchronously - return a 200 response quickly and process the event in the background
  • Monitor webhook receiver health - track delivery success rates to your target URL
  • Set up subscription monitoring - use a scheduled job (e.g., cron, systemd timer) to periodically call the List Subscriptions API and verify critical subscriptions have isEnabled: true
Subscriptions may be automatically disabled if your endpoint experiences sustained delivery failures (e.g., high failure rates, endpoint unavailability, or throughput issues). If this happens, fix the underlying endpoint issue and use the Update Subscription API to re-enable.