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: '{"shoppingCartIdentifier":"","customizationIdentifier":"","redirectUrl":"https://ota.wink.travel/thank-you","ga4ClientId":"","ga4SessionId":"","ga4MeasurementId":""}'};
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 '{ "shoppingCartIdentifier": "", "customizationIdentifier": "", "redirectUrl": "https://ota.wink.travel/thank-you", "ga4ClientId": "", "ga4SessionId": "", "ga4MeasurementId": "" }'Creates 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 ”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-6g9d-5f5c-1b4e-3c8d7g0f5h64Redirect URL to return to after successful payment completion
Example
https://ota.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.1234567890Responses
Section titled “ Responses ”Checkout initialized successfully with payment intent details
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
Invalid checkout request (missing cart, invalid dates, etc.)
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized - valid authentication required
object
object
Forbidden
object
object
Shopping cart validation failed or inventory unavailable
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": "", "ephemeralKey": "", "customerId": "", "groupIdentifier": "", "bookingCodes": [ "" ]}Internal Server Error
object
Example generated
{}