Orders

9 operations. Every schema and example on this page is generated from the platform contract.

List a store's Order & Collect orders (live queue or history).

Merchant lists their store orders: scope=active is the live fulfilment queue; scope=history is terminal orders newest-first, keyset-paged by the `before` created_at cursor. Same per-order shape as the fulfilment ops.

Parameters

store_idstring · uuidqueryrequired

Store whose orders to list (also authorises the merchant).

scopeenumqueryoptional

active = the live queue (default); history = terminal orders, newest-first.

activehistory
limitintegerqueryoptional

Page size (default 50, max 100).

beforestringqueryoptional

Keyset cursor (an order created_at) for history pagination.

Response, 200

ordersarray of objectrequired
11 child fields
idstringrequired
store_idstringrequired
order_typestringrequired
fulfilment_statusstring, nullableoptional
collection_codestring, nullableoptional
collection_modestring, nullableoptional
requested_collection_atstring, nullableoptional
accepted_atstring, nullableoptional
preparing_atstring, nullableoptional
ready_atstring, nullableoptional
collected_atstring, nullableoptional
scopeenumrequired
activehistory
curl -G "https://www.membber.com/api/v1/orders" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "orders": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "store_id": "6659c139-0000-4000-8000-d0c500000066",
      "order_type": "<order_type>",
      "fulfilment_status": "<fulfilment_status>",
      "collection_code": "EXAMPLE10",
      "collection_mode": "<collection_mode>",
      "requested_collection_at": "<requested_collection_at>",
      "accepted_at": "<accepted_at>",
      "preparing_at": "<preparing_at>",
      "ready_at": "<ready_at>",
      "collected_at": "<collected_at>"
    }
  ],
  "scope": "active"
}

Create a native mini-store order + Stripe PaymentIntent.

Customer creates an in-app order; returns a destination-charge PaymentIntent + ephemeral key for the native Apple Pay / card sheet. Idempotent via the body `idempotency_key` (order-level replay in the service).

Request body

store_codestringrequired

Public store code.

store_idstring · uuidrequired

Store id.

idempotency_keystringrequired

Client-generated order idempotency key (UUID v4).

itemsarray of objectrequired

Basket lines.

2 child fields
menu_item_idstringrequired
quantityintegerrequired
fulfilmentobjectoptional

Fulfilment selection (defaults to counter collection).

2 child fields
modestringrequired
table_numberstring, nullableoptional
tip_penceinteger, nullableoptional
promo_codestring, nullableoptional
order_typeenumoptional
buy_nowcollect
collection_modeenumoptional
nowscheduled
slot_idstring, nullableoptional
requested_collection_atstring, nullableoptional
device_fingerprintstring, nullableoptional
fulfilment_groupsarray of objectoptional

Mixed-cart groups: take-now lines + one or more collect groups.

5 child fields
roleenumrequired
nowcollect
itemsarray of objectrequired
2 child fields
menu_item_idstringrequired
quantityintegerrequired
collection_modeenumoptional
nowscheduled
requested_collection_atstring, nullableoptional
slot_idstring, nullableoptional

Response, 200

order_idstringrequired
order_numberstringrequired
statusstringrequired
requires_paymentbooleanrequired
client_secretstring, nullablerequired
ephemeral_keystring, nullablerequired
stripe_customer_idstring, nullablerequired
connected_account_idstringrequired
payment_intent_idstring, nullablerequired
amount_pencenumberrequired
currencystringrequired
merchant_namestringrequired
collection_codestring, nullableoptional
childrenarray of objectoptional

Collect children of a £0 mixed order (empty/absent for a normal order).

8 child fields
order_idstringrequired
order_numberstringrequired
order_typestringrequired
collection_codestring, nullablerequired
fulfilment_statusstringrequired
prep_minutesnumber, nullablerequired
requested_collection_atstring, nullablerequired
total_pencenumber, nullablerequired
curl -X POST "https://www.membber.com/api/v1/orders" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_code": "EXAMPLE10",
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "idempotency_key": "1f0e2d3c-4b5a-4678-9abc-def012345678",
    "items": [
      {
        "menu_item_id": "ca65a6e7-0000-4000-8000-d0c5000000ca",
        "quantity": 1
      }
    ]
  }'
