get_payment_status. See the payment branches in Agent Onboarding for how to pick a flow.
The eater’s card statement names the restaurant (shortened to fit the card network’s descriptor limit), so the charge is recognizable.
start_payment
The single checkout entry point: start — and for saved cards, complete — the customer payment before the final submit. Every order is prepaid; there is no post-submit charging path. The branch is chosen from what is supplied:
A 3DS challenge on the saved-card branch comes back as
requires_action with clientSecret — finish authentication on-session with Stripe.js, which leaves the funds authorized (held).
Re-pricing an order. Payments are keyed by external_order_reference, and most clients keep that reference stable across cart edits. Calling start_payment again on the same reference with a new total releases the previous hold and authorizes the new amount — one live hold per reference, never two. A retry at the same amount is idempotent and reuses the original authorization. An already-captured payment is returned untouched (refund it instead of re-starting).
The amount is enforced at submit. submit_order rejects an authorization that does not cover the order total with payment_amount_insufficient — a stale hold from a smaller cart cannot carry a larger order. Capture is bounded the other way: when the hold exceeds the order (a cart the eater shrank), only the order total is captured, and the payment record reflects what was actually taken.
Ownership. References are each agent’s own namespace: a reference that already carries another agent’s payment is refused with payment_reference_conflict — pick references unique to your agent. For some restaurants, a reference that backs an order that is placed, or whose submit has not resolved, can’t take a new payment either (payment_reference_in_use): re-pricing it would release the hold that pays for that order. Check the order with get_order_status instead.
Input:
restaurant_id and order is optional, and each is what selects a branch — send only the ones your branch needs. Omit the ones you are not using rather than sending null: these are optional strings, and an explicit null fails schema validation.
Output:
capabilities.pricing is verbatim_line_items, the hold is sized from a fresh quote of this exact cart, and the response adds quote — the money lines behind totalCents: subtotalCents, taxCents, feesCents, serviceFeeCents, platformServiceFeeCents, serviceFeeBps, deliveryFeeCents, otherFeesCents, otherFees, promoDiscountCents, tipCents, totalCents, currency (see itemized quotes). When a large order is split into several, each part is priced as its own order — this is where you learn each part’s real total. quote is absent otherwise.
void_payment
Release a held authorization (e.g. the order failed to submit). No funds are charged. Input — identify the payment either way:external_reference is the light form, and the only one available once you no longer hold the order intent. Supplying neither throws.
Output: { "ok": true, "status": "canceled", "paymentIntentId": "pi_123" }
void_payment works even when the restaurant has since stopped accepting orders — that is usually why the submit failed. Ownership gates it: you can void a payment your agent owns, nothing else (anything else reads as No payment for this reference.).
One exception for some restaurants: a hold behind an order that was placed, is still being submitted, or whose submit outcome is unknown can’t be voided — the hold is what pays for that order. The call fails with “This payment backs an order that was placed or whose submit has not resolved; it cannot be voided.” Check the order with get_order_status (or get_payment_status → order), or contact support.
get_payment_status
Reconciliation: the current stored payment status for an order’s external reference — and, for some orders, what became of the order submitted under it. Input:{ "external_reference": "yourapp-order-1001" }
Output:
order is for a caller that lost the submit’s answer (a browser tab closed mid-submit, a timeout). Where present, it is the outcome of the last submit under this reference:
status—submitting(still running;inFlight: true),submit_ambiguous(the outcome is unknown — the order may have been placed),failed(a clean failure; the reference can be used again), or, once placed, the order’s lifecycle status, withorderIdset forget_order_status.mock—truefor a test-mode order.totalCents— the order’s total, when known.
order is null when there is no such submit to report. A reference you don’t own reads as { "found": false, … "order": null }.
Ownership: a payment is the agent’s when its linked order is theirs, or — pre-submit, when no order exists yet — when the payment carries their agent stamp in metadata.