Create a payment intent
Creates a Stripe payment intent for the cart and returns its client secret and total amount. Send the same cart items you will book. Pass getOnlyTotalNetAmount: true to price the cart without initializing a payment.
Authorizations
Your brand's secret API key, e.g. Bearer way_sk_live_bhEqcn0i1fRoUEHBPjJkQA. Older Way-Brand-Id + Way-Secret-Key credentials still work: see Legacy authentication.
Path Parameters
The brand's ID - must match the brand your API key identifies (or the Way-Brand-Id header when one is sent).
Only bookings created from this cart.
Body
The cart items to price, in the same shape as the book-bulk data[] items. Send the exact items you intend to book so the payment intent amount matches the booking.
When true, prices the cart and returns totalNetAmount without initializing a payment - paymentIntentSecret comes back null. Use it to show a running total before checkout.
When true and the cart's currency is not USD, prices the cart in USD using Way's conversion rate. Defaults to false.
Monotonically increasing revision number for this cart's payment intent, protecting against stale or duplicate requests: if the value is lower than or equal to the cart's stored revision, Way returns the existing intent instead of updating it. Omit if you only create the intent once per cart.
1
Response
Total amount to charge for the cart after discounts and credits, in the brand's currency (USD when convertToUsd is true). Matches the amount the booking call will charge if the cart is unchanged.
200
Stripe client secret for the created payment intent - use it to initialize Stripe Elements. Null when getOnlyTotalNetAmount is true. The booking response's clientSecret is the definitive secret to confirm the charge against.
"pi_3Tso72FpAKNo2Ml2_secret_REDACTED"