POST the moment a booking is confirmed or fails.
The one-line version:
Prerequisites
- A Jinko account and an API key (
jnk_...). Get one. - An HTTPS endpoint that can receive a
POST(must behttps://and publicly reachable).
1) Register an endpoint
- Dashboard
- API
Go to Dashboard → Webhooks, click Add webhook, paste your URL, pick the events, and Create. Copy the signing secret shown once — you’ll need it to verify deliveries.
2) Events
| Event | When it fires |
|---|---|
booking.completed | The booking is fulfilled and paid (payment captured). |
booking.failed | The booking could not be fulfilled. |
event field as an open enum and ignore events you don’t handle.
3) Payload
Deliveries are intentionally thin — identifiers only, no traveler PII. Fetch full detail withget_booking using the booking_ref.
| Header | Purpose |
|---|---|
X-Jinko-Signature | sha256=<hex> HMAC of the request (see below). |
X-Jinko-Timestamp | Unix seconds; part of the signed payload (replay protection). |
X-Jinko-Event-Id | Stable id for the business event — use it to dedupe. |
X-Jinko-Delivery-Id | Id of this specific delivery attempt. |
4) Verify the signature
ComputeHMAC-SHA256(secret, "<X-Jinko-Timestamp>.<raw request body>") and compare it, in constant time, to the hex in X-Jinko-Signature (after the sha256= prefix). Use the raw request body — parsing and re-serializing the JSON will change the bytes and break the check.
- Node.js
- Python
X-Jinko-Timestamp is older than your tolerance (e.g. 5 minutes) to guard against replays. Respond 2xx once you’ve accepted the event.
5) Retries & idempotency
- A non-
2xxresponse (or a timeout) is retried with exponential backoff — up to 8 attempts over several hours. - Retries mean you may receive the same event more than once. Deduplicate on
X-Jinko-Event-Id(a given business event always carries the same id). - Return
2xxas soon as you’ve durably recorded the event; do slow work asynchronously so you don’t trip the delivery timeout.
6) Test it
Use Send test in the dashboard, or:"livemode": false and booking_ref: "JNK-TEST00", so you can confirm your signature handling end-to-end without a real booking.