Skip to Content
The AKIN Travel developer platform is in beta — APIs may change. Get started →
Webhooks

Webhooks

AKIN sends an HTTPS POST to your endpoint when an event happens to one of your bookings or members. Use webhooks to keep your own systems in sync without polling.

Subscribe

Create a subscription in the partner dashboard under Developers → Webhooks. You can also use the GraphQL API with a signed-in partner admin session. A partner API key cannot manage webhooks.

OperationUse
webhookEventTypesLists every event type you can subscribe to. Some of them are not delivered yet (see the last section)
createWebhookSubscriptionTakes partnerId, url, description and events. Returns signingSecret
updateWebhookSubscriptionChanges url, description, events or enabled
rotateWebhookSecretReturns newSigningSecret
testWebhookSubscriptionSends a ping event
webhookDeliveriesLists the delivery attempts of one subscription
retryWebhookDeliverySends a FAILED or CANCELLED delivery one more time

Rules:

  • The URL must use https. It must resolve to a public IP address. AKIN checks this when you save the URL and again before each delivery.
  • AKIN shows the signing secret one time only, when you create the subscription or rotate the secret. Store it in a safe place.
  • testWebhookSubscription sends ping to every enabled subscription of your partner that includes ping in its events. Add ping to the subscription you want to test. The ping data is message and timestamp.

The envelope

Each delivery body is one JSON object:

{ "id": "evt_3f9a1c0d5e7b4a2f8c6d1e0b9a7f5c3d", "type": "booking.checked_in", "timestamp": "2026-11-19T03:12:45.120Z", "data": { "bookingId": "bkg_test_0001", "propertyId": "prop_test_0001", "memberId": "mem_test_0001", "status": "CHECKED_IN", "marketingOptIn": false } }
FieldMeaning
idThe event id. It starts with evt_. It is the same on every retry of the event. Use it to drop duplicates
typeThe event type
timestampWhen AKIN created the event (ISO 8601, UTC). It does not change on a retry
dataThe event payload. The fields are different for each event type

When data has a memberId, AKIN also adds marketingOptIn: the member’s AKIN marketing opt-in (true or false). If AKIN cannot read the member, the field is not there.

Some events have a stable id: AKIN derives the id from the event type and the booking id. AKIN sends a stable-id event to a subscription one time only, even when the PMS reports the same change again. These events are booking.confirmed, booking.no_show, booking.checked_in and booking.checked_out. All other events get a new id each time they occur.

AKIN does not guarantee the order of deliveries.

Request headers

HeaderValue
Content-Typeapplication/json
X-Webhook-IdThe delivery id. One delivery is one event sent to one subscription. It is the same on every retry of that delivery
X-Webhook-TimestampUnix time in seconds when this attempt was signed
X-Webhook-Signaturet=<timestamp>,v1=<signature> (see below)
User-AgentAKIN-Webhooks/1.0

Signing

AKIN signs each attempt with HMAC-SHA256:

  1. The signed content is the timestamp, a full stop, and the raw request body: `${t}.${rawBody}`.
  2. The key is your signing secret, used as a UTF-8 string. Do not hex-decode it.
  3. The signature is the lowercase hex digest.

The header is t=<timestamp>,v1=<signature>. After you rotate the secret, the header has a second v1 value for 24 hours: the first is signed with the new secret, the second with the previous secret. Accept the request if any v1 value matches.

Verify against the raw bytes of the body. Do not parse and re-serialise the JSON before you verify. AKIN does not reject old timestamps for you. We recommend that you refuse a timestamp that is more than 5 minutes from your clock.