Response, 200
{
  "order_id": "4991ffac-0000-4000-8000-d0c500000049",
  "order_number": "<order_number>",
  "status": "<status>",
  "requires_payment": true,
  "client_secret": "<client_secret>",
  "ephemeral_key": "<ephemeral_key>",
  "stripe_customer_id": "847b302a-0000-4000-8000-d0c500000084",
  "connected_account_id": "231b6f63-0000-4000-8000-d0c500000023",
  "payment_intent_id": "0b6642a5-0000-4000-8000-d0c50000000b",
  "amount_pence": 1500,
  "currency": "GBP",
  "merchant_name": "<merchant_name>",
  "collection_code": "EXAMPLE10",
  "children": [
    {
      "order_id": "4991ffac-0000-4000-8000-d0c500000049",
      "order_number": "<order_number>",
      "order_type": "<order_type>",
      "collection_code": "EXAMPLE10",
      "fulfilment_status": "<fulfilment_status>",
      "prep_minutes": 1,
      "requested_collection_at": "<requested_collection_at>",
      "total_pence": 1500
    }
  ]
}

Get one Order & Collect order by id.

Merchant fetches a single order (items, fulfilment state, totals). Store-scoped, a store cannot read another store's order (returns 404).

Parameters

orderIdstringpathrequired
store_idstring · uuidqueryrequired

Store the order belongs to (also authorises the merchant).

Response, 200

orderobjectrequired

A guest order row (Order & Collect).

11 child fields
idstringrequired
store_idstringrequired
order_typestringrequired
fulfilment_statusstring, nullableoptional
collection_codestring, nullableoptional
collection_modestring, nullableoptional
requested_collection_atstring, nullableoptional
accepted_atstring, nullableoptional
preparing_atstring, nullableoptional
ready_atstring, nullableoptional
collected_atstring, nullableoptional
curl -G "https://www.membber.com/api/v1/orders/b80cf509-0000-4000-8000-d0c5000000b8" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "order": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "order_type": "<order_type>",
    "fulfilment_status": "<fulfilment_status>",
    "collection_code": "EXAMPLE10",
    "collection_mode": "<collection_mode>",
    "requested_collection_at": "<requested_collection_at>",
    "accepted_at": "<accepted_at>",
    "preparing_at": "<preparing_at>",
    "ready_at": "<ready_at>",
    "collected_at": "<collected_at>"
  }
}

Advance an Order & Collect order's fulfilment state.

Staff transition of a collect order: accepted → preparing → ready → collected, or cancelled. Backed by the idempotent advance_order_fulfilment RPC (single writer; outbox event in same tx).

Parameters

orderIdstringpathrequired

Request body

store_idstring · uuidrequired

Store that owns the order.

to_statusenumrequired

Target fulfilment state.

acceptedpreparingreadycollectedcancelled

Response, 200

orderobjectrequired

A guest order row (Order & Collect).

11 child fields
idstringrequired
store_idstringrequired
order_typestringrequired
fulfilment_statusstring, nullableoptional
collection_codestring, nullableoptional
collection_modestring, nullableoptional
requested_collection_atstring, nullableoptional
accepted_atstring, nullableoptional
preparing_atstring, nullableoptional
ready_atstring, nullableoptional
collected_atstring, nullableoptional
curl -X PATCH "https://www.membber.com/api/v1/orders/b80cf509-0000-4000-8000-d0c5000000b8/fulfilment" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "to_status": "accepted"
  }'
Response, 200
{
  "order": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "order_type": "<order_type>",
    "fulfilment_status": "<fulfilment_status>",
    "collection_code": "EXAMPLE10",
    "collection_mode": "<collection_mode>",
    "requested_collection_at": "<requested_collection_at>",
    "accepted_at": "<accepted_at>",
    "preparing_at": "<preparing_at>",
    "ready_at": "<ready_at>",
    "collected_at": "<collected_at>"
  }
}

Record an Order & Collect delay and notify the customer of the new time.

Staff records that a collect order is running late (delayMinutes) or sets an explicit newReadyAt, with an optional note. Persists a revised ETA on the order (never the actual ready_at or the booked slot), then notifies the customer on the existing channels: push for a linked customer, email fallback for a guest. Writes an append-only order_status_events audit row (kind running_late). Not money-moving; a short per-order dedupe window keeps a double-tap from spamming.

