prepare_payment
Get the hosted Stripe payment link, only after the buyer approved buyer_summary (details and total): send buyer_confirmed=true, that details_version, that total and an idempotency_key (reuse it on retries, and to get a fresh link if an unpaid link expired). Creates an unpaid order; nothing is charged until the buyer, or an agent they explicitly authorized, pays on Stripe. The result says when the link expires. Then check get_order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checkout_id | Yes | checkout_id from create_checkout or checkout_session. | |
| guest_token | No | Private guest session token from create_cart. Retain for cart, checkout and purchase-status calls; no account login needed. | |
| expected_total | Yes | The total the buyer confirmed, in SGD cents. | |
| buyer_confirmed | Yes | true only after the buyer confirmed these details and this total. | |
| details_version | Yes | The details_version the buyer confirmed. | |
| idempotency_key | Yes | A new random key per purchase. Retry with the same key and exact input; never reuse it for a different purchase. |