Orders & Checkout
Manage the full Storefront order lifecycle — cart, two-step checkout, payment, Fleet-Ops fulfillment, and the transactional notifications that fire along the way.
Orders & Checkout
The Orders & Checkout system handles the complete purchase lifecycle — from a customer adding items to their cart through to a dispatched Fleet-Ops delivery.
Navigate to Storefront → Orders to view and manage orders.

The Transaction Lifecycle
Cart → /checkouts/before → /checkouts/capture → Fleet-Ops Order → Fulfillment1. Cart
The customer browses the catalog and adds products to a persistent Cart. The cart stores product selections, variants, addons, and quantities. See Cart.
2. Service Quote
When the customer adds a delivery address, your frontend asks Fleet-Ops for a Service Quote that calculates the delivery fee. See Service Quotes.
3. Checkout (two-step)
When ready to buy, the customer hits POST /storefront/v1/checkouts/before with the cart, service quote, payment gateway, tip, and pickup/delivery flag. Storefront returns a token (and a Stripe clientSecret when applicable). The frontend confirms payment via the gateway SDK, then calls POST /storefront/v1/checkouts/capture with the same token to finalize. See Checkout.
4. Fleet-Ops Fulfillment
The order appears instantly in Fleet-Ops → Operations → Orders. A dispatcher (or the Orchestrator) assigns a driver. The driver picks up from the store location and delivers to the customer's address.
Order Statuses
Storefront orders share their activity flow with the underlying Fleet-Ops OrderConfig. Storefront emits these activity codes as the order progresses:
| Activity | Triggered when |
|---|---|
| created | Order created from a successful checkout |
| accepted | Merchant accepts the order |
| preparing | Merchant marks the order as being prepared |
| ready / pickup_ready | Order is ready for the driver to collect (pickup_ready is used for customer self-pickup) |
| dispatched | A driver has been assigned and is heading to pickup |
| started / in transit | Driver collected the items and is en route to the customer |
| completed | Delivery confirmed; proof of delivery captured |
| canceled | Cancelled by merchant, customer, or dispatcher |
Transactional Notifications
Storefront notifies customers automatically as the Fleet-Ops order progresses — by push, in their notifications inbox, and by email. No configuration is required beyond an APNs/FCM notification channel and a registered device.
| Notification | Fires when |
|---|---|
StorefrontOrderAccepted | The merchant accepts the order (or it is auto-accepted) |
StorefrontOrderReadyForPickup | A pickup order is dispatched and ready to collect |
StorefrontOrderDriverAssigned | A driver is assigned to the order |
StorefrontOrderEnroute | The driver starts the order and is en route |
StorefrontOrderNearby | The driver is approaching the dropoff |
StorefrontOrderCompleted | Delivery is complete |
StorefrontOrderUpdated | The store edited the order or moved a booking and chose to tell the customer — says what changed (or when the booking is now) and what happens to the money (type order_updated) |
StorefrontOrderItemUnavailable | The store marked an item unavailable — it will be replaced or removed and the total adjusted (type order_item_unavailable). Sent automatically |
StorefrontOrderBalancePaid | The customer paid a balance due through its payment link — a receipt, with anything still left to pay (type order_balance_paid) |
StorefrontOrderCanceled | The order was canceled — says why and whether the payment is refunded or given as store credit (type order_canceled) |
StorefrontOrderPreparing can be sent with the storefront:send-order-notification command. StorefrontOrderCreated alerts the store's staff (the users configured to be alerted about new orders) by email and SMS.
Managing Orders in the Console
From Storefront → Orders:
- View all incoming orders in real-time with current status
- Click an order to open its panel: the next step and when it's due, alerts, the route, the items (with any marked unavailable), the payment, messages with the customer and the order's history — see Managing Orders
- Edit an order after it was placed, settling any price difference by refund, store credit, payment link or cash on delivery
- Cancel an order with a reason and a refund
- Message the customer about their order — see Order Messages
- Take bookings for bookable services
- Track the driver's progress on the live map via the Fleet-Ops integration
- View proof of delivery when the order is complete
Every order carries a payment summary in meta.payment; see Payment Status.
Internal Merchant Endpoints
If you are building a custom merchant terminal (rather than using the Fleetbase Console), Storefront exposes internal endpoints for advancing an order through its lifecycle:
| Endpoint | Effect |
|---|---|
POST /storefront/int/v1/orders/{id}/accept | Accept a pending order |
POST /storefront/int/v1/orders/{id}/preparing | Mark as preparing |
POST /storefront/int/v1/orders/{id}/ready | Mark as ready for pickup |
POST /storefront/int/v1/orders/{id}/completed | Mark as completed (used by the merchant for pickup orders) |
PATCH /storefront/int/v1/orders/cancel | Cancel: { "order": "…", "reason": "…", "refund": true }. Refunds or credits what was paid unless refund is false; settlement (refund or store_credit) overrides the method |
POST /storefront/int/v1/orders/{id}/edit/preview, PATCH /storefront/int/v1/orders/{id}/edit | Price and apply an edit |
PATCH /storefront/int/v1/orders/{id}/entities/{entityId} | Mark an item unavailable (or available again), or set its note. Marking it unavailable tells the customer; the response's customer_told says whether they were |
POST /storefront/int/v1/orders/{id}/balance/link | Issue (or reissue) the payment link for the order's balance due |
POST /storefront/int/v1/orders/{id}/balance/check | Ask the gateway whether the balance was paid, and settle it if so: { "paid": true, "charge": {…}, "payment": {…} } |
GET /storefront/int/v1/orders/{id}/overview | Payment summary, due time, alerts, customer summary, tracking URL and what an edit may still change |
GET /storefront/int/v1/orders/{id}/activity | The order's history, newest first: steps, comments, payment changes, edits and messages |
These are authenticated as a Fleetbase user, not via a storefront key.
Integration with Fleet-Ops
When a Storefront checkout completes:
- The store location (or the food truck GPS position, for mobile stores) becomes the Fleet-Ops order pickup address
- The customer's delivery address becomes the dropoff address
- Each cart item is converted to a Fleet-Ops Entity in the order payload
- Status changes in Fleet-Ops automatically propagate back to the Storefront order via internal listeners
No custom webhooks or sync logic are required — the integration is native.