API referenceStore closure

Store closure

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

Lift the stop and trade again.

Clears today's closed override and un-pauses collect. Deliberately does NOT un-refund anything: the money has gone back and the customers have been told.

Parameters

store_idstring · uuidqueryoptional

Response, 200

reopenedbooleanrequired
curl -X DELETE "https://www.membber.com/api/v1/store-closure" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"
Response, 200
{
  "reopened": true
}

Preview an emergency close, and read any closure already running.

Real computed numbers for the 'we can't trade' confirm sheet, how many orders, how much money, how many PEOPLE to tell and on what channel, plus the progress of a closure already in flight.

Parameters

store_idstring · uuidqueryoptional

Response, 200

previewobjectrequired

Real computed numbers for the close-now confirm sheet. Never an estimate.

8 child fields
scope_datestringrequired

The store-LOCAL day the closure covers. Tomorrow is never affected.

ordersnumberrequired

Paid orders still holding money that are due on that day.

amount_pencenumberrequired

Total still owed back across those orders.

recipients_totalnumberrequired

Distinct PEOPLE to tell, one apology each, however many orders they hold.

recipients_pushnumberrequired
recipients_emailnumberrequired
recipients_unreachablenumberrequired

Guests with neither an account nor an email. Recorded honestly, never silently dropped.

samplearray of stringrequired

First names of the first few affected people, so the merchant sees real people before committing.

closureobjectrequired

The live closure, or null when the store is trading normally. Survives the app being closed.

14 child fields
idstringrequired
reason_codestringrequired
merchant_messagestring, nullablerequired
scope_datestringrequired
statusstringrequired

stopping | refunding | notifying | complete | reopened

refunds_authorisedbooleanrequired

False when the person who stopped trading lacks can_process_payments, trade halts immediately, refunds wait for someone who may move money.

orders_totalnumberrequired
orders_refundednumberrequired
orders_failednumberrequired
amount_total_pencenumberrequired
amount_refunded_pencenumberrequired
recipients_totalnumberrequired
recipients_notifiednumberrequired
opened_atstringrequired
curl -G "https://www.membber.com/api/v1/store-closure" \
  -H "Authorization: Bearer $MEMBBER_TOKEN"
Response, 200
{
  "preview": {
    "scope_date": "<scope_date>",
    "orders": 1,
    "amount_pence": 1500,
    "recipients_total": 1,
    "recipients_push": 1,
    "recipients_email": 1,
    "recipients_unreachable": 1,
    "sample": [
      "<sample>"
    ]
  },
  "closure": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "reason_code": "Added at the front desk",
    "merchant_message": "Added at the front desk",
    "scope_date": "<scope_date>",
    "status": "<status>",
    "refunds_authorised": true,
    "orders_total": 1,
    "orders_refunded": 1,
    "orders_failed": 1,
    "amount_total_pence": 1500,
    "amount_refunded_pence": 1500,
    "recipients_total": 1,
    "recipients_notified": 1,
    "opened_at": "<opened_at>"
  }
}

Stop trading now, refund everyone affected, and tell them.

One durable job: pauses the store for the rest of the store-local day (both take-now and collect), snapshots every paid order still holding money, refunds each one, and sends ONE apology per person. Stopping is a safety action any staff member may take; refunding requires can_process_payments, and when the actor lacks it the refunds stay queued rather than blocking the stop.

Request body

store_idstring · uuidoptional
reason_codeenumrequired
equipment_failurestaff_unavailablepower_or_watersold_outweatheremergencyother
messagestring, nullableoptional

The merchant's own words, shown verbatim to affected customers and on the storefront.

Response, 200

closure_idstringrequired
resumedbooleanrequired

True when a closure was already running, a second tap resumes it, never forks the work.

refunds_authorisedbooleanrequired
previewobjectrequired

Real computed numbers for the close-now confirm sheet. Never an estimate.

8 child fields
scope_datestringrequired

The store-LOCAL day the closure covers. Tomorrow is never affected.

ordersnumberrequired

Paid orders still holding money that are due on that day.

amount_pencenumberrequired

Total still owed back across those orders.

recipients_totalnumberrequired

Distinct PEOPLE to tell, one apology each, however many orders they hold.

recipients_pushnumberrequired
recipients_emailnumberrequired
recipients_unreachablenumberrequired

Guests with neither an account nor an email. Recorded honestly, never silently dropped.

samplearray of stringrequired

First names of the first few affected people, so the merchant sees real people before committing.

closureobjectrequired

The live closure, or null when the store is trading normally. Survives the app being closed.

14 child fields
idstringrequired
reason_codestringrequired
merchant_messagestring, nullablerequired
scope_datestringrequired
statusstringrequired

stopping | refunding | notifying | complete | reopened

refunds_authorisedbooleanrequired

False when the person who stopped trading lacks can_process_payments, trade halts immediately, refunds wait for someone who may move money.

orders_totalnumberrequired
orders_refundednumberrequired
orders_failednumberrequired
amount_total_pencenumberrequired
amount_refunded_pencenumberrequired
recipients_totalnumberrequired
recipients_notifiednumberrequired
opened_atstringrequired
curl -X POST "https://www.membber.com/api/v1/store-closure" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "reason_code": "equipment_failure"
  }'
Response, 200
{
  "closure_id": "a171799f-0000-4000-8000-d0c5000000a1",
  "resumed": true,
  "refunds_authorised": true,
  "preview": {
    "scope_date": "<scope_date>",
    "orders": 1,
    "amount_pence": 1500,
    "recipients_total": 1,
    "recipients_push": 1,
    "recipients_email": 1,
    "recipients_unreachable": 1,
    "sample": [
      "<sample>"
    ]
  },
  "closure": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "reason_code": "Added at the front desk",
    "merchant_message": "Added at the front desk",
    "scope_date": "<scope_date>",
    "status": "<status>",
    "refunds_authorised": true,
    "orders_total": 1,
    "orders_refunded": 1,
    "orders_failed": 1,
    "amount_total_pence": 1500,
    "amount_refunded_pence": 1500,
    "recipients_total": 1,
    "recipients_notified": 1,
    "opened_at": "<opened_at>"
  }
}
WhatsApp
Book a Call
Start Free