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

FieldTypeRequiredDescription
AuthorizationstringRequiredBearer your_api_key
Content-TypestringRequiredapplication/json

Request body

FieldTypeRequiredDescription
urlstringRequiredHTTPS endpoint that will receive event payloads
eventsarrayRequiredEvent 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

response.json
{
  "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

CodeStatusDescription
INVALID_URL400The webhook URL must be a valid HTTPS endpoint
INVALID_EVENT400One or more event names are not recognized
INVALID_API_KEY401API key is invalid or missing