latestOpenAPI 3.0.02026-08-106054.4 KB

42536792b3f8

Confirm Booking

Confirm Booking

Completes the second step of the two-step booking flow. Use this endpoint after confirming an Offer with require_payment_confirmation set to true, which leaves the booking in PENDING_PAYMENT. Once payment has been collected, call this endpoint to move the booking to CONFIRMED and issue the policies. The booking must be in PENDING_PAYMENT status; any other status returns 422.

Idempotency

This endpoint supports idempotency keys via the x-idempotency-key header to prevent duplicate transactions. Provide a unique operation identifier (e.g., UUID) to ensure safe retries. Duplicate requests return:

  • 409 Conflict: The request was already processed; response contains the cached original result (handle as success)
  • 423 Locked: The original request is still processing; retry after a short delay
put/partners/{partner_code}/bookings/{booking_id}/confirm

Headers

x-idempotency-keystring uuid

A unique identifier to ensure idempotent request processing. If a request with the same idempotency key and body has already been processed, the cached response is returned with a 409 Conflict status code (which can be treated as successful). Keys are stored for 48 hours.

Request body

xpay_charge_idstring

Deprecated. Use payment_details.xpay_charge_id instead.

Response

Created

idstring
statusstring
currencystring
total_pricenumber
total_price_formattedstring
{"stackTrail":"paths:/partners/{partner_code}/bookings/{booking_id}/confirm:put:responses:201:content:application/json:schema:properties:partner_transaction_id","oasType":"schema","type":"unknown","nullable":true}
created_atstring date-time
updated_atstring date-time
pds_urlstring uri
security_tokenstring
account_urlstring uri
sign_up_urlstring uri
policyholderobject
total_taxnumber
total_tax_formattedstring
total_premiumnumber
total_premium_formattedstring
fnol_linkstring uri
{"stackTrail":"paths:/partners/{partner_code}/bookings/{booking_id}/confirm:put:responses:201:content:application/json:schema:properties:booking_agent","oasType":"schema","type":"unknown","nullable":true}