FleetbaseFleetbase

Orders

Storefront order endpoints expose customer-facing actions after checkout: follow an order's progress through its activity flow, see each store's part of a multi-store Network order, mark pickup orders complete, and retrieve receipts for supported payment methods.

The Storefront Order object

A storefront order is a FleetOps order created from a captured storefront checkout.
Attributes
idstringoptional

Public identifier of the order.

public_idstringoptional

Public identifier of the order.

statusstringoptional

Order lifecycle status.

typestringoptional

Order type, usually storefront for orders created by this API.

payloadobjectoptional

FleetOps payload created from the storefront cart.

customerobjectoptional

Customer associated with the order.

metaobjectoptional

Storefront checkout, payment, totals, and fulfillment metadata. discount is the total promotion discount (minor units) and promotions lists the applied promotions with their amounts; multi-store child orders carry their store's share of the item discount. Also: payment_status, subtotal, tip; booking orders carry is_booking, booking_at (ISO 8601) and booking_has_items; a multi-store Network checkout creates a master order (is_master_order, related_orders) whose store orders carry master_order_id.

notesstringoptional

Order notes supplied during checkout capture.

created_attimestampoptional

Time the order was created.

updated_attimestampoptional

Time the order was last updated.

paymentobjectoptional

The order's payment, computed when the order is returned (customer order lists). Same shape as meta.payment.

meta.paymentobjectoptional

The order's payment as one picture, stored on the order and kept current by the server at capture, cash collection, edits and cancellation, so it is present whichever resource returns the order. \{ state, gateway, method_label, total, amount_paid, amount_refunded, amount_credited, balance_due, cod_amount, currency, payment_link, store_credit_code, supports_partial_refund, adjustments \}. state is paid, to_collect (cash on delivery not collected yet), unpaid, refunded, partially_refunded or balance_due. payment_link is the link to pay a balance due (Stripe Payment Link or QPay invoice); store_credit_code is the single-use code issued when a difference was returned as store credit. adjustments lists each change after checkout: \{ type, amount, gateway, reference, reason, at \} (and by when made by a store user), where type is refund, store_credit, charge or cod_update. Amounts are in the currency's smallest unit. A cash-on-delivery order stays to_collect with amount_paid 0 until it is completed.

meta.bookingobjectoptional

Booking orders only: the booked slot \{ start, end, duration_minutes \} (ISO 8601), alongside is_booking and booking_at.

meta.cancel_reasonstringoptional

Why the store canceled the order, when it gave a reason.

meta.tip_amountintegeroptional

Tip for the store, in the currency's smallest unit (meta.delivery_tip_amount for the driver's tip).

meta.address_change_requestobjectoptional

Set by Request Address Change: \{ status, message, place, address, at \}. status is open until the store updates the address (resolved) or dismisses the request (dismissed), which also adds closed_at; place and address are the saved place the customer suggested, or null.

payload.entities[].metaobjectoptional

