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": "b7b06d2f-23b1-3521-6fae-7574bb84904f",
      "attention_reason": "mandate_revoked",
      "basket_id": "69dcce8b88b3c601480002dc",
      "customer": {
        "id": "3077638a-6a1e-68ac-c178-99f2aff2e6d6",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1907-04-19",
        "brand_id": "89dd6244-1cea-a4c6-2509-cdf108794c60",
        "site_id": "638d6cc1-31c2-336c-a6ad-1b6672cad8d9",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "b3adda83-f9ec-25b4-81f0-0ba9ae8a8c00",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "a96330d6-a191-ca1f-595c-a61d8b9f601e",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "847e17e5-5066-f958-bae4-43f0a8c664e9",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6040ea2c-abba-3b81-011a-09d1819a9a43",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1946-09-17T23:31:07.0Z",
        "created_at": "1920-12-28T14:52:06.0Z",
        "updated_at": "1955-10-19T16:54:17.0Z",
        "deleted_at": "1892-11-26T04:06:19.0Z",
        "last_active_at": "1961-08-30T10:24:35.0Z",
        "email_verified_at": "1924-09-23T18:34:29.0Z",
        "last_check_in": {
          "checked_in_at": "1957-12-19T05:44:13.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "76c3648f-2e69-6905-646f-929c2efe86ee",
          "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": "sint anim laboris reprehenderit"
      },
      "end_date": "1916-10-18T17:53:16.0Z",
      "external_ref": "Excepteur",
      "members": [
        {
          "customer_id": "ed230202-b872-e48d-210f-0edd02f7d38b",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1914-04-13T23:25:31.0Z",
      "next_charge": {
        "id": "a9d06048-8525-079d-e955-9f74688e2507",
        "amount": 3995,
        "currency": "GBP",
        "status": "failed",
        "billing_period_from": "1892-10-08",
        "billing_period_to": "1957-12-28"
      },
      "payment_method": {
        "id": "Lorem ut labore reprehenderit",
        "type": "card",
        "status": "revoked"
      },
      "rate": {
        "id": "4fca0ca4-46e6-a1ac-f51c-9a74342728fb",
        "membership_type_id": "22cd617b-f3b9-a033-e506-92dd508557ad",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "eu deserunt"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1955-06-28T06:25:30.0Z",
        "updated_at": "1952-05-04T22:36:37.0Z"
      },
      "site_id": "4c42566b-2db1-9339-e344-9e87db1d1aff",
      "source": "self_signup",
      "start_date": "1890-10-15T05:53:47.0Z",
      "status": "upcoming",
      "status_updated_at": "1968-02-28T18:12:54.0Z",
      "type": {
        "id": "0838ee65-dc01-ad8e-b0a6-8c6a8e3974da",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "pariatur laboris",
        "brand_id": "8df7440d-fe7a-5213-637d-f8486b84fb1c",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1907-12-02T21:44:29.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "aa9f13da-79d6-29b2-93f0-1cc8542ded30",
            "membership_type_id": "24fef60b-bab4-0de2-9426-7163da378689",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "proident tempor ullamco dolore cillum"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1924-02-27T09:21:44.0Z",
            "updated_at": "1946-01-16T04:39:01.0Z"
          },
          {
            "id": "8a514a54-d0f8-d610-e4ae-b7b3027c926f",
            "membership_type_id": "43fdf156-455e-0479-a4cb-9a87e901419a",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "consectetur in nostrud",
              "ipsum",
              "enim est nostrud"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1947-09-27T11:07:47.0Z",
            "updated_at": "1899-12-27T13:52:45.0Z"
          },
          {
            "id": "aefc5c72-7ad9-c530-4065-5a182ee5fcbc",
            "membership_type_id": "6394825b-7f25-90bf-1b9a-210c7e581ba4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "qui cillum laboris commodo",
              "pariatur",
              "do nisi ullamco nulla",
              "sit reprehenderit qui aliqua",
              "adipisicing aliqua"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1931-07-03T07:01:59.0Z",
            "updated_at": "1959-11-02T22:04:14.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1920-03-10T06:15:55.0Z",
        "updated_at": "1936-01-30T10:50:24.0Z",
        "deleted_at": "1969-11-03T11:02:17.0Z"
      },
      "payment_details_url": "magna occaecat",
      "created_at": "1959-05-25T02:31:24.0Z"
    },
    {
      "id": "1b6e9d91-5526-aa7c-1d78-3d9fe1f8a66b",
      "attention_reason": "setup_unpaid",
      "basket_id": "69dcce8b88b3c601480002dd",
      "customer": {
        "id": "9e04df8e-8b06-387a-d613-b0d572b76f03",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1921-05-16",
        "brand_id": "7f94dfc1-ad8e-e5d9-3061-ef814fbe173f",
        "site_id": "4298267d-a635-03aa-53d1-6130cb29c20a",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "a59ae0c6-ccd9-c4f1-3292-7c73a01ae9c0",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1946-02-07T07:50:16.0Z",
        "created_at": "1954-09-28T18:19:49.0Z",
        "updated_at": "1904-10-31T08:15:32.0Z",
        "deleted_at": "1928-12-10T04:42:24.0Z",
        "last_active_at": "1929-11-20T03:09:12.0Z",
        "email_verified_at": "1926-02-14T01:20:52.0Z",
        "last_check_in": {
          "checked_in_at": "1934-08-23T13:19:17.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "b669170a-16eb-f939-5bef-b9f0000e2cb4",
          "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": "nulla Ut elit magna"
      },
      "end_date": "1923-10-27T02:42:37.0Z",
      "external_ref": "dolor ea ut sunt",
      "members": [
        {
          "customer_id": "e0fc1b29-df89-34b4-3c17-769d75c62386",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "c26b79a7-4fc3-3624-5364-57418ab51953",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "64e2c0d1-19cf-32d3-435d-0de5c245215b",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "635d510f-4b12-31a9-93da-0b5a5d25190e",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "bc4b7aba-8ea1-3f6a-5a14-38b156d23ba1",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1925-05-21T04:19:19.0Z",
      "next_charge": {
        "id": "3829e679-c233-8af8-f3b0-7aa65634a9ea",
        "amount": 3995,
        "currency": "GBP",
        "status": "processing",
        "billing_period_from": "1955-03-22",
        "billing_period_to": "1916-08-24"
      },
      "payment_method": {
        "id": "eu pariatur",
        "type": "card",
        "last_4": "occaecat",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "18529dae-833a-8eff-7e48-e0f7adf2f54e",
        "membership_type_id": "63d925bb-6b66-84b3-6083-7f952964d64c",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "cupidatat in",
          "amet ipsum incididunt deserunt",
          "elit aute nostrud commodo Ut"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1928-03-08T15:24:01.0Z",
        "updated_at": "1963-04-20T23:12:30.0Z"
      },
      "site_id": "0ca70473-119d-dd97-6828-99275ff4d63c",
      "source": "app",
      "start_date": "1896-10-01T01:27:03.0Z",
      "status": "inactive",
      "status_updated_at": "1915-06-09T19:30:15.0Z",
      "type": {
        "id": "7e08a73c-fd0c-6cb3-6130-5921197802c3",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "amet Lorem tempor",
        "brand_id": "9fdc090d-ce66-f193-3422-d64b11a373de",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1926-09-25T02:25:15.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1934-01-18T18:09:13.0Z",
        "updated_at": "1944-09-18T20:45:12.0Z",
        "deleted_at": "1931-01-23T16:47:54.0Z"
      },
      "payment_details_url": "ut id cillum tempor dolore",
      "created_at": "1917-09-18T05:13:19.0Z"
    },
    {
      "id": "916428a3-4ee1-6651-91f9-e224bfbd25c8",
      "attention_reason": "mandate_revoked",
      "basket_id": "69dcce8b88b3c601480002de",
      "customer": {
        "id": "93e61df3-d3c2-99f9-c2f2-5bf4aa594d6b",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1935-02-02",
        "brand_id": "faa71b5d-0095-f787-3ea7-0a8be1da6968",
        "site_id": "f3563e1c-f64b-ff0f-15ed-782b873a2ac6",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "83f55c08-4eba-814b-9238-6d23b80e8ad5",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "34015d74-494e-b076-a8fa-18b3664d6f4c",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1930-06-26T12:13:04.0Z",
        "created_at": "1953-06-15T16:38:27.0Z",
        "updated_at": "1904-01-21T13:41:52.0Z",
        "deleted_at": "1909-02-11T19:14:46.0Z",
        "last_active_at": "1925-04-28T04:39:31.0Z",
        "email_verified_at": "1956-05-08T19:27:21.0Z",
        "last_check_in": {
          "checked_in_at": "1969-03-11T20:10:35.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "1decf2b0-c24c-80e4-32c2-a3ec6d6cfd87",
          "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": "Ut quis velit ut"
      },
      "end_date": "1966-11-12T02:24:50.0Z",
      "external_ref": "non Duis consequat",
      "members": [
        {
          "customer_id": "6400733a-8045-87ed-6055-9450ed006c8e",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "49169f78-0f74-a3db-12a3-46e4b603b656",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1939-03-13T16:16:47.0Z",
      "next_charge": {
        "id": "b2db86f1-b1fc-a8ac-f555-093917c2f057",
        "amount": 3995,
        "currency": "GBP",
        "status": "succeeded",
        "billing_period_from": "1960-06-24",
        "billing_period_to": "1935-11-20"
      },
      "payment_method": {
        "id": "labore dolore et dolor exercitation",
        "type": "card",
        "last_4": "enim fugiat magna sit dolor",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "8ba5fd3a-a49e-0b70-a7cc-b1bc56e2f850",
        "membership_type_id": "2b605a6e-6923-869d-392b-dd9ab9512660",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1917-04-17T10:48:41.0Z",
        "updated_at": "1961-05-08T19:06:26.0Z"
      },
      "site_id": "755a49ad-82c1-787f-8320-880d4a721f53",
      "source": "unknown",
      "start_date": "1912-07-21T06:30:36.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1903-03-11T01:42:25.0Z",
      "type": {
        "id": "3c18cb89-d507-4225-da36-aa30919993f2",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "amet",
        "brand_id": "7ce843e9-300d-8e24-f059-3aefe0da21c8",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1937-02-16T10:47:06.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "60cb15b3-a83f-a5fd-00e3-495203c2f1e1",
            "membership_type_id": "36d19833-cda4-369a-dbfc-7debf95f022e",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "ut amet in",
              "amet Excepteur"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1919-02-13T05:09:14.0Z",
            "updated_at": "1896-04-22T02:16:06.0Z"
          },
          {
            "id": "e7bd7eb3-5d0f-3d52-17f5-0f292a267bf1",
            "membership_type_id": "bf196e48-47ef-87ab-716f-3a6990a7aa1f",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "tempor Ut pariatur aute",
              "aute laboris elit"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1945-09-25T18:15:37.0Z",
            "updated_at": "1948-05-06T19:19:06.0Z"
          },
          {
            "id": "8b567eee-98e6-eb91-021b-f89a0f13f79c",
            "membership_type_id": "76c261fa-cc79-d928-688c-275985878f11",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "do",
              "esse sunt"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1928-02-18T14:39:38.0Z",
            "updated_at": "1936-03-11T12:08:30.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1913-08-06T13:46:18.0Z",
        "updated_at": "1892-01-15T09:41:34.0Z",
        "deleted_at": "1893-09-03T11:41:52.0Z"
      },
      "payment_details_url": "dolor nulla laboris sint",
      "created_at": "1908-07-09T07:54:04.0Z"
    },
    {
      "id": "9753bd37-541a-1d1f-2183-73e3807ab30f",
      "attention_reason": "no_mandate",
      "basket_id": "69dcce8b88b3c601480002df",
      "end_date": "1902-05-27T20:15:29.0Z",
      "external_ref": "do qui cupidatat",
      "members": [],
      "membership_number": "1234567890",
      "next_billing_date": "1931-11-08T04:06:50.0Z",
      "payment_method": {
        "type": "card",
        "card_brand": "amex"
      },
      "rate": {
        "id": "36167f83-3870-9f0a-a4a6-a920b8d39bc4",
        "membership_type_id": "50160b5a-c8bd-6ae3-58a4-dbb0dd67bdfd",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1962-01-27T11:25:33.0Z",
        "updated_at": "1953-11-01T22:53:25.0Z"
      },
      "site_id": "9ae6b558-90e2-a3e6-a4d2-f5b289828db5",
      "source": "unknown",
      "start_date": "1954-12-14T02:39:02.0Z",
      "status": "expired",
      "status_updated_at": "1898-05-09T13:54:33.0Z",
      "type": {
        "id": "c1d710a9-a64d-a33a-7c5a-26441292d7c5",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "aliquip aliqua cupidatat Duis in",
        "brand_id": "cb0eac25-f21c-b00f-3de4-fd171d742358",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "public",
        "minimum_start_date": "1919-09-13T09:12:31.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1924-11-13T07:04:16.0Z",
        "updated_at": "1936-10-30T18:10:11.0Z",
        "deleted_at": "1897-02-09T11:30:04.0Z"
      },
      "payment_details_url": "reprehenderit sit aliqua",
      "created_at": "1956-04-21T11:45:14.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": "50e8845c-3619-195b-3b99-9c5c0a235826",
    "attention_reason": "payment_disputed",
    "basket_id": "69dcce8b88b3c601480002e0",
    "customer": {
      "id": "d3de84f4-a039-7bea-0873-0cc4b6af44a1",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1962-10-31",
      "brand_id": "1f990ffd-469e-099f-2f90-d4871ff58b44",
      "site_id": "2a9c61f3-b790-545f-302c-4533199cdd94",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "fd8ade47-cf87-3c8f-ef3f-387ad842f77c",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "a4a92b54-e5dc-85f4-7732-6867d720ae22",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1951-10-17T15:55:39.0Z",
      "created_at": "1949-01-16T21:38:41.0Z",
      "updated_at": "1932-10-09T10:54:25.0Z",
      "deleted_at": "1916-04-24T12:10:46.0Z",
      "last_active_at": "1963-03-07T23:48:01.0Z",
      "email_verified_at": "1964-04-07T11:23:34.0Z",
      "last_check_in": {
        "checked_in_at": "1958-01-29T01:58:43.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "86f2037e-1b4b-11a5-c0a7-4b32282ba9f1",
        "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": "enim in"
    },
    "end_date": "1957-04-18T07:07:56.0Z",
    "external_ref": "sed",
    "members": [
      {
        "customer_id": "4bfe1f92-6c85-b419-7281-11c2fcf69fa4",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "6b2ee26d-777e-6fad-3cb7-00c65e5b65d8",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "0f0baab1-00d2-db63-4e0f-fc8254b76d10",
        "is_lead": true,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1944-06-16T05:03:33.0Z",
    "next_charge": {
      "id": "a9ad2574-4f4b-d80d-a5a9-95bf51faeca0",
      "amount": 3995,
      "currency": "GBP",
      "status": "processing",
      "billing_period_from": "1940-10-04",
      "billing_period_to": "1960-02-07"
    },
    "payment_method": {
      "id": "sint deserunt",
      "type": "card"
    },
    "rate": {
      "id": "02be6dfb-d18a-ad38-eed3-5fb9f4591bbe",
      "membership_type_id": "f19dedb3-95b1-2691-6df5-5a4819b5f5e7",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "non occaecat cupidatat anim",
        "dolore exercitation nisi dolor dolor",
        "occaecat exercitation sunt id amet"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1941-06-08T20:40:22.0Z",
      "updated_at": "1941-06-09T09:16:26.0Z"
    },
    "site_id": "fec6b9ea-ad27-b641-0cf2-65b65804e994",
    "source": "self_signup",
    "start_date": "1896-09-12T01:43:30.0Z",
    "status": "needs_dd_mandate",
    "status_updated_at": "1904-06-25T10:13:43.0Z",
    "type": {
      "id": "2fd9b78e-d471-5a0a-d9e5-2667e5b41e24",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "ut sit exercitation commodo eiusmod",
      "brand_id": "525eec84-9c87-d8c5-133e-baabeade927f",
      "offline_payments": false,
      "disable_confirmation_email": true,
      "private": false,
      "visibility": "public",
      "minimum_start_date": "1921-08-10T13:53:22.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "7c9715a6-b9a4-8f6e-8a56-b49a275f307c",
          "membership_type_id": "991aff4e-4edd-1039-9d6f-bd4200a8e2cb",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1932-04-01T16:47:43.0Z",
          "updated_at": "1922-03-25T07:24:48.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1920-09-05T03:11:08.0Z",
      "updated_at": "1912-01-30T10:47:50.0Z",
      "deleted_at": "1904-07-16T14:55:33.0Z"
    },
    "payment_details_url": "sed nisi nulla",
    "created_at": "1890-08-07T01:07:01.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": "dddab903-17eb-8141-a373-6ec0abcaae96",
    "membership": {
      "id": "94fc7b00-3590-51b9-226a-d9e344fc03de",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "e2ae0b15-2985-1bab-dfdc-98c57b76a146",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "sit ex",
    "can_download_receipt": false,
    "amount_refunded": -48230575,
    "refunded": true,
    "refunds": [],
    "site_id": "d9206b22-879a-b239-d259-48707ae1a5d4",
    "billing_period_from": "1938-12-25",
    "billing_period_to": "1898-12-10",
    "processing_at": "1925-11-08T21:38:40.0Z",
    "created_at": "1926-05-20T19:12:29.0Z",
    "updated_at": "1916-11-30T06:31:29.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": "cfd38e29-a20c-253e-c4b8-807401e0a4b1",
    "membership": {
      "id": "da2e7c37-47c0-9391-f195-469f19cc49b2",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "0eac83b5-f8d8-dc35-64cf-499f2e9656ef",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "processor_type": "Cash",
      "processor_type_id": "69dcce8b88b3c601480002e1"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "laborum dolor deserunt est",
    "can_download_receipt": true,
    "amount_refunded": 56550033,
    "refunded": true,
    "refunds": [
      {
        "id": "bf4965d3-e5cb-f067-be70-413530841e43",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1939-04-26T04:23:38.0Z",
        "updated_at": "1894-10-06T08:45:14.0Z"
      },
      {
        "id": "4c2df34e-b622-80dd-dd92-a4728750bb48",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "98e59d49-1cfe-48f9-fcaf-50c728107942",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1920-03-31T17:23:07.0Z",
        "updated_at": "1937-06-28T09:56:07.0Z"
      },
      {
        "id": "2f0b0bef-1188-3de9-3158-b582987f28bd",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1913-06-15T19:46:55.0Z",
        "updated_at": "1934-10-08T02:40:40.0Z"
      },
      {
        "id": "ef49c3f2-c38c-2414-4241-c9e23b1a0bb0",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1944-04-01T15:25:33.0Z",
        "updated_at": "1963-04-06T03:56:53.0Z"
      }
    ],
    "site_id": "16a27434-1694-8cfd-3574-9f5d7fc2b999",
    "billing_period_from": "1899-07-02",
    "billing_period_to": "1939-09-03",
    "processing_at": "1959-01-30T09:33:16.0Z",
    "created_at": "1909-05-16T01:34:42.0Z",
    "updated_at": "1913-07-17T20:01:07.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": "3842b99e-8958-838b-0d7c-1b3541c9c6bc",
    "membership": {
      "id": "cf52e661-fe18-374c-f212-01255829a837",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "934b436c-59d4-7a93-d502-f23cac1eba8f",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {},
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "Ut ea eiusmod ipsum",
    "can_download_receipt": true,
    "amount_refunded": 4394505,
    "refunded": true,
    "refunds": [
      {
        "id": "e9097f04-8348-292c-ab56-e31ec63135e6",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "ab3f45cd-2616-1557-f1ba-ada2522faee0",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1910-01-21T18:53:31.0Z",
        "updated_at": "1901-02-13T23:41:23.0Z"
      },
      {
        "id": "3f5278c7-de9a-67e6-5941-359d82fe91a3",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "aa28f50f-9683-ac65-fc7f-9f62e1c1f6c4",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1953-06-28T06:34:40.0Z",
        "updated_at": "1951-10-02T07:03:01.0Z"
      },
      {
        "id": "e302ac8f-9544-5857-a14a-28a1c6b4eb48",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "a18512c2-0842-4866-a72a-0a33fdbb4855",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1890-11-05T12:52:02.0Z",
        "updated_at": "1915-10-23T09:56:25.0Z"
      },
      {
        "id": "55e03ed8-9023-f88f-d379-b4cfc6562bc1",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "a42836ef-e48b-e44c-9939-01696fdfb33d",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1962-11-27T23:44:20.0Z",
        "updated_at": "1933-09-29T23:45:53.0Z"
      }
    ],
    "site_id": "0018dadf-6a5e-3f32-0734-ff1624a11442",
    "billing_period_from": "1907-06-20",
    "billing_period_to": "1897-03-13",
    "processing_at": "1936-12-16T22:46:38.0Z",
    "created_at": "1923-05-27T05:54:54.0Z",
    "updated_at": "1900-01-03T03:56:30.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": "69dcce8c88b3c601480006ca",
    "organisation_id": "4957dc50-6d2f-d081-dd66-10634346dfda",
    "site_id": "ce2426c4-9e64-acfc-d917-da3588eccd48",
    "customer_id": "c5fd64a8-6d46-f5a2-94cd-96f2f32530e4",
    "membership_id": "f621d74b-10c7-6b73-35d6-e1d0a8b986da",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "est mollit occaecat eiusmod",
    "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": {
    "anim_2": [],
    "dolore2": [
      "Excepteur proident"
    ],
    "cillumfeb": [
      "amet",
      "ullamco Lorem voluptate sint"
    ],
    "ea_c": []
  },
  "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": "2fb0961b-e223-1aa3-d5e4-47a13b7e763b",
    "organisation_id": "9fb2b8ce-38a2-3a35-903d-20b5ebbbd894"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}