POST/v1/merchant/webhooksAPI Key required
Register a webhook endpoint to receive real-time event notifications for your account.
When to use this
Polling Get Transaction for every open payment doesn’t scale. Register a webhook once and Kawrie pushes an event to your server the moment a collection settles, a payout completes, or a KYC review resolves, usually within a second or two of it happening. Save the signing_secret from the response immediately since it’s shown exactly once; see the Webhooks Guide for how to verify incoming payloads with it.
- Marking an order as paid the instant collection.completed fires, instead of polling
- Triggering fulfillment or shipping workflows on payment confirmation
- Alerting your ops team when a payout fails so they can retry manually
Request headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer your_api_key |
| Content-Type | string | Required | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Required | HTTPS endpoint that will receive event payloads |
| events | array | Required | Event names to subscribe to, e.g. collection.completed |
Request example
curl -X POST https://api.kawrie.com/v1/merchant/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/kawrie",
"events": ["collection.completed", "collection.failed"]
}'Response200 OK
{
"success": true,
"data": {
"id": "wh_4k2j9d1a",
"url": "https://example.com/webhooks/kawrie",
"events": ["collection.completed", "collection.failed"],
"signing_secret": "whsec_8f2a1c9b7e6d5f4a3b2c1d0e9f8a7b6c",
"created_at": "2026-06-28T10:30:00.000Z"
}
}Error responses
| Code | Status | Description |
|---|---|---|
| INVALID_URL | 400 | The webhook URL must be a valid HTTPS endpoint |
| INVALID_EVENT | 400 | One or more event names are not recognized |
| INVALID_API_KEY | 401 | API key is invalid or missing |