curl -X POST https://api.zbdpay.com/api/v1/webhooks/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"]
}'
{
"success": true,
"message": "Subscription created.",
"data": {
"subscription_id": "sub_51a2",
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"],
"project_id": null,
"status": "active"
},
"error": null
}
Webhooks
Create a Webhook
Subscribe a URL on your server to webhook events.
POST
/
api
/
v1
/
webhooks
/
subscriptions
curl -X POST https://api.zbdpay.com/api/v1/webhooks/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"]
}'
{
"success": true,
"message": "Subscription created.",
"data": {
"subscription_id": "sub_51a2",
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"],
"project_id": null,
"status": "active"
},
"error": null
}
Registers a URL to receive events. Filter by event type and project, or leave the filters out to receive everything. See Webhook Events for the events and how to verify them.
Configuration
Header Parameters
string
required
Your ZBD API key.
string
Content Type
Body Parameters
string
required
An HTTPS URL on your server.
string[]
The event types to send. Leave it out to receive every event.
string
Only send events for this project.
curl -X POST https://api.zbdpay.com/api/v1/webhooks/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"]
}'
{
"success": true,
"message": "Subscription created.",
"data": {
"subscription_id": "sub_51a2",
"url": "https://your-server.com/zbd/webhooks",
"events": ["PAYMENTS.V1.PAYOUT.FAILED", "PAYMENTS.V1.PAYOUT.RETURNED"],
"project_id": null,
"status": "active"
},
"error": null
}
Was this page helpful?