Orders
Pay order with a shared payment token
Pay an order awaiting payment without its link, with a Stripe shared payment token, when the order has payment.handlers. First show and ask exactly as for payment.url, and wait for a clear yes. Then request the token from the user's wallet with the handler's networkId and payment.credentialLimits, and pass it with the order's price.total. The charge is in USD. Once it succeeds, payment.url stops working; a payment that fails leaves the link open. Answers the order: status confirming, the payment authorized (held, charged once the hotel confirms); poll get_order. payment_total_changed: show details.total and ask again, for a new token. payment_declined: the user picks another payment method in their wallet, or pays by link. payment_action_required: the card needs a verification this can't give; pay by link. payment_credential_invalid: request a new token. service_unavailable: call pay_order again with the same token, never a new one. A token pays one order only; the same token again answers as before.
Input
orderIdstringrequiredorderId of the order to pay, from create order or get order.
sharedPaymentTokenstringrequiredThe shared payment token (spt_…) the user approved for this order, requested with the order's payment.credentialLimits.
totalobjectrequiredThe total the user approved: the order's price.total, exactly as returned.
total.amountstringrequiredDecimal string such as 132.40, never a number.
total.currency"USD"requiredAlways USD in a request.
Output
structuredContent is the Order (pay) object, and content[0] the same answer as compact text. Errors are described in the overview.