Prerequisites
You will need:- Your CDP API Key ID and secret
- A webhook notification HTTPS URL
- Install the CDP CLI and run
cdp env live --key-file ./cdp_api_key.jsononce to configure credentials.
1. Review the configuration
Define which transfer events to receive and where webhooks should be delivered. Important configuration notes:-
target.urlshould be your webhook endpoint that will receive the events -
You can also set a
headersobject intargetif your url requires specific headers. Pass it inline with'target.headers:={"custom-header":"value"}'. - 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
Create the subscription with the CDP CLI and store the returnedsubscriptionId and secret.
Manage subscriptions
Use thesubscriptionId from the response to view, update, or delete the subscription.
List all subscriptions
update is a full replace — pass every field, including ones you aren’t changing: