mhlb_checkout
Pay for school lunch orders in the cart using a saved card. Run init_checkout first, review the dry-run preview, then confirm to charge the expected total.
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. 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 dry-run preview before confirming.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be true to proceed. Without this, the tool returns a preview. | |
| 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. | |
| 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 dry run 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. | |
| schoolDonations | No | School donation selections, as returned by mhlb_init_checkout. | |
| availableCredits | No | Account credit to apply, as parent_credit_value from mhlb_whoami. |