import crypto from 'node:crypto'; import express from 'express'; const SECRET = process.env.AKIN_WEBHOOK_SECRET; // the 64-character secret, as is const TOLERANCE_SECONDS = 300; function verifyAkinSignature(rawBody, signatureHeader, secret) { if (typeof signatureHeader !== 'string') return false; let timestamp; const signatures = []; for (const part of signatureHeader.split(',')) { const [key, value] = part.split('='); if (key === 't') timestamp = value; if (key === 'v1') signatures.push(value); } if (!timestamp || signatures.length === 0) return false; const age = Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp)); if (!Number.isFinite(age) || age > TOLERANCE_SECONDS) return false; const expected = Buffer.from( crypto.createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex'), 'hex', ); return signatures.some((sig) => { const given = Buffer.from(sig, 'hex'); return given.length === expected.length && crypto.timingSafeEqual(given, expected); }); } const app = express(); app.post('/akin/webhooks', express.raw({ type: 'application/json' }), (req, res) => { const rawBody = req.body.toString('utf8'); if (!verifyAkinSignature(rawBody, req.get('X-Webhook-Signature'), SECRET)) { return res.status(400).send('bad signature'); } const event = JSON.parse(rawBody); // Drop duplicates on event.id, then queue the work and answer at once res.status(200).end(); });

Retries and failure handling

  • A delivery succeeds when your endpoint returns a 2xx status within 30 seconds. AKIN does not follow redirects, so a 3xx is a failure. A timeout, a network error or any other status is a failure.
  • AKIN makes at most 5 attempts per delivery. After a failed attempt, the next attempt waits 30 seconds, then 2 minutes, then 15 minutes, then 1 hour. The last attempt occurs about 1 hour 18 minutes after the first.
  • After the fifth failed attempt, the delivery is FAILED. AKIN sends an email to the user who created the subscription, or to your partner contact address. AKIN sends at most one such email per subscription in 24 hours.
  • Each failed attempt adds 1 to the subscription’s failure count. A 2xx sets the count to 0. When a delivery becomes FAILED and the count is 100 or more, AKIN disables the subscription.
  • AKIN sends nothing to a disabled subscription. A retry that was queued before the disable becomes CANCELLED. To enable the subscription again, set enabled: true with updateWebhookSubscription. This also sets the failure count to 0.
  • retryWebhookDelivery gives a FAILED or CANCELLED delivery one more attempt.
  • Answer quickly. Do the work after you return 2xx.

Booking events

AKIN sends a booking event to the partner that owns the booking’s property. In every booking event, memberId is null when the booking has no member.

booking.created

Sent when a booking is created with the createBooking mutation. Bookings made in website checkout and bookings imported from your PMS do not send this event.

{ "bookingId": "bkg_test_0001", "propertyId": "prop_test_0001", "memberId": "mem_test_0001", "checkIn": "2026-12-01", "checkOut": "2026-12-04", "status": "PENDING", "totalPrice": 420.5, "currency": "USD", "marketingOptIn": true }

checkIn and checkOut are the dates as the caller sent them. currency is present only when the caller sent one.

booking.updated

Sent when a booking is edited with the updateBooking mutation, for example from the AKIN dashboard. A status-only change and a change from your PMS do not send it.

{ "bookingId": "bkg_test_0001", "propertyId": "prop_test_0001", "memberId": "mem_test_0001", "status": "CONFIRMED", "marketingOptIn": true }

Status events

These events have the same data: bookingId, propertyId, memberId, status (and marketingOptIn).

EventstatusSent whenStable id
booking.confirmedCONFIRMEDThe booking moves to CONFIRMED from another statusYes
booking.cancelledCANCELLEDThe booking is cancelled by the member, by staff or by your PMSNo
booking.no_showNO_SHOWStaff mark a no-show, or your PMS reports one. Both sources give one deliveryYes
booking.checked_inCHECKED_INYour PMS reports the check-in. A staff status change does not send itYes
booking.checked_outCHECKED_OUTYour PMS reports the check-out. A staff status change does not send itYes
{ "bookingId": "bkg_test_0001", "propertyId": "prop_test_0001", "memberId": "mem_test_0001", "status": "CANCELLED", "marketingOptIn": false }

member.enrolled

