Initialize direct checkout
const url = 'https://api.wink.travel/api/checkout';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/checkout \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullCreates initialized bookings and a single Stripe PaymentIntent in one step, preparing the shopping cart for payment. Returns the PaymentIntent client secret and ephemeral key needed by the frontend Stripe payment sheet, along with booking confirmation codes and group identifier.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Checkout payload containing the shopping cart reference, selected payment method and guest contact details
Request payload to initiate the checkout flow for a previously assembled shopping cart, including payment routing and analytics tracking parameters.
object
Shopping cart identifier to send to TripPay for payment processing
Example
a2f1c9d8-4e7b-4d3a-9f2c-1a6b5e8d3f42Wink affiliate customization identifier for tracking and branding
Example
c4f3e1d2-6a9d-5f5c-1b4e-3c8d7b0f5c64Redirect URL to return to after successful payment completion
Example
https://book.wink.travel/thank-youGA4 client ID extracted from the _ga cookie for analytics tracking
Example
G-XHFTY1BDSDGA4 session ID extracted from the ga<CONTAINER_ID> cookie for session tracking
Example
GA.1.1.123456789.1234567890GA4 Measurement ID identifying the data stream for analytics collection
Example
GA.1.1.123456789.1234567890Example
{ "shoppingCartIdentifier": "a2f1c9d8-4e7b-4d3a-9f2c-1a6b5e8d3f42", "customizationIdentifier": "c4f3e1d2-6a9d-5f5c-1b4e-3c8d7b0f5c64", "redirectUrl": "https://book.wink.travel/thank-you", "ga4ClientId": "G-XHFTY1BDSD", "ga4SessionId": "GA.1.1.123456789.1234567890", "ga4MeasurementId": "GA.1.1.123456789.1234567890"}Responses
Section titled “ Responses ”Checkout initialized successfully with payment intent details
Result returned to the frontend after a successful checkout initiation, containing the Stripe credentials needed to render the PaymentSheet and the booking identifiers for post-payment confirmation.
object
Stripe PaymentIntent client secret used by the frontend payment sheet to authorize payment.
Stripe EphemeralKey secret for establishing a temporary customer session with Stripe.
Stripe Customer ID for the authenticated user’s payment methods and history.
Unique group identifier linking all bookings created in this checkout transaction.
Example
{ "clientSecret": "pi_1A2B3C4D5E6F7G8H_secret_9I0J1K2L3M4N5O6P", "ephemeralKey": "ek_live_A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P", "customerId": "cus_A1B2C3D4E5F6G7H", "groupIdentifier": "a1f4c9e2-7b3d-4e8a-9c21-6f0b5d8e3a47", "bookingCodes": [ "WNK4ZQ7P", "WNK8XR3M" ]}Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Shopping cart validation failed or inventory unavailable at time of checkout
Result returned to the frontend after a successful checkout initiation, containing the Stripe credentials needed to render the PaymentSheet and the booking identifiers for post-payment confirmation.
object
Stripe PaymentIntent client secret used by the frontend payment sheet to authorize payment.
Stripe EphemeralKey secret for establishing a temporary customer session with Stripe.
Stripe Customer ID for the authenticated user’s payment methods and history.
Unique group identifier linking all bookings created in this checkout transaction.
Example
nullInternal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable