Baskets

Create a membership order

Creates a new basket for the membership purchase and produces the Membership against the given customer. Use this when the storefront has already collected the membership type, rate and target customer and you want to skip straight to a payment-ready basket.

The returned Membership will be in reserved state — call the customer-side confirmMembership endpoint once the basket is paid to activate it.

post/shop/memberships

Request body

customer_idstring uuid required

The customer the membership is being purchased for.

site_idstring uuid required

The site the membership belongs to.

membership_type_idstring uuid required

The MembershipType being purchased.

membership_rate_idstring uuid required

The chosen MembershipRate within the type.

start_datestring date

The date the membership should start, as YYYY-MM-DD. Defaults to today when omitted.

end_datestring date nullable

The date the membership should end, as YYYY-MM-DD. Omit (or pass null) for evergreen memberships that run until cancelled.

payment_method_idstring nullable

Optional ID of a payment method already on file for the customer. When provided it must reference a payment method belonging to customer_id; pass null (or omit) to skip attaching one at order-creation time.

source'self_signup' | 'app' | 'import'

Where the membership purchase originated. self_signup indicates the public self-signup flow, app indicates the back-office app, and import is reserved for bulk imports.

external_refstring nullable

Optional external reference for the membership purchase (e.g. an ID from a PMS or partner system).

Example request

{
  "customer_id": "00000000-0000-0000-0000-444444444444",
  "site_id": "00000000-0000-0000-0000-111111111111",
  "membership_type_id": "00000000-0000-0000-0000-222222222222",
  "membership_rate_id": "00000000-0000-0000-0000-333333333333",
  "start_date": "2026-07-28",
  "end_date": "2027-07-28",
  "payment_method_id": "5e1e3f6c-2a44-4f6e-8c61-9c1f7d2e1c11",
  "external_ref": "PMS-2026-08-12345"
}

Response

The membership order was successfully created.

Example response

{
  "data": {
    "customer": {
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "last_check_in": {
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "file_name": "super-cool-photo.jpg",
        "mime_type": "image/jpeg",
        "original_url": "https://example.com/media/super-cool-photo.jpg",
        "size": 84256,
        "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
      },
      "external_ref": "ext-cust-789012"
    },
    "members": [
      {
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_charge": {
      "amount": 3995,
      "currency": "GBP"
    },
    "payment_method": {
      "status": "revoked",
      "card_brand": "amex"
    },
    "rate": {
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "default_duration": "P1Y",
      "notice_period": "P1M",
      "private": true
    },
    "type": {
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "default_duration": "P1Y",
          "notice_period": "P1M",
          "private": true
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY"
    }
  }
}

Changes