Parameters

orderIdstringpathrequired

Request body

store_idstring · uuidrequired

Store that owns the order (also authorises the merchant).

delayMinutesintegeroptional

Minutes the order is running late (1-480). New ETA = current ETA + this.

newReadyAtstring · date-timeoptional

Explicit new expected ready/collection time (ISO 8601). Overrides delayMinutes.

notestring, nullableoptional

Optional short merchant message shown to the customer with the new time.

Response, 200

okbooleanrequired
newEtastring, nullablerequired
notifiedenumrequired
pushemailnone
channel_detailstringoptional
curl -X POST "https://www.membber.com/api/v1/orders/b80cf509-0000-4000-8000-d0c5000000b8/notify-delay" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066"
  }'
Response, 200
{
  "ok": true,
  "newEta": "<newEta>",
  "notified": "push",
  "channel_detail": "<channel_detail>"
}

Refund an order (full or partial).

Staff-initiated refund. Validates the refund window + amount, then creates a Stripe refund, idempotent via a Stripe idempotency key derived from order + refund_attempt_id (a retry of the same tap never double-refunds, while two distinct taps with distinct ids each go through). Reverses loyalty + promo on a full refund.

Parameters

orderIdstringpathrequired

Request body

store_idstring · uuidrequired
reasonstringrequired

Why the order is being refunded (audited).

amount_penceinteger, nullableoptional

Partial refund amount in pence; omit/null for a full refund.

refund_attempt_idstring · uuid, nullableoptional

Optional UUID for ONE merchant refund tap. A fresh id per tap makes two legitimate equal-amount/equal-reason refunds distinct; a retry of the same tap (same id) safely dedups via the Stripe idempotency key.

Response, 200

refundobjectrequired
3 child fields
idstringrequired
statusstring, nullablerequired
amountnumberrequired
curl -X POST "https://www.membber.com/api/v1/orders/b80cf509-0000-4000-8000-d0c5000000b8/refund" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "reason": "Added at the front desk"
  }'
Response, 200
{
  "refund": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "status": "<status>",
    "amount": 1500
  }
}

Set an Order & Collect order's business status (ready / fulfilled / cancelled).

Staff transition of the merchant status axis: ready, fulfilled, or cancelled. Backed by the idempotent updateGuestOrderStatus service (noop on a same-status repeat; store-scoped transition guard). Writes a store_payment_audit_logs row, bridges buy_now status changes onto the order_status_events outbox so the customer is notified, and releases slot + stock holds on cancel. Not money-moving (a refund is refundOrder).

Parameters

orderIdstringpathrequired

Request body

store_idstring · uuidrequired

Store that owns the order (also authorises the merchant).

statusenumrequired

Target business status: ready, fulfilled, or cancelled.

readyfulfilledcancelled
notestring, nullableoptional

Optional staff note, stored on the status change + audit row.

Response, 200

orderobjectrequired
6 child fields
idstringrequired
store_idstringrequired
statusstring, nullableoptional
order_typestring, nullableoptional
fulfilled_atstring, nullableoptional
cancelled_atstring, nullableoptional
curl -X PATCH "https://www.membber.com/api/v1/orders/b80cf509-0000-4000-8000-d0c5000000b8/status" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "status": "ready"
  }'
Response, 200
{
  "order": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "status": "<status>",
    "order_type": "<order_type>",
    "fulfilled_at": "<fulfilled_at>",
    "cancelled_at": "<cancelled_at>"
  }
}

Move an order to an earlier collection time (customer accepts early collection).

For an order that is ready before its booked slot, moves it onto an earlier open slot. Atomic and first-come-first-served: a full slot returns SLOT_JUST_FILLED (409) and the order keeps its original time; a slot that is not actually earlier returns NOT_EARLIER (400). Idempotent on the same slot.

Request body

store_idstring · uuidrequired

Store that owns the order (also part of the ownership check).

order_idstring · uuidrequired

The customer’s own order to move earlier.

slot_idstring · uuidrequired

The earlier, open collection slot to move onto.

