FleetbaseFleetbase

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.

Storefront orders list — order ID, customer, items, total, status, created time

The Transaction Lifecycle

Cart → /checkouts/before → /checkouts/capture → Fleet-Ops Order → Fulfillment

1. 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:

ActivityTriggered when
createdOrder created from a successful checkout
acceptedMerchant accepts the order
preparingMerchant marks the order as being prepared
ready / pickup_readyOrder is ready for the driver to collect (pickup_ready is used for customer self-pickup)
dispatchedA driver has been assigned and is heading to pickup
started / in transitDriver collected the items and is en route to the customer
completedDelivery confirmed; proof of delivery captured
canceledCancelled by merchant, customer, or dispatcher

Transactional Notifications

Storefront fires customer push notifications automatically as the Fleet-Ops order progresses. No manual configuration is required beyond setting up an APNs/FCM channel.

NotificationFires when
StorefrontOrderCreatedA new order is placed
StorefrontOrderAcceptedThe merchant accepts the order
StorefrontOrderPreparingThe merchant marks the order as being prepared
StorefrontOrderReadyForPickupThe order is ready (used for pickup orders)
StorefrontOrderDriverAssignedA driver is assigned to the order
StorefrontOrderEnrouteThe driver has picked up and is en route
StorefrontOrderNearbyThe driver is approaching the dropoff
StorefrontOrderCompletedDelivery is complete
StorefrontOrderCanceledThe order is cancelled

Managing Orders in the Console

From Storefront → Orders:

  • View all incoming orders in real-time with current status
  • Click an order to see full detail: customer info, line items, payment breakdown, delivery status
  • Track the driver's progress on the live map via the Fleet-Ops integration
  • View proof of delivery when the order is complete

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:

EndpointEffect
POST /storefront/int/v1/orders/{id}/acceptAccept a pending order
POST /storefront/int/v1/orders/{id}/preparingMark as preparing
POST /storefront/int/v1/orders/{id}/readyMark as ready for pickup
POST /storefront/int/v1/orders/{id}/completedMark as completed (used by the merchant for pickup orders)

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.

Orders & Checkout | Fleetbase