Sent to a partner when a member joins its program, or joins it again after leaving. AKIN does not send it when the member is already enrolled. The paths are:

  • The member signs up, joins on your white-label site, or creates an account at guest checkout.
  • The member signs in on your site and is not yet enrolled. The payload has viaLogin: true.
  • Your server calls enrollMember with a partner API key (enrollmentSource is SDK).
  • AKIN staff enrol the member (enrollmentSource is DASHBOARD when staff create the member).
  • The member chooses you as their origin partner (enrollmentSource is MANUAL).
{ "memberId": "mem_test_0001", "partnerId": "ptn_test_0001", "enrollmentId": "enr_test_0001", "enrollmentSource": "SIGNUP", "enrolledAt": "2026-11-19T03:12:45.120Z", "marketingOptIn": true }
FieldPresent
memberId, partnerId, enrollmentSource, enrolledAtAlways
enrollmentIdAlways, except when the member chooses their origin partner
viaLoginOnly on the sign-in path. The value is true
marketingOptInWhen AKIN can read the member

enrollmentSource is one of SIGNUP, MANUAL, WHITE_LABEL, SDK, DASHBOARD, URL_PARAM or MIGRATION. On the origin-partner path, enrolledAt is the time the member made the choice.

Member data-rights notices

AKIN sends these notices to the partner the member signed up through and to every partner with an active enrolment. member.erased also goes to partners whose enrolment ended. The payloads carry no name, email or phone. partnerMemberRef is your own key for the member, or null if you did not set one. All times are ISO 8601, UTC.

  • member.closed: the member closed their account. Carries memberId, partnerMemberRef, closedAt and retainUntil. Delete the member data you exported by retainUntil, which is 3 years after closure. Each program the closure ends also sends member.left_program.
  • member.erased: AKIN erased the member’s personal data. Carries memberId, partnerMemberRef and erasedAt.
  • member.rectified: a field you receive was corrected. Carries memberId, partnerMemberRef, changedFields and rectifiedAt. changedFields lists field names only, from firstName, lastName, email, phone and countryCode. Read the corrected record through the API.
  • member.restricted: the member restricted the processing of their data (GDPR Article 18). Carries memberId, partnerMemberRef and restrictedAt. Keep what you hold, but stop processing it. AKIN refuses your reads of the member until the restriction ends.
  • member.restriction_lifted: the restriction ended. Carries memberId, partnerMemberRef and liftedAt. You may process the member’s data again.

Other delivered events

EventSent whendata
member.createdA new member is created for your partner: sign-up, guest checkout, enrollMember, or staffmemberId. Also email, firstName and lastName when the member has an active enrolment with you, opted in to your marketing, and has no processing restriction or objection
member.updatedThe member’s profile is updated. Sent to the origin partner and every active enrolmentSame rules as member.created
member.left_programThe member leaves your program, or closes their accountmemberId, partnerId, enrollmentId, leftAt
member.tier_upgradedAKIN staff assign a higher tier. Sent to the member’s origin partner. Tier changes earned by stays do not send itmemberId, oldTier, newTier, reason
member.tier_downgradedAKIN staff assign a lower tier. Same rules as abovememberId, oldTier, newTier, reason
perk.fulfilledStaff mark a booking perk as fulfilledfulfillmentId, bookingId, propertyId, memberId, perkText
perk.status_updatedStaff change a booking perk’s statusfulfillmentId, bookingId, memberId, perkText, oldStatus, newStatus
loyalty.reward_claimedYour server records a redemption with redeemRewardmemberId, rewardId, rewardName, rewardInstanceId, propertyId, source (PARTNER_API)
loyalty.points_reversedYour PMS reports a refund or void after check-out, and AKIN reverses pointsbookingId, memberId, pointsReversed, ledgerNet, kind (REFUND or VOID)
referral.completedStaff move a referred member’s first stay to checked out or completedbookingId, memberId, referrerMemberId, pointsAwarded
pingYou call testWebhookSubscriptionmessage, timestamp

Each event with a memberId also carries marketingOptIn, as described in the envelope section.

Not yet delivered

webhookEventTypes lists this event, and you can subscribe to it, but AKIN does not send it yet:

  • referral.created

The registry has no event for points earned or points spent. Read them through the GraphQL API

Last updated on