Prerequisites
You will need:- Your CDP API Key ID and secret
- A webhook notification HTTPS URL
- (Recommended) Install cdpcurl
1. Prepare payload
Define which transfer events to receive and where webhooks should be delivered.target.urlshould be your webhook endpoint that will receive the events- You can also set a
headersobject intargetif your url requires specific headers:
- All Transfer event types should be included to ensure you receive notifications for every transfer state change:
| Event type | Description |
|---|---|
payments.transfers.quoted | Transfer has been quoted with fee breakdown |
payments.transfers.processing | Transfer is being executed |
payments.transfers.completed | Transfer completed successfully |
payments.transfers.failed | Transfer failed |
2. Subscribe
Send the payload to create the subscription, then store the returnedsubscriptionId and secret.
Manage subscriptions
Once you’ve created the webhook subscription, you can use thesubscriptionId from the response to view, update, or delete the subscription.
List all subscriptions