Response, 200

to_slot_idstringrequired

The slot the order now holds.

requested_collection_atstringrequired

The new collection instant (ISO 8601, UTC).

orders_remaininginteger, nullablerequired

Places still free in the new slot, or null when it is uncapped.

curl -X POST "https://www.membber.com/api/v1/orders/collect-earlier" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "order_id": "4991ffac-0000-4000-8000-d0c500000049",
    "slot_id": "820a5efc-0000-4000-8000-d0c500000082"
  }'
Response, 200
{
  "to_slot_id": "098d6938-0000-4000-8000-d0c500000009",
  "requested_collection_at": "<requested_collection_at>",
  "orders_remaining": -9007199254740991
}

Confirm a native order after the payment sheet succeeds.

Resolves the order by PaymentIntent id, verifies ownership + the PI on the platform account, then runs the idempotent reconcile (mark paid + ledger + loyalty award). Safe alongside the Stripe webhook.

Request body

store_idstring · uuidrequired
payment_intent_idstringrequired

The PaymentIntent the sheet reported as succeeded.

Response, 200

order_idstringrequired
order_numberstringrequired
statusstringrequired
total_pencenumber, nullablerequired
currencystring, nullablerequired
subtotal_pencenumber, nullableoptional
discount_pencenumber, nullableoptional
promo_discount_pencenumber, nullableoptional
voucher_discount_pencenumber, nullableoptional
applied_promo_codestring, nullableoptional
applied_promo_labelstring, nullableoptional
payment_intent_idstringrequired
order_typestringrequired
collection_codestring, nullablerequired
fulfilment_statusstringrequired
prep_minutesnumber, nullablerequired
collection_modestring, nullableoptional
requested_collection_atstring, nullableoptional
loyalty_awardedbooleanoptional
stamps_addednumberoptional
stamp_countnumberoptional
goalnumberoptional
voucher_mintedbooleanoptional
reward_titlestring, nullableoptional
is_first_orderbooleanoptional
reward_unlock_messagestring, nullableoptional
welcome_messagestring, nullableoptional
childrenarray of objectoptional

Collect children of a mixed order (empty/absent for a normal order).

8 child fields
order_idstringrequired
order_numberstringrequired
order_typestringrequired
collection_codestring, nullablerequired
fulfilment_statusstringrequired
prep_minutesnumber, nullablerequired
requested_collection_atstring, nullablerequired
total_pencenumber, nullablerequired
curl -X POST "https://www.membber.com/api/v1/orders/confirm" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "payment_intent_id": "0b6642a5-0000-4000-8000-d0c50000000b"
  }'
Response, 200
{
  "order_id": "4991ffac-0000-4000-8000-d0c500000049",
  "order_number": "<order_number>",
  "status": "<status>",
  "total_pence": 1500,
  "currency": "GBP",
  "subtotal_pence": 1500,
  "discount_pence": 1500,
  "promo_discount_pence": 1500,
  "voucher_discount_pence": 1500,
  "applied_promo_code": "EXAMPLE10",
  "applied_promo_label": "<applied_promo_label>",
  "payment_intent_id": "0b6642a5-0000-4000-8000-d0c50000000b",
  "order_type": "<order_type>",
  "collection_code": "EXAMPLE10",
  "fulfilment_status": "<fulfilment_status>",
  "prep_minutes": 1,
  "collection_mode": "<collection_mode>",
  "requested_collection_at": "<requested_collection_at>",
  "loyalty_awarded": true,
  "stamps_added": 1,
  "stamp_count": 1,
  "goal": 1,
  "voucher_minted": true,
  "reward_title": "<reward_title>",
  "is_first_order": true,
  "reward_unlock_message": "Added at the front desk",
  "welcome_message": "Added at the front desk",
  "children": [
    {
      "order_id": "4991ffac-0000-4000-8000-d0c500000049",
      "order_number": "<order_number>",
      "order_type": "<order_type>",
      "collection_code": "EXAMPLE10",
      "fulfilment_status": "<fulfilment_status>",
      "prep_minutes": 1,
      "requested_collection_at": "<requested_collection_at>",
      "total_pence": 1500
    }
  ]
}
WhatsApp
Book a Call
Start Free