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.
Scoped to the brand in the brandId path parameter. A brand key must be that brand’s own key. An organization key works for any brand in its organization, including brands of child organizations, and needs no Way-Brand-Id header.
Authorizations
Your brand's secret API key, e.g. Bearer way_sk_live_bhEqcn0i1fRoUEHBPjJkQA. The key names the brand, so a brandId in the path must be your own brand. Older Way-Brand-Id + Way-Secret-Key credentials still work: see Legacy authentication.
Path Parameters
The brand's ID. With a brand key this must be your own brand; with an organization key it can be any brand in the organization.
The cart's ID, the client-generated UUID used at checkout.
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"