Place an Order
Placing an order is a sequence of availability, catalog, checkout, payment, and server-side validation steps. This guide replaces an obsolete demo payload with a safe conceptual flow; each operation has its own required fields and validation.
- Find an available business using location and order type, then retrieve only the fields and relations needed for the catalog.
- Select an enabled menu, categories, products, extras, options, and suboptions that are available for the requested time and fulfillment mode.
- Set the user's address, order type, and requested moment with Update order options.
- Add or update cart products through their corresponding API operations. Preserve each cart product
codeso variants with different options remain distinct. - Read Checkout fields and collect any required project-specific values.
- Select the configured payment method. Keep secrets on trusted servers and pass only the fields required by that gateway flow.
- Re-read the cart totals, then place the order from the cart with the server-calculated amount.
- If the payment flow returns a pending-confirmation cart, complete cart confirmation with the required payment result.
Availability, minimums, delivery zones, schedules, products, totals, coupons, and payment authorization are revalidated by the API. Do not rely on client calculations or previously fetched catalog state.