curl --request POST \
--url https://api.cashful.africa/api/canary/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
]
}
'{
"id": "webhook_001",
"merchantId": "merchant_456",
"url": "https://example.com/webhooks",
"events": [
"checkout.session.completed",
"purchase.succeeded",
"transfer.completed"
],
"active": true,
"metadata": {
"environment": "production"
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"deletedAt": null
}Registers a URL to receive real-time events
curl --request POST \
--url https://api.cashful.africa/api/canary/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
]
}
'{
"id": "webhook_001",
"merchantId": "merchant_456",
"url": "https://example.com/webhooks",
"events": [
"checkout.session.completed",
"purchase.succeeded",
"transfer.completed"
],
"active": true,
"metadata": {
"environment": "production"
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"deletedAt": null
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Webhook endpoint details
The URL where webhook events will be sent
Array of event types to listen for
The ID of the merchant whose balance is being requested. If omitted, defaults to the authenticated merchant.
Optional custom metadata
{ "environment": "production" }Webhook endpoint created successfully
Unique identifier for the webhook endpoint
The merchant ID this webhook belongs to
The URL where webhook events are sent
Array of event types subscribed to
Whether the webhook endpoint is active
When the webhook endpoint was created
When the webhook endpoint was last updated
Custom metadata attached to the webhook endpoint
{ "environment": "production" }When the webhook endpoint was deleted (soft delete)