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"
}