Per item, besides the cart line data (product_id, quantity, ...): note (the store's note on the item), unavailable (the store marked it unavailable; every other item is taken as packed and delivered), substitute_for (the entity id this item replaces) and added_by_edit (added when the store edited the order).

The Storefront Order object
{
  "id": "order_9Kx2mQ1",
  "public_id": "order_9Kx2mQ1",
  "status": "preparing",
  "type": "storefront",
  "payload": {
    "id": "payload_4Rt7nB2",
    "entities": [
      {
        "id": "entity_6Lp2wQ9",
        "name": "Cold Brew",
        "meta": {
          "product_id": "product_9Lb2mQ1",
          "quantity": 2,
          "note": "No ice, please",
          "unavailable": false
        }
      },
      {
        "id": "entity_3Hd8vK5",
        "name": "Iced Latte",
        "meta": {
          "product_id": "product_7Qa1zX4",
          "quantity": 1,
          "substitute_for": "entity_8Wn5cT1",
          "added_by_edit": true
        }
      }
    ]
  },
  "customer": null,
  "meta": {
    "checkout_id": "checkout_123",
    "storefront": "Acme Market",
    "total": 4600,
    "discount": 500,
    "promotions": [
      {
        "promotion": "promotion_7Hq2xL9",
        "name": "Welcome $5 off",
        "type": "fixed_amount",
        "code": "WELCOME5",
        "amount": 500,
        "delivery_amount": 0
      }
    ],
    "currency": "USD",
    "gateway": "stripe",
    "payment": {
      "state": "partially_refunded",
      "gateway": "stripe",
      "method_label": "Card (Stripe)",
      "total": 4600,
      "amount_paid": 5150,
      "amount_refunded": 550,
      "amount_credited": 0,
      "balance_due": 0,
      "cod_amount": 0,
      "currency": "USD",
      "payment_link": null,
      "store_credit_code": null,
      "supports_partial_refund": true,
      "adjustments": [
        {
          "type": "refund",
          "amount": 550,
          "gateway": "stripe",
          "reference": "re_example123",
          "reason": "Iced Mocha was unavailable",
          "at": "2026-10-13T09:40:00+00:00"
        }
      ]
    },
    "address_change_request": {
      "status": "open",
      "message": "Please deliver to my office instead.",
      "place": "place_2Vb6nM8",
      "address": "1 Raffles Place, Singapore 048616",
      "at": "2026-10-13T09:45:00+00:00"
    }
  },
  "payment": {
    "state": "partially_refunded",
    "gateway": "stripe",
    "method_label": "Card (Stripe)",
    "total": 4600,
    "amount_paid": 5150,
    "amount_refunded": 550,
    "amount_credited": 0,
    "balance_due": 0,
    "cod_amount": 0,
    "currency": "USD",
    "payment_link": null,
    "store_credit_code": null,
    "supports_partial_refund": true,
    "adjustments": [
      {
        "type": "refund",
        "amount": 550,
        "gateway": "stripe",
        "reference": "re_example123",
        "reason": "Iced Mocha was unavailable",
        "at": "2026-10-13T09:40:00+00:00"
      }
    ]
  },
  "notes": null,
  "created_at": "2026-10-13T09:30:00Z",
  "updated_at": "2026-10-13T09:45:00Z"
}
PUT/v1/orders/picked-up

Complete Order Pickup

Marks an authenticated customer's pickup order as completed. Fleetbase verifies that the order belongs to the customer before updating the order status.

Body parameters
orderstringrequired

Public ID of the pickup order to mark completed.

PUT/v1/orders/picked-up
curl -X PUT https://api.fleetbase.io/v1/orders/picked-up \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Customer-Token: {{customer_token}}" \
  -d '{
  "order": "{{order_id}}"
}'
POST/v1/orders/receipt

Get Order Receipt

Returns a receipt for an authenticated customer's order when the payment method supports receipts. QPay orders can generate an Ebarimt receipt.

Body parameters
orderstringrequired

Public ID of the order to retrieve a receipt for.

ebarimt_receiver_typeenumoptional

Ebarimt receiver type for QPay receipts. One of CITIZEN, COMPANY.

ebarimt_receiverstringoptional

Company registration number. Required when ebarimt_receiver_type is COMPANY.

POST/v1/orders/receipt
curl -X POST https://api.fleetbase.io/v1/orders/receipt \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Customer-Token: {{customer_token}}" \
  -d '{
  "order": "{{order_id}}",
  "ebarimt_receiver_type": "CITIZEN",
  "ebarimt_receiver": ""
}'
POST/v1/orders/address-change-request

Request Address Change

Tells the store that the order's drop-off address is wrong. The store sees an alert on the order, and the message is posted in the customer's chat with the store (a message with kind address_change_requested). The store then updates the address or dismisses the request. Requires the Customer-Token of the customer who placed the order.

