1. Webhooks
Bardge API (V3)
  • Introduction
  • Authentication
  • Errors
  • Idempotent Requests
  • Pagination
  • Passes
    • Introduction
    • Get All Reseller Passes
      GET
    • Issue a pass
      POST
    • Update user's pass
      POST
    • Update user's pass expiry
      POST
    • Renew a prepaid pass
      POST
    • Get User Pass Details
      GET
  • Providers
    • Introduction
    • Get providers
      GET
    • Get providers for a pass
      GET
  • Access Codes
    • Introduction
    • Generate dynamic access code
      POST
  • Bookings
    • Introduction
    • Get class categories
      GET
    • Get classes
      GET
    • Get class with instances
      GET
    • Initiate a class booking
      POST
    • Confirm a class booking
      POST
    • Initiate a spa booking
      POST
    • Confirm a spa booking
      POST
    • Get client bookings
      GET
    • Get booking status
      GET
    • Cancel a booking
      POST
  • Credits
    • Introduction
    • Purchase credits
    • Get credit packages
  • Lookup
    • Introduction
    • Get issuers
    • Initiate a lookup
    • Verify a lookup
    • Get a user
    • Get a user's credits
  • Webhooks
    • Introduction
    • List Webhook Endpoints
      GET
    • Register Webhook Endpoint
      POST
    • Delete Webhook Endpoint
      DELETE
  • Hosted Sessions
    • Introduction
    • Create a hosted session
  • Schemas
    • RegisterWebhookV3Request
    • PasscodeV3Request
    • PurchaseSpaCoPayV3Request
    • RegisterWebhookEndpointRequest
    • WebviewSessionExchangeRequest
    • ErrorDetail
    • ResellerV3PasscodeResponse
    • ResellerV3ErrorResponse
    • ResellerV3WebhookEndpointResponse
    • ResellerV3WebhookResponse
    • LookupInitiateV3Request
    • ResellerV3SpaCoPayPurchaseResponse
    • LookupV3Response
    • SpaCoPayQuoteV3Request
    • PassRef
    • LookupVerifyV3Request
    • ResellerV3SpaCoPayQuoteResponse
    • CategoryDetails
    • IssuePassV3Request
    • RenewPrepaidPassV3Request
    • UpdateLookupEnabledRequest
    • ResellerV3IssuedPassResponse
    • UpdateIssuedPassExpiryV3Request
    • PurchaseCoPayPackageV3Request
    • PurchaseGymCoPayV3Request
    • ResellerV3IssuedPassMessageResponse
    • ResellerV3PassRenewalResponse
    • ResellerV3GymCoPayPurchaseResponse
    • ResellerV3CoPayPurchaseResponse
    • UpdateIssuedPassV3Request
    • RescheduleBookingV3Request
    • PurchaseCreditsV3Request
    • PasscodeInfo
    • WebviewSessionMintRequest
    • RefundInfo
    • BookSpaV3Request
    • ResellerV3CreditPurchaseResponse
    • UpdateClientDetailsV3Request
    • ResellerV3SpaBookingInitiateResponse
    • ResellerV3ProviderResponse
    • ResellerV3ClientResponse
    • BookClassV3Request
    • ResellerV3ServiceResponse
    • SetClientIdV3Request
    • CopayOption
    • ResellerV3SpaResponse
    • ServicePreview
    • ResellerV3ClassBookingInitiateResponse
    • ResellerV3AvailabilityResponse
    • ConfirmClassBookingV3Request
    • ResellerV3AccessCodeSessionResponse
    • ResellerV3BookingResponse
    • ConfirmAccessCodeV3Request
    • CategoryDetail
    • AccessCodeV3Request
    • ResellerV3PassResponse
    • ResellerV3ListResponse
    • ResellerV3CreditsResponse
    • ResellerV3AccessCodeResponse
    • ResellerV3BookingStatusResponse
    • ResellerV3ClassInstanceResponse
    • ResellerV3ClassResponse
  1. Webhooks

Introduction

Webhooks let you receive real-time notifications when events happen on the Bardge network — a booking is confirmed, a booking is cancelled, a client purchases credits, or a prepaid pass renews — instead of polling the API for changes.

What you can do#

Register a webhook endpoint to receive event notifications
List your registered webhook endpoints
Delete (disable) a webhook endpoint

Key concepts#

Registering an endpoint
Call POST /webhook_endpoints with the URL you want events delivered to. Only one webhook endpoint is active per reseller at a time — registering a new URL replaces and disables the previous endpoint.
{
  "url": "https://example.com/bardge/webhooks"
}
The response includes a signing_secret — save it immediately. It is only ever returned once, at registration time, and is required to verify incoming events. It is not returned by the list endpoint.
A ping event is sent to the new endpoint immediately after registration to confirm connectivity.
Event types
EventWhen it fires
pingSent once, immediately after registering an endpoint
booking.confirmedA spa or class booking is confirmed
booking.cancelledA booking is cancelled
credits.purchasedA credit package purchase completes for a client
prepaid.pass.renewedA prepaid pass renews
checkin.succeededA client successfully checks in for a visit
Endpoints receive all event types — there is no per-endpoint event filtering.
Payload shape
Every webhook request body has the same envelope:
{
  "event_type": "booking.confirmed",
  "event_id": "whevt_01H8XYZABCDE",
  "reseller_id": "res_01H8XYZABCDE",
  "created_at": "2026-04-30T12:00:00Z",
  "api_version": "v3",
  "data": { ... }
}
data holds the same response object your API call would have returned for that action (for example, the booking response for booking.confirmed).
checkin.succeeded example
{
  "event_type": "checkin.succeeded",
  "event_id": "whevt_01H8XYZABCDE",
  "reseller_id": "res_01H8XYZABCDE",
  "created_at": "2026-04-30T12:00:00Z",
  "api_version": "v3",
  "data": {
    "client_id": "cl_01H8XYZABCDE",
    "checkin_id": "chkin_01H8XYZABCDE",
    "provider_branch_name": "Bardge Spa - Victoria Island",
    "checked_in_at": 1777896000,
    "status": "success",
    "failure_reason": null
  }
}
Signature verification
Every webhook request carries an X-Bardge-Signature header:
X-Bardge-Signature: sha256=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
To verify a request:
1.
Compute HMAC-SHA256(signing_secret, raw_request_body), using the raw request body bytes exactly as received.
2.
Hex-encode the result and compare it against the value after sha256= in the header, using a constant-time comparison.
3.
Reject the request if the signatures do not match.
The signing secret is specific to the endpoint and distinct from your API key.
Delivery and retries
Delivery is attempted over HTTP POST with a JSON body and the signature header above.
Any 2xx response marks the event as delivered. Any other response (or a timeout) is treated as a failed attempt.
Failed attempts are retried on a fixed schedule: 1s, 5s, 30s, 5m, 30m — up to 6 attempts total. After the final failed attempt, the event is marked FAILED and not retried further.
Deliveries are at-least-once — the same event may be delivered more than once. Dedupe on event_id.
Return a 2xx response quickly. If processing takes time, acknowledge receipt first and process asynchronously.
Disabling an endpoint (via delete) stops future deliveries, including any already-queued events for that endpoint.

Related sections#

Bookings — source of booking.confirmed and booking.cancelled events
Credits — source of credits.purchased events
Modified at 2026-08-13 12:44:46
Previous
Get a user's credits
Next
List Webhook Endpoints
Built with