API referenceBusiness

Business

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

Start renewing a lapsed store: mint a SetupIntent for the PaymentSheet.

For a lapsed store (billing_status=suspended, prior_paid_tier=club|vip), mints a Stripe SetupIntent + ephemeral key so the native PaymentSheet can collect a card. Fails closed on an unconfigured price/key, a non-lapsed store, a gym tier (separate slice), or a still-live subscription (update the card instead). No charge here.

Request body

store_idstring · uuidrequired

The lapsed store to renew (also authorises the caller).

Response, 200

modestringrequired

Always "checkout", the client presents the native PaymentSheet.

client_secretstringrequired

SetupIntent client secret for the PaymentSheet (SETUP mode).

ephemeral_key_secretstringrequired

Customer ephemeral key secret for the PaymentSheet.

customer_idstringrequired

The platform Stripe customer id.

publishable_keystringrequired

Stripe publishable key for the PaymentSheet.

setup_intent_idstringrequired

The SetupIntent id, echoed back to /complete.

tierstringrequired

The standard tier being renewed (club | vip).

price_pencenumberrequired

The monthly price in pence, for the confirm copy.

curl -X POST "https://www.membber.com/api/v1/business/billing/resubscribe/begin" \
  -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
{
  "mode": "<mode>",
  "client_secret": "<client_secret>",
  "ephemeral_key_secret": "<ephemeral_key_secret>",
  "customer_id": "96607d1c-0000-4000-8000-d0c500000096",
  "publishable_key": "<publishable_key>",
  "setup_intent_id": "fab3625c-0000-4000-8000-d0c5000000fa",
  "tier": "<tier>",
  "price_pence": 1500
}

Finish a renewal after the PaymentSheet confirms: create the sub + reactivate.

After the card is confirmed client-side, creates the standard-tier subscription (error_if_incomplete → the first invoice is charged now), guards the first charge (activates nothing on a decline), and reactivates the store to its prior paid tier (clearing prior_paid_tier so the renew banner disappears). Idempotent: reuses a sub created from this SetupIntent OR an already-paying sub for this tier, so a concurrent tap / retry never double-charges.

Request body

store_idstring · uuidrequired

The lapsed store to renew (also authorises the caller).

setup_intent_idstringrequired

The SetupIntent id returned by /begin, now card-confirmed.

Response, 200

statusstringrequired

The store is back on its paid plan.

subscription_idstringrequired

The new (or reused) Stripe subscription id.

tierstringrequired

The tier reactivated (club | vip).

curl -X POST "https://www.membber.com/api/v1/business/billing/resubscribe/complete" \
  -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",
    "setup_intent_id": "fab3625c-0000-4000-8000-d0c5000000fa"
  }'
Response, 200
{
  "status": "<status>",
  "subscription_id": "ac6da77d-0000-4000-8000-d0c5000000ac",
  "tier": "<tier>"
}

List a store's special events.

Merchant fetches their special events (one-off workshops, seminars, competitions, open days) for the store, ordered by event date ascending. Active events only by default; pass include_inactive=true to include inactive ones.

Parameters

store_idstring · uuidqueryrequired

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

include_inactivestringqueryoptional

Pass 'true' to include inactive (unpublished/archived) events. Defaults to active only.

Response, 200

eventsarray of objectrequired
17 child fields
idstringrequired
store_idstringrequired
namestringrequired
descriptionstring, nullablerequired
event_datestringrequired
start_timestringrequired
end_timestring, nullablerequired
locationstring, nullablerequired
price_pencenumberrequired
currencystringrequired
max_capacitynumber, nullablerequired
is_members_onlybooleanrequired
is_activebooleanrequired
image_urlstring, nullablerequired
created_bystring, nullablerequired
created_atstringrequired
updated_atstringrequired
curl -G "https://www.membber.com/api/v1/business/events" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "events": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "store_id": "6659c139-0000-4000-8000-d0c500000066",
      "name": "Example name",
      "description": "Added at the front desk",
      "event_date": "<event_date>",
      "start_time": "<start_time>",
      "end_time": "<end_time>",
      "location": "<location>",
      "price_pence": 1500,
      "currency": "GBP",
      "max_capacity": 1,
      "is_members_only": true,
      "is_active": true,
      "image_url": "https://example.com/image.jpg",
      "created_by": "<created_by>",
      "created_at": "<created_at>",
      "updated_at": "<updated_at>"
    }
  ]
}
WhatsApp
Book a Call
Start Free