mhlb_checkout
Pay for the lunches in your cart with a saved card. Review the total from checkout initialization, then approve the charge to complete the payment.
Instructions
PAY for the lunches in the cart. This charges a real payment method on the My Hot Lunchbox account. Run mhlb_init_checkout first, read the total it returns, and pass that figure as expectedTotal. Only a card ALREADY SAVED on the account can be used: paying with a new card needs a Stripe token minted by Stripe.js in a browser, which no server-side client can produce. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). NOTE: this write is UNVERIFIED — its request shape was derived from the web app’s compiled API client but has not been exercised against a live account. Inspect the confirmation preview before approving it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderIds | Yes | Ids of the orders to pay for, from mhlb_get_cart. | |
| couponCode | No | Coupon code to apply to this checkout. | |
| checkoutType | No | Payment method type, as mhlb_init_checkout reports it. Omit to let the server default. | |
| confirmToken | No | ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation. | |
| giftCardCode | No | Gift card code to apply to this checkout. | |
| expectedTotal | Yes | The amount you expect to be charged, as mhlb_init_checkout reported it. The server prices the charge from orderIds, so no client-side check can bind the amount — this is recorded in the confirmation preview and in the result so an unexpected charge is at least attributable. | |
| idempotencyKey | No | Reuse the SAME key when retrying a checkout that may already have gone through — that is what stops a retry becoming a second charge. Generated automatically when omitted. Pass the same value on both confirmation calls. | |
| schoolDonations | No | School donation selections, as returned by mhlb_init_checkout. | |
| availableCredits | No | Account credit to apply, as parent_credit_value from mhlb_whoami. |