Memberships

A Membership represents a membership belonging to one or more Customers.

Schema

Attributes

  • The ID of the membership

  • A string describing what kind of action needs to take place

    Possible values are no_mandate, setup_unpaid, mandate_revoked, payment_failed, payment_disputed, payment_outstanding and site_id

  • The basket ID which was used to purchase this membership, if applicable.

  • end_date
    Nullable

    The date which the membership ends

  • An external reference for this membership.

  • The unique membership number of the lead member. This is always a 10 digit numeric string. Since this field only relates to the lead member, this is now deprecated. Instead, find the membership for the relevant customer in the members array.

  • The date which the membership will next be billed

  • next_charge
    Nullable

    A summary of the next charge that's due for this membership.

    This property is only populated when the membership was retrieved using the `getCustomerMemberships endpoint.

  • Details about the payment method attached to this membership. This payment method is used to take payment on the monthly billing period. If a payment method hasn't been set up, this will be null.

  • The ID of the site this membership belongs to

  • Where the membership was created

    Possible values are self_signup, app, import and unknown

  • The date which the membership starts

  • Possible values are active, needs_dd_mandate, needs_attention, reserved, inactive, expired and upcoming

  • A URL to a page where the member can provide their payment details.

  • The datetime which the membership was created

""
listMemberships

List Memberships

This endpoint lists the Memberships which are associated to the provided site.

Query parameters

  • Filters memberships belonging to the specified customer

  • page
    Optional

    The page to retrieve results from

  • per_page
    Optional

    The number of results to return per page

Responses

  • 200

    The Memberships were successfully retrieved

GET/customers/memberships
200
example response
{
  "data": [
    {
      "id": "7bdea71d-fc7c-8ff7-4871-f518d01af616",
      "attention_reason": "payment_failed",
      "basket_id": "69c4fd5bfb12f4014800009e",
      "customer": {
        "id": "2d9fd71d-4260-e01e-c9aa-66bc9e91e432",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1898-11-04",
        "brand_id": "6537ff4f-1051-9c21-a6bb-8e7b31fccf11",
        "site_id": "c5e72e71-168a-8579-9839-df8b203a6eff",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "b4996b54-5975-b5c4-01ac-3003aa38589a",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "8bb6cd68-dcfe-0a95-81a6-84315422acae",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "58297797-3b27-e653-7f51-17252147ab6b",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "cc8514aa-e27e-554b-778f-9b6510726880",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1896-01-01T11:04:30.0Z",
        "created_at": "1893-12-13T21:20:14.0Z",
        "updated_at": "1925-07-10T14:20:48.0Z",
        "deleted_at": "1961-08-02T03:11:47.0Z",
        "last_active_at": "1896-05-04T18:48:01.0Z",
        "email_verified_at": "1894-06-18T07:28:02.0Z",
        "last_check_in": {
          "checked_in_at": "1914-04-27T20:49:42.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "1bfb7a0c-2847-2dca-a4d8-4b4339093e88",
          "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": "cillum anim non in"
      },
      "end_date": "1968-09-22T09:38:26.0Z",
      "external_ref": "dolor proident",
      "members": [
        {
          "customer_id": "0187e5c2-280b-4360-2314-5cc88df8ee36",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "0b7daad3-802f-ee30-ab62-44b1fbf807dc",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1907-03-21T16:29:43.0Z",
      "next_charge": {
        "id": "2f6aa4a5-3b9f-77c3-e4ee-6fb25a8daa27",
        "amount": 3995,
        "currency": "GBP",
        "status": "errored",
        "billing_period_from": "1900-11-20",
        "billing_period_to": "1952-09-01"
      },
      "payment_method": {
        "id": "voluptate",
        "type": "card",
        "last_4": "culpa ullamco"
      },
      "rate": {
        "id": "5329ac45-9245-a26f-3dd5-d7ea527652c1",
        "membership_type_id": "8fd339a4-50b1-be61-4dff-9cca6e01816c",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "culpa eiusmod laboris in",
          "cillum cupidatat",
          "dolore deserunt quis culpa",
          "consequat Excepteur ut",
          "ut ea fugiat"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1937-02-08T21:17:01.0Z",
        "updated_at": "1910-07-19T22:42:31.0Z"
      },
      "site_id": "c14192a6-af05-a744-0c3e-cd56c87f88f0",
      "source": "app",
      "start_date": "1962-05-01T11:49:06.0Z",
      "status": "upcoming",
      "status_updated_at": "1931-02-08T20:17:20.0Z",
      "type": {
        "id": "e9f8168b-1894-513f-911c-be094282f2d0",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "dolore officia culpa dolore id",
        "brand_id": "517757a2-505c-7da6-3efa-9305b5b21980",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1900-08-08T01:01:34.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1957-10-12T03:30:45.0Z",
        "updated_at": "1949-04-12T09:25:16.0Z",
        "deleted_at": "1919-05-10T22:57:52.0Z"
      },
      "payment_details_url": "occaecat mollit minim eu",
      "created_at": "1954-05-16T11:20:12.0Z"
    },
    {
      "id": "93c73138-7845-b37c-daec-2b1c7b555496",
      "attention_reason": "payment_failed",
      "basket_id": "69c4fd5bfb12f4014800009f",
      "customer": {
        "id": "aa848cff-9a2b-2b70-e8a2-a9d6059deca3",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1922-06-20",
        "brand_id": "15cdd041-da19-1ba2-0fd1-8b7d9b8a2114",
        "site_id": "5ef0ffd7-de9a-88e8-c945-119bd9bae152",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "88ed5628-6e3f-145b-c47a-6921fc188a2d",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "469ff2f4-63ed-c951-89f6-23efdf4c0990",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "e95819df-947a-907c-888a-6a1a1648513d",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "50332f85-0f25-a6b5-7e06-2619e3250334",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1896-03-26T06:26:46.0Z",
        "created_at": "1897-11-03T01:41:59.0Z",
        "updated_at": "1941-04-16T01:57:24.0Z",
        "deleted_at": "1960-05-10T03:42:23.0Z",
        "last_active_at": "1933-05-18T03:07:57.0Z",
        "email_verified_at": "1967-12-06T16:50:47.0Z",
        "last_check_in": {
          "checked_in_at": "1915-07-14T12:14:56.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "ef9357dd-c8a5-6df1-d780-10cf4c109fd0",
          "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": "non dolor"
      },
      "end_date": "1921-01-27T10:52:43.0Z",
      "external_ref": "proident exercitation",
      "members": [
        {
          "customer_id": "ae1c687c-0b8a-e807-b98c-16a0ff8a56db",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "62b084a7-ad48-30c5-ea24-c2b1fbef5938",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "da219c98-4c96-fd4d-7f3b-db76f8b07c79",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "48d587f1-0063-8878-bd19-a7e232f99194",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "c9ed1465-875c-3f31-7d6c-e5f6906d9319",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1901-02-14T21:15:13.0Z",
      "next_charge": {
        "id": "5d779bd0-1cd2-3cc4-fce1-217192859bf0",
        "amount": 3995,
        "currency": "GBP",
        "status": "errored",
        "billing_period_from": "1958-05-11",
        "billing_period_to": "1897-03-19"
      },
      "payment_method": {
        "id": "dolore quis fugiat sint anim"
      },
      "rate": {
        "id": "dd5015ca-b35c-f6e6-d3d0-1c1ebc660dbf",
        "membership_type_id": "964b3c1c-7c43-3d30-5f34-ec84cc0691ce",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "deserunt laborum irure",
          "laboris id dolor velit amet",
          "in",
          "sunt voluptate ipsum sint Excepteur",
          "Lorem"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1921-05-30T14:51:54.0Z",
        "updated_at": "1938-08-09T22:01:18.0Z"
      },
      "site_id": "f757ee32-c50b-d7b2-69a3-592c1a59d6c4",
      "source": "unknown",
      "start_date": "1932-05-23T20:16:01.0Z",
      "status": "upcoming",
      "status_updated_at": "1899-05-20T04:20:39.0Z",
      "type": {
        "id": "51dacdbf-84e8-bad2-ccfa-dc7313e0258e",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "ea occaecat dolor mollit veniam",
        "brand_id": "606b3f59-3731-cce7-e570-c680b7f27c36",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1891-10-19T21:04:01.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1908-11-19T05:44:11.0Z",
        "updated_at": "1922-10-06T14:05:38.0Z",
        "deleted_at": "1910-06-19T07:50:33.0Z"
      },
      "payment_details_url": "nostrud do",
      "created_at": "1963-01-25T15:26:23.0Z"
    },
    {
      "id": "cec1196e-f96a-92f7-8f67-c297c4e7bd36",
      "attention_reason": "payment_disputed",
      "basket_id": "69c4fd5bfb12f401480000a0",
      "customer": {
        "id": "fbf6a999-7f8a-9db8-5a7b-0c0f096202d0",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1953-10-10",
        "brand_id": "1f7ca56e-193e-44b5-89f9-da77be3cab44",
        "site_id": "3d70451c-fc95-d27e-c816-187dd94a05e0",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [],
        "preferred_locale": "en",
        "locked_at": "1933-02-28T17:53:50.0Z",
        "created_at": "1902-08-19T15:43:01.0Z",
        "updated_at": "1905-02-17T16:52:22.0Z",
        "deleted_at": "1896-04-19T13:56:09.0Z",
        "last_active_at": "1890-10-24T11:12:28.0Z",
        "email_verified_at": "1928-12-02T10:40:56.0Z",
        "last_check_in": {
          "checked_in_at": "1894-07-23T23:23:30.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "1815d799-a0a7-a3b1-223f-0355c85a5798",
          "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": "do cillum"
      },
      "end_date": "1901-05-03T12:21:34.0Z",
      "external_ref": "Lorem minim adipisicing do",
      "members": [
        {
          "customer_id": "bd17f57c-b168-4011-3bdb-11a5ce925ee9",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "5a2d0315-34ce-6de8-cf09-f18e44b496e5",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "dd651036-8a6b-378c-49e9-ebc2382271ca",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1899-04-17T23:52:53.0Z",
      "next_charge": {
        "id": "81813994-fc70-beed-8e2b-1274af47612c",
        "amount": 3995,
        "currency": "GBP",
        "status": "processing",
        "billing_period_from": "1964-02-18",
        "billing_period_to": "1947-02-17"
      },
      "payment_method": {
        "id": "sit adipisicing minim nostrud",
        "type": "direct_debit",
        "last_4": "minim tempor velit non",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "627d8b72-fa09-6812-3c75-9eeeed81e584",
        "membership_type_id": "ce7ab6eb-be49-e7bd-97c4-19fdc8a166f8",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "reprehenderit dolore cillum Ut",
          "magna in"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1910-05-24T22:43:02.0Z",
        "updated_at": "1928-06-21T10:22:51.0Z"
      },
      "site_id": "2946f50c-90c0-c0f2-6415-fc8b04375977",
      "source": "app",
      "start_date": "1910-03-26T07:43:15.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1920-02-03T01:49:06.0Z",
      "type": {
        "id": "6e9de62f-2c7b-b2e0-d819-6018057ea9ae",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "velit dolore occaecat eiusmod",
        "brand_id": "2588aa91-34fc-7660-a9a7-66808240f7d4",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1923-12-18T18:48:10.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "61aeb839-8c5a-215f-1538-f91dfc0eb301",
            "membership_type_id": "5687aa71-43ed-cc95-9076-6e90d25e74f4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "eiusmod laborum dolore et",
              "ut",
              "dolor Lorem",
              "minim"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1953-09-18T21:24:53.0Z",
            "updated_at": "1904-10-08T08:20:16.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1906-05-13T20:19:12.0Z",
        "updated_at": "1916-09-15T11:44:31.0Z",
        "deleted_at": "1921-12-02T22:11:02.0Z"
      },
      "payment_details_url": "cupidatat",
      "created_at": "1951-11-29T13:43:20.0Z"
    },
    {
      "id": "c7fd68a4-0125-d34d-9ef5-dfdf756977f9",
      "attention_reason": "site_id",
      "basket_id": "69c4fd5bfb12f401480000a1",
      "customer": {
        "id": "6bfc896c-41dc-3aeb-8de6-f8d09f544e87",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1940-05-15",
        "brand_id": "8a1b01e6-e364-d025-9e01-dec141f4b66e",
        "site_id": "cead35b8-4294-8a21-2f95-963f311f8a1b",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "56e78fe8-e683-6668-cce0-31635f674504",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1907-02-16T14:08:30.0Z",
        "created_at": "1968-09-08T09:52:14.0Z",
        "updated_at": "1965-09-01T11:36:59.0Z",
        "deleted_at": "1922-11-15T11:28:47.0Z",
        "last_active_at": "1935-04-25T12:38:19.0Z",
        "email_verified_at": "1929-06-08T20:54:01.0Z",
        "last_check_in": {
          "checked_in_at": "1955-12-07T02:01:52.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "c8e01295-a8f4-1d5e-b955-57041f102170",
          "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": "labore amet consequat"
      },
      "end_date": "1945-02-15T02:26:23.0Z",
      "external_ref": "magna",
      "members": [
        {
          "customer_id": "89026bb9-f5df-739c-30cf-b24be5e6f3c9",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "18972914-4fbd-3e49-1f6d-4134b99d7b36",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "a55bc6db-869d-83d3-7470-e8012271f65b",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "3a97d07e-47c6-aa83-c29a-a5d9e1bbad6b",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "70c44690-825f-cb1e-1d29-028843d3ae96",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1925-11-09T04:59:41.0Z",
      "next_charge": {
        "id": "dd0d297c-9df2-485c-79c6-fea5be5bb22b",
        "amount": 3995,
        "currency": "GBP",
        "status": "succeeded",
        "billing_period_from": "1936-10-22",
        "billing_period_to": "1910-06-18"
      },
      "payment_method": {
        "id": "consequat Ut voluptate pariatur labore",
        "type": "card",
        "last_4": "occaecat aliqua",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "d41566af-ee8e-4c21-26c5-0e0aa635ca66",
        "membership_type_id": "20456a5e-8a13-ff71-e71d-289458980f26",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "veniam cillum"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1901-06-09T08:34:25.0Z",
        "updated_at": "1929-04-09T23:14:46.0Z"
      },
      "site_id": "54bff39b-e346-b56a-2bc9-e2d1a4f19fc8",
      "source": "import",
      "start_date": "1960-06-08T02:15:52.0Z",
      "status": "upcoming",
      "status_updated_at": "1944-04-03T06:31:16.0Z",
      "type": {
        "id": "b1829d0e-fb26-f1b2-7c95-ff14ee854d58",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "ad voluptate",
        "brand_id": "3ab42ee8-f07e-aa44-b1d6-2e0b41222eb4",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1905-12-06T10:46:24.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "2469646a-2fa6-b910-e12a-f3be44f79161",
            "membership_type_id": "27ed9542-10eb-e367-5f20-a42128e4e072",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "consectetur",
              "laboris pariatur"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1954-02-16T19:49:53.0Z",
            "updated_at": "1923-07-11T04:17:40.0Z"
          },
          {
            "id": "e74366ba-6b77-8c12-6a36-092ba960c26a",
            "membership_type_id": "ecefac9f-176b-dbba-2096-06c890f7c2bb",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "aliquip Ut officia"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1940-01-21T11:25:01.0Z",
            "updated_at": "1953-08-17T22:05:48.0Z"
          },
          {
            "id": "dd308429-097d-4df5-9a8d-60dfc478c036",
            "membership_type_id": "0e8a5a32-6203-3162-fa9c-a7549ad77718",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1927-09-30T04:08:46.0Z",
            "updated_at": "1894-10-01T12:57:08.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1899-12-07T21:39:01.0Z",
        "updated_at": "1955-12-05T12:42:20.0Z",
        "deleted_at": "1915-07-08T03:23:10.0Z"
      },
      "payment_details_url": "ut",
      "created_at": "1943-12-05T13:24:30.0Z"
    }
  ],
  "meta": {
    "from": 1,
    "to": 2,
    "total": 2,
    "current_page": 1,
    "last_page": 2,
    "per_page": 15,
    "path": "http://example.com/api"
  },
  "links": {
    "first": "http://example.com?page=1",
    "next": "https://example.com?page=3",
    "prev": "https://example.com?page=1",
    "last": "https://example.com?page=4"
  }
}
getMembership

Show a membership

Use this endpoint to retrieve a Membership by its ID.

Path parameters

Responses

  • 200

    The Membership was successfully retrieved

  • 404

    The resource couldn't be found

GET/customers/memberships/{membershipId}
200
example response
{
  "data": {
    "id": "13c1658f-d639-41ab-c146-49e9b20f174e",
    "attention_reason": "setup_unpaid",
    "basket_id": "69c4fd5bfb12f401480000a2",
    "customer": {
      "id": "088121c9-7f71-dfb4-e405-8d0e0781437b",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1961-09-09",
      "brand_id": "353479a6-0a02-a6b7-68f0-8c09e6bbeab7",
      "site_id": "fd10d684-3197-496d-d8d8-b6c5dd845471",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "1b159457-f8f7-b616-ee43-0ac12d184a80",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "360e081f-24af-3b73-394b-a6463a46da6a",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "fe3d9dc5-a05f-9010-b784-946848804a7c",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "7928215e-355f-95ef-b675-a7386a34365d",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1962-05-22T02:16:50.0Z",
      "created_at": "1910-06-29T06:43:11.0Z",
      "updated_at": "1910-06-01T10:07:41.0Z",
      "deleted_at": "1913-01-05T01:57:15.0Z",
      "last_active_at": "1954-02-07T20:40:11.0Z",
      "email_verified_at": "1935-05-06T06:17:41.0Z",
      "last_check_in": {
        "checked_in_at": "1913-02-13T01:34:31.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "9f3332d2-f2df-f3ee-f90c-69374dde4822",
        "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": "ea nostrud id dolor"
    },
    "end_date": "1957-08-11T21:09:13.0Z",
    "external_ref": "reprehenderit",
    "members": [
      {
        "customer_id": "7e39d1ab-54cd-c3c3-127d-868bde5fe569",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "2fd0a638-2bf0-6cf4-81ba-b494a8fcc063",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "6b594fd7-758f-d52e-bb15-f014ae01aac3",
        "is_lead": true,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1892-07-14T22:42:29.0Z",
    "next_charge": {
      "id": "34aa57ba-32b8-6afa-bc3f-8c52fbe821ed",
      "amount": 3995,
      "currency": "GBP",
      "status": "failed",
      "billing_period_from": "1940-10-13",
      "billing_period_to": "1940-08-31"
    },
    "payment_method": {
      "id": "quis sed adipisicing aliqua",
      "type": "card",
      "last_4": "exercitation",
      "card_brand": "amex"
    },
    "rate": {
      "id": "b6df78a6-069a-cfa1-0f89-cad8b82423bc",
      "membership_type_id": "26af8b23-90cd-d51e-a64f-775d7482df29",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1909-06-15T01:37:34.0Z",
      "updated_at": "1923-05-29T11:11:56.0Z"
    },
    "site_id": "bdabc3f6-8d09-62e8-be94-296db2eebc49",
    "source": "app",
    "start_date": "1940-09-01T10:38:03.0Z",
    "status": "inactive",
    "status_updated_at": "1968-10-03T03:57:49.0Z",
    "type": {
      "id": "f231cad5-07f8-725d-9d1f-3b3e9bd2319b",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "sed",
      "brand_id": "2cd7779d-d747-7bd9-db1c-581a77811eda",
      "offline_payments": true,
      "disable_confirmation_email": false,
      "private": true,
      "visibility": "link_only",
      "minimum_start_date": "1926-01-07T20:20:27.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "9eaae9aa-8bb0-2fe4-7d38-5c7633c3d306",
          "membership_type_id": "bcfee156-2f8d-0d43-c9b7-0b6d3d306cc2",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "reprehenderit sed",
            "laborum incididunt"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1908-10-26T02:56:54.0Z",
          "updated_at": "1959-10-25T05:46:56.0Z"
        },
        {
          "id": "d3aee7bb-25c0-635e-855b-376144f366a1",
          "membership_type_id": "d4fb1242-e0b4-14c1-c50b-b2fd6942dc45",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1892-11-26T06:54:39.0Z",
          "updated_at": "1934-12-31T12:49:49.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1894-08-19T03:23:45.0Z",
      "updated_at": "1959-01-26T08:49:47.0Z",
      "deleted_at": "1948-10-21T13:49:23.0Z"
    },
    "payment_details_url": "voluptate",
    "created_at": "1938-05-30T16:16:04.0Z"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}
actionAddMembershipChargePayment

Record a manual payment against a charge

This endpoint allows a manual (off-Trybe) payment to be recorded against a membership charge.

Path parameters

Request body

  • The ID of the custom payment type this payment should be recorded as

  • amount
    Nullable

    The amount of the payment

Responses

  • 200

    A charge against a membership.

  • 404

    The resource couldn't be found

POST/shop/membership-charges/{chargeId}/payment
200
example response
{
  "data": {
    "id": "b12688b0-c62d-4e86-c555-74b9aaf968e8",
    "membership": {
      "id": "82a79ffd-ddfc-5d28-cbf0-ee8cc2771f25",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "92b41172-962c-05b3-82f5-d2e8093b2f70"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "69c4fd5cfb12f401480002de"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "dolor ut ea",
    "can_download_receipt": true,
    "amount_refunded": 69224092,
    "refunded": false,
    "refunds": [
      {
        "id": "a127b2ee-7ebb-d5c5-b240-f50ee2f415e2",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "31bc79a2-a03d-3d1e-6111-8848eafd3f41",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1956-09-20T22:55:45.0Z",
        "updated_at": "1921-11-19T23:34:55.0Z"
      },
      {
        "id": "5933b755-679e-ed42-cd05-a585661e9b3b",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "be271eee-e490-e918-acba-7940de733daf",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1910-11-15T06:57:36.0Z",
        "updated_at": "1900-08-08T08:59:28.0Z"
      },
      {
        "id": "9e69bf05-0f45-8e00-08a9-b5b6f0083f57",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "b733b5ce-e7e0-6425-2251-565fd411e809",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1934-06-18T02:27:58.0Z",
        "updated_at": "1940-08-10T09:24:14.0Z"
      },
      {
        "id": "d03d6ece-bb12-105a-b32d-c2ffa6d07b17",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "3237abdc-dd29-2977-b144-0cd52a09c482",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1898-01-11T04:05:47.0Z",
        "updated_at": "1946-12-26T16:56:24.0Z"
      },
      {
        "id": "16407ebb-18ec-2411-a59b-240dff75bc1c",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "87ec3284-533d-afee-2e19-1a57c6641626",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1968-01-14T08:13:17.0Z",
        "updated_at": "1927-10-16T21:29:46.0Z"
      }
    ],
    "site_id": "c20bcde2-95f7-ddf7-7b96-42c700c6e0a6",
    "billing_period_from": "1926-07-12",
    "billing_period_to": "1965-01-19",
    "processing_at": "1920-03-29T02:25:28.0Z",
    "created_at": "1955-08-21T18:05:39.0Z",
    "updated_at": "1901-04-15T02:37:40.0Z"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}
actionProcessMembershipCharge

Manually process a charge for a membership

This endpoint allows a membership charge to be processed manually.

Path parameters

Responses

  • 200

    A charge against a membership.

  • 404

    The resource couldn't be found

POST/shop/membership-charges/{chargeId}/process
200
example response
{
  "data": {
    "id": "ad5f21d9-4d12-6177-2751-71a3ab290c58",
    "membership": {
      "id": "2f85d7d5-2c5d-1a69-4132-2e7f07212cdf",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "23afd9e9-993c-4590-2b67-6fc96d867146",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type_id": "69c4fd5bfb12f401480000a3"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "proident sint Ut",
    "can_download_receipt": true,
    "amount_refunded": -40918806,
    "refunded": false,
    "refunds": [
      {
        "id": "81b90a0f-e4e0-d788-84da-cff0f6e08be9",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "b7b5d8d8-2a17-7eb0-2b54-9929b57219df",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1957-08-22T18:45:15.0Z",
        "updated_at": "1905-02-11T07:45:44.0Z"
      },
      {
        "id": "2ee31fa7-bab7-bb1c-fb30-e19db7e6ff29",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1960-12-18T06:41:54.0Z",
        "updated_at": "1960-09-16T16:24:19.0Z"
      }
    ],
    "site_id": "66cd3096-8fa3-d1a3-fc4a-6468542e6bd9",
    "billing_period_from": "1906-12-31",
    "billing_period_to": "1917-01-01",
    "processing_at": "1892-03-14T08:49:09.0Z",
    "created_at": "1892-11-07T02:12:05.0Z",
    "updated_at": "1934-05-29T06:04:10.0Z"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}
actionRetryMembershipCharge

Manually retry a charge for a membership

This endpoint allows a membership charge to be retried manually.

Path parameters

Responses

  • 200

    A charge against a membership.

  • 404

    The resource couldn't be found

POST/shop/membership-charges/{chargeId}/retry
200
example response
{
  "data": {
    "id": "49b728ee-f884-51a3-9daa-3ef5102e6e86",
    "membership": {
      "id": "e3c18b98-c266-a497-e757-33c1c58cb6d2",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "8f0d00c8-ade3-980f-185c-1f21b4283b1f",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "69c4fd5bfb12f401480000a4"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "in cillum elit dolore magna",
    "can_download_receipt": true,
    "amount_refunded": -57000462,
    "refunded": true,
    "refunds": [
      {
        "id": "12abb027-681d-a0a3-4c34-b70c0a6b4369",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "e6349eea-7d72-20c4-c616-73137f42cda1",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1890-03-12T08:35:13.0Z",
        "updated_at": "1913-04-24T08:42:39.0Z"
      },
      {
        "id": "ad2a2a7c-20ff-3913-07e2-8418fa7cb495",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "7c2b1194-3c42-2bf6-e20f-e197b233bd36",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1929-06-03T06:31:42.0Z",
        "updated_at": "1891-10-11T14:14:08.0Z"
      },
      {
        "id": "20764401-595b-b1c6-f6ec-99dd6d06c7df",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "7c89a213-5622-041a-007a-38a95ac4d886",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1900-07-15T13:46:34.0Z",
        "updated_at": "1963-05-11T16:46:34.0Z"
      },
      {
        "id": "dc739055-3660-77cb-99f5-1756b2084674",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "0e12c54f-ade9-2332-3c00-c6445e7f6638",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1923-07-11T08:55:16.0Z",
        "updated_at": "1921-11-12T15:01:52.0Z"
      },
      {
        "id": "ad73f53e-bd45-1451-2eb1-bcbfc3371773",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "9e365767-871b-1c27-22f3-cb92e79b905d",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1892-04-27T11:31:47.0Z",
        "updated_at": "1965-12-08T21:11:58.0Z"
      }
    ],
    "site_id": "ed87d738-6805-52c1-1a83-21206a3f1a5f",
    "billing_period_from": "1904-01-22",
    "billing_period_to": "1932-08-23",
    "processing_at": "1935-07-27T05:13:29.0Z",
    "created_at": "1947-06-30T20:34:10.0Z",
    "updated_at": "1897-04-20T14:22:23.0Z"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}
createMembershipSms

Send an SMS message for a membership

This endpoint sends an SMS message to a membership's lead member. Currently supports sending billing details request messages.

Path parameters

Request body

  • message_type
    Required

    The type of message to send.

    Possible values are billing_details_request

  • If true, send the SMS even if the membership already has a payment method. Defaults to false.

Responses

  • 200

    The SMS message was successfully sent

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

POST/shop/memberships/{membershipId}/sms
200
example response
{
  "data": {
    "id": "69c4fd5cfb12f401480002df",
    "organisation_id": "555d87c0-8eb7-157d-f756-0ba6c14ecd38",
    "site_id": "2e220680-d4a4-2087-7381-2ee9b8ace74f",
    "customer_id": "5670ab80-f902-e08e-34b7-dfe443bda405",
    "membership_id": "21b7d8d4-65fb-828b-cc32-575f609e9e41",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "laboris voluptate",
    "message_type": "billing_details_request",
    "message_delivered": true,
    "created_at": "2024-02-02T12:01:01.0Z",
    "sent_at": "2024-02-02T12:01:01.0Z"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}
422
example response
{
  "errors": {
    "exercitation3": [
      "amet",
      "nostrud",
      "cillum sint amet elit",
      "nisi proident aliqua ut"
    ]
  },
  "message": "The request didn't pass validation"
}
createMembershipSmsPreview

Preview an SMS message for a membership

This endpoint previews an SMS message for a membership.

Path parameters

Request body

  • message_type
    Required

    The type of the SMS message.

    Possible values are billing_details_request

  • If true, preview the SMS even if the membership already has a payment method. Defaults to false.

Responses

  • 200

    The preview of the SMS message was successfully retrieved

  • 404

    The resource couldn't be found

POST/shop/memberships/{membershipId}/sms/preview
200
example response
{
  "data": {
    "message": "Your Premium Membership membership is almost ready! Please provide payment details for your membership payments. Set up here: https://example.com/confirm\n",
    "site_id": "33fe8c34-986e-17ee-4d64-b5f9544cad16",
    "organisation_id": "37518d9b-63e8-f9aa-9774-37adf64d8e31"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}