Send a message, a place (one of the customer's saved places, see customers/places), or both. The request is recorded on the order as meta.address_change_request.

Response: { "status": "ok", "address_change_request": { "status": "open", "message", "place", "address", "at" } }. place and address are the suggested saved place's id and address, or null.

Errors: 401 without a customer token; 404 for an order not placed through this storefront (Order not found.) or an unknown place (Place not found.); 403 for another customer's order; 409 with "reason": "chat_unavailable" when the chat with the store can't be opened (the customer has no user account, or the order finished without one); 422 when the order is completed, canceled or expired, or is a pickup order (The address of this order can no longer change.), and when message is longer than 1000 characters.

In a contract run this addresses {{address_change_order_id}} when the environment sets one (an open delivery order of the run's customer). Otherwise it addresses an unknown order and asserts the 404.

Body parameters
messagestringoptional

What is wrong with the address, up to 1000 characters.

placestringoptional

Public ID of one of the customer's saved places to suggest as the new drop-off. An unknown place, or one that isn't the customer's, returns 404.

POST/v1/orders/address-change-request
curl -X POST https://api.fleetbase.io/v1/orders/address-change-request \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -H "Customer-Token: {{customer_token}}" \
  -d '{
  "message": "The building number is wrong, it'\''s 18 not 81.",
  "place": "{{place_id}}"
}'
GET/v1/orders/balance-paid

Balance Paid Callback

QPay's callback for a balance invoice: when the store edits a paid order and the total goes up, the customer is sent a payment link for the balance (a QPay invoice, or a Stripe Payment Link), and QPay calls this URL when the invoice is paid. It needs no storefront key; Storefront builds the URL with the order's public id when it creates the invoice.

Storefront never trusts the callback itself: it asks the gateway what was paid against the order's open balance link. When the balance is paid it records the charge on the order's payment (meta.payment), closes the link and sends the customer the order_balance_paid notification. Stripe Payment Links have no callback; Storefront checks them every five minutes (storefront:check-balance-payments).

Response: { "status": "paid" } when the balance was settled now, { "status": "pending" } when nothing (more) is paid or the gateway can't be asked, and 404 with { "status": "unknown" } for an unknown order. Calling it again after the balance is settled answers pending.

In a contract run this addresses {{balance_order_id}} when the environment sets one. Otherwise it addresses an unknown order and asserts the 404.

Query parameters
orderstringoptional

Public ID of the order whose balance invoice was paid. QPay may also POST it in the body; either works.

GET/v1/orders/balance-paid
curl https://api.fleetbase.io/v1/orders/balance-paid?order={{balance_order_id}} \
  -H "Authorization: Bearer flb_live_…"
GET/v1/orders/activity-flow

Get Order Activity Flow

Returns the steps of an order's activity flow for a progress view: the steps already reached (with when), the current step, and the steps still to come. Requires the Customer-Token of the customer who placed the order.

Response: { order, order_config, status, canceled, completed, steps: [{ code, label, details, state, reached_at, complete }] }. state is done, current or upcoming; once the order is completed, the current step is done. order_config ({ id, key, name }) and status can be null.

Errors: 400 when the customer isn't authenticated, 404 for an unknown order, 403 for another customer's order.

GET/v1/orders/activity-flow
curl https://api.fleetbase.io/v1/orders/activity-flow \
  -H "Authorization: Bearer flb_live_…" \
  -H "Customer-Token: {{customer_token}}"
GET/v1/orders/stores

Get Order Stores

For a Network order placed across several stores (a master order), returns each store's part of the order: its status, items and amounts. Returns { "stores": [] } for an order from a single store. Requires the Customer-Token of the customer who placed the order.

Response: { stores: [{ order, status, label, store: { id, name, logo_url, phone, address }, items: [{ id, name, quantity, subtotal, variants, addons, image_url }], subtotal, discount, tip, currency }] }. label is the store order's current activity step. Amounts are in the currency's smallest unit.

Errors: 400 when the customer isn't authenticated, 404 for an unknown order, 403 for another customer's order.

GET/v1/orders/stores
curl https://api.fleetbase.io/v1/orders/stores \
  -H "Authorization: Bearer flb_live_…" \
  -H "Customer-Token: {{customer_token}}"
Orders | Fleetbase