Webhooks API
When building Daimo Pay integrations, you may want your application to receive events related to your payment links as soon as they occur on-chain.
With webhooks, our server can send you notifications when payment status updates occur in real-time.
Before you can make requests to the Daimo Pay API, you will need an API key. Contact us to get one.
Create a Webhook
Create a new webhook listener and receive real-time notifications when payment status updates occur.
Parameters
- Name
url
*- Type
- string
- Description
The webhook listener URL.
curl --request POST 'https://pay.daimo.com/api/webhook' \
--header 'Idempotency-Key: <A unique idempotency key>' \
--header 'Api-Key: <Your API key>' \
--data-raw '{
"url": "<Your webhook listener URL>"
}'
Response
- Name
id
- Type
- string
- Description
Webhook ID, useful to fetch or delete the webhook in future.
- Name
url
- Type
- string
- Description
The webhook listener URL you provided.
- Name
token
- Type
- string
- Description
The secret token you should use to verify webhook requests. See verifying webhook requests for more information.
{
"id": "<Webhook ID>",
"url": "<Your webhook listener URL>",
"token": "<Secret token to verify requests>"
}
Retrieve a Webhook
Retrieve the details of a previously created webhook by its ID.
Parameters
Include the webhook ID you want to retrieve in the URL path.
curl --request GET 'https://pay.daimo.com/api/webhook/{id}' \
--header 'Api-Key: <Your API key>'
Response
- Name
id
- Type
- string
- Description
Webhook ID, useful to fetch or delete the webhook in future.
- Name
url
- Type
- string
- Description
The webhook listener URL you provided.
- Name
token
- Type
- string
- Description
The secret token you should use to verify webhook requests. See verifying webhook requests for more information.
{
"id": "<Webhook ID>",
"url": "<Your webhook listener URL>",
"token": "<Secret token to verify requests>"
}
Delete a Webhook
Delete a previously created webhook by its ID.
Parameters
Include the webhook ID you want to delete in the URL path.
curl --request DELETE 'https://pay.daimo.com/api/webhook/{id}' \
--header 'Idempotency-Key: <A unique idempotency key>' \
--header 'Api-Key: <Your API key>'
Response
- Name
status
- Type
- string
- Description
Status of the webhook deletion request.
{
"status": "success"
}
Send a Test Webhook Event
Trigger a test event to verify your webhook endpoint is correctly configured and receiving events. The endpoint will receive a simulated payment event with mock data.
Parameters
- Name
webhookId
*- Type
- string
- Description
The webhook ID you want to test.
- Name
eventType
*- Type
- string
- Description
The event type you want to test, one of:
payment_started
,payment_completed
,payment_bounced
.
curl --request POST 'https://pay.daimo.com/api/webhook/test' \
--header 'Api-Key: <Your API key>' \
--data-raw '{
"webhookId": "<Webhook ID>",
"eventType": "<Event type>"
}'
Response
- Name
status
- Type
- string
- Description
Status of whether the webhook event was created successfully.
{
"status": "success"
}