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": "4636064f-593b-9d73-e53d-9a0108a96e88",
      "attention_reason": "payment_failed",
      "basket_id": "69f47ef47aa04b014c0000b4",
      "customer": {
        "id": "5191cafd-d098-1351-a934-b77155026d0b",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1947-08-17",
        "brand_id": "fa2c82aa-a039-bf7c-2835-88448f2ad5ef",
        "site_id": "8046474b-9380-21b0-b5bd-77680a358140",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "61b1c687-a05f-6324-45bd-628fcd17772d",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1930-05-30T08:51:16.0Z",
        "created_at": "1945-06-20T01:46:01.0Z",
        "updated_at": "1926-03-13T14:54:58.0Z",
        "deleted_at": "1946-04-07T09:20:34.0Z",
        "last_active_at": "1919-12-20T20:29:40.0Z",
        "email_verified_at": "1954-08-17T13:04:56.0Z",
        "last_check_in": {
          "checked_in_at": "1947-01-31T01:46:06.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "adf9afbb-32e9-f8c8-8b9d-c09c2a14970c",
          "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": "eu aliqua ut"
      },
      "end_date": "1904-01-01T16:24:27.0Z",
      "external_ref": "nulla aute in ex commodo",
      "members": [
        {
          "customer_id": "95c27802-3480-161e-f2b7-92d7bb6c2d16",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "849a6ab2-6315-52f5-45e3-d8a9a22a8401",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "c0353602-e842-b5a8-eb6c-4ed7cb286dae",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "acd054c5-42f4-9dc9-761a-a4740dcf3cee",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "74e712f9-a2dc-5efa-42e0-3e742f55f8ec",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1969-03-30T15:06:35.0Z",
      "next_charge": {
        "id": "afedae68-ef6c-19cd-8331-f1d425f29aa2",
        "amount": 3995,
        "currency": "GBP",
        "status": "succeeded",
        "billing_period_from": "1919-04-04",
        "billing_period_to": "1943-02-28"
      },
      "payment_method": {
        "id": "et culpa enim nisi",
        "type": "direct_debit",
        "last_4": "amet",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "8b5e7bfc-06d1-b780-a782-9c94105f0cd9",
        "membership_type_id": "e8c3b8a0-b651-a8ed-7661-d43e37cf92be",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "occaecat irure"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1964-10-18T03:44:40.0Z",
        "updated_at": "1920-03-10T10:37:13.0Z"
      },
      "site_id": "d80b84ee-28c3-c131-92ff-d24edea6193c",
      "source": "app",
      "start_date": "1932-01-23T19:57:44.0Z",
      "status": "inactive",
      "status_updated_at": "1930-04-04T12:41:15.0Z",
      "type": {
        "id": "63d6f24b-7abc-34db-86a4-99fac206297f",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "tempor do consectetur commodo",
        "brand_id": "1a52ab7a-9925-d7e3-d351-8aebd0875403",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1917-01-02T19:21:33.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "90fa9b9d-446a-4df7-0a0e-445c54c0633b",
            "membership_type_id": "fd8121f3-b816-8ce3-1587-35c7fba323fd",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "consectetur",
              "commodo anim aute nostrud",
              "cupidatat in elit nisi",
              "velit laborum voluptate"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1940-09-05T17:13:24.0Z",
            "updated_at": "1928-12-17T09:37:16.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1936-04-10T08:50:37.0Z",
        "updated_at": "1914-12-22T12:08:40.0Z",
        "deleted_at": "1916-06-02T05:13:54.0Z"
      },
      "payment_details_url": "anim amet",
      "created_at": "1966-09-18T09:59:54.0Z"
    },
    {
      "id": "997e2454-e128-ad32-dbc1-8b043e69dfdd",
      "attention_reason": "payment_disputed",
      "basket_id": "69f47ef47aa04b014c0000b5",
      "customer": {
        "id": "9acb9ad3-f0ec-cfca-2fb6-01d3109e521b",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1966-12-21",
        "brand_id": "c046565b-df68-3ba5-ff72-8e16cd551e4f",
        "site_id": "efefbf71-4361-2045-d33d-d6ca60c4bda2",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [],
        "preferred_locale": "en",
        "locked_at": "1907-11-26T01:09:34.0Z",
        "created_at": "1913-05-25T08:01:12.0Z",
        "updated_at": "1952-10-29T19:16:30.0Z",
        "deleted_at": "1931-11-17T01:35:57.0Z",
        "last_active_at": "1935-05-28T23:35:37.0Z",
        "email_verified_at": "1906-03-24T04:13:53.0Z",
        "last_check_in": {
          "checked_in_at": "1925-06-15T07:47:05.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "64e23845-6515-2852-75a2-3ddb49c51b3d",
          "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": "dolor proident commodo ea"
      },
      "end_date": "1897-05-12T13:11:55.0Z",
      "external_ref": "elit dolor Duis anim exercitation",
      "members": [
        {
          "customer_id": "b0ccab3c-a833-2382-fd02-561b20400423",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1954-06-20T12:44:32.0Z",
      "next_charge": {
        "id": "d67c9cbd-79c0-c1e8-e471-707ff456ecfc",
        "amount": 3995,
        "currency": "GBP",
        "status": "errored",
        "billing_period_from": "1899-05-29",
        "billing_period_to": "1897-01-18"
      },
      "payment_method": {
        "id": "laboris id exercitation consequat",
        "type": "direct_debit",
        "last_4": "aute",
        "status": "revoked"
      },
      "rate": {
        "id": "1f55f8af-9836-e29f-6674-0862f06c439e",
        "membership_type_id": "9f8e04d6-1b17-e99f-9199-f172e87e2511",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1937-11-03T14:41:46.0Z",
        "updated_at": "1908-11-28T08:03:41.0Z"
      },
      "site_id": "bcd6931c-d56b-fbcd-06e2-8860558b8b92",
      "source": "self_signup",
      "start_date": "1930-05-12T18:15:40.0Z",
      "status": "reserved",
      "status_updated_at": "1941-05-12T03:11:47.0Z",
      "type": {
        "id": "82cbc7a9-fc8f-fefa-564e-e392044d6a6c",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "quis occaecat",
        "brand_id": "8de1e3c7-da99-868a-e0a5-d4d740bea67a",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1938-06-15T18:59:16.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1919-05-08T01:42:40.0Z",
        "updated_at": "1954-01-05T15:01:54.0Z",
        "deleted_at": "1955-09-25T08:49:06.0Z"
      },
      "payment_details_url": "proident nisi et velit",
      "created_at": "1910-10-04T17:17:06.0Z"
    },
    {
      "id": "a06bc388-4c22-c67d-1b14-853fb09393b6",
      "attention_reason": "mandate_revoked",
      "basket_id": "69f47ef47aa04b014c0000b6",
      "customer": {
        "id": "1d80523c-ae03-56c4-e875-ff6d12d4e54d",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1962-07-27",
        "brand_id": "e6323591-3918-e7c0-e2b0-3506e7459a28",
        "site_id": "3eb2c587-9c48-91e0-5055-e25c525a69b5",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "17b96cd5-6c6c-12a0-60a7-784b1938d603",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "f22c55dc-6f38-da2e-7a64-7d5e774d23f6",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1908-07-05T22:37:48.0Z",
        "created_at": "1961-10-09T23:22:35.0Z",
        "updated_at": "1904-12-04T17:46:04.0Z",
        "deleted_at": "1965-06-15T03:23:16.0Z",
        "last_active_at": "1905-06-27T09:32:53.0Z",
        "email_verified_at": "1960-10-24T03:08:34.0Z",
        "last_check_in": {
          "checked_in_at": "1924-01-30T19:05:49.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "88f10de1-6416-3d23-b13b-4c8d69fc563b",
          "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": "Duis"
      },
      "end_date": "1896-06-15T20:43:34.0Z",
      "external_ref": "est",
      "members": [
        {
          "customer_id": "78e3f000-41b1-2db0-5ffa-3fbbe482035b",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "bb607ccc-ed97-dd5f-cb0e-0f437bd7c903",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1911-01-10T15:36:08.0Z",
      "next_charge": {
        "id": "7ffec23a-087f-d633-a797-08660d8248e3",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1915-07-26",
        "billing_period_to": "1931-11-10"
      },
      "payment_method": {
        "type": "card",
        "last_4": "Excepteur ut ea cupidatat",
        "status": "revoked"
      },
      "rate": {
        "id": "4c088125-9592-d22c-c0ac-327c93c2c47d",
        "membership_type_id": "ed15c93f-cda6-1aa0-f2e3-23493e53aa0f",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "qui",
          "Ut reprehenderit occaecat eu ad",
          "cupidatat magna"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1898-06-25T04:45:06.0Z",
        "updated_at": "1948-05-08T12:08:39.0Z"
      },
      "site_id": "e67d49f5-9107-d56e-5f84-64a3b1f76bac",
      "source": "unknown",
      "start_date": "1897-04-26T14:04:15.0Z",
      "status": "active",
      "status_updated_at": "1911-07-15T13:22:49.0Z",
      "type": {
        "id": "dbbba6a1-672a-4b85-2e24-24ee5dd45748",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "voluptate laboris officia labore in",
        "brand_id": "feb9c901-4a4b-a1f1-9aa1-ce78d9b4d4ee",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1904-03-06T15:37:58.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "1e666639-ce94-7243-7786-08343bd15223",
            "membership_type_id": "f1e5983f-72ef-c5df-cc54-1394721f3ec0",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "reprehenderit amet",
              "mollit cupidatat Excepteur ut tempor",
              "veniam proident incididunt",
              "reprehenderit"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1938-03-25T08:41:48.0Z",
            "updated_at": "1942-07-30T04:22:07.0Z"
          },
          {
            "id": "7c9e7426-af12-ec6d-968d-c7ac5fbc8447",
            "membership_type_id": "0417ba0c-f973-0cdd-ace5-8ff77a38855a",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "mollit sed reprehenderit dolor amet"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1944-12-20T03:14:13.0Z",
            "updated_at": "1905-04-07T13:59:13.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1892-07-18T03:10:48.0Z",
        "updated_at": "1925-10-12T04:43:34.0Z",
        "deleted_at": "1907-10-27T07:24:18.0Z"
      },
      "payment_details_url": "dolor culpa consectetur",
      "created_at": "1910-08-12T10:24:38.0Z"
    },
    {
      "id": "e167ad51-c143-0174-3b83-c981f1aed129",
      "attention_reason": "payment_failed",
      "basket_id": "69f47ef47aa04b014c0000b7",
      "customer": {
        "id": "d6d479ee-0a9b-6933-6cc1-54a8ae5fddb8",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1895-07-11",
        "brand_id": "26511974-c801-e271-d4a0-0c167bf27877",
        "site_id": "ba002b7c-72bb-7186-1a67-4a65c7ada1f6",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "23565256-f3b7-c70d-021c-9dc101939df2",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1926-06-29T02:35:19.0Z",
        "created_at": "1945-08-01T13:48:53.0Z",
        "updated_at": "1934-07-14T13:01:02.0Z",
        "deleted_at": "1922-09-22T20:08:04.0Z",
        "last_active_at": "1936-05-11T12:03:55.0Z",
        "email_verified_at": "1946-09-15T20:23:48.0Z",
        "last_check_in": {
          "checked_in_at": "1908-04-06T10:01:36.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "3308bf64-cf62-b50e-d57a-c00ec526a8f3",
          "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": "sunt esse adipisicing"
      },
      "end_date": "1925-01-18T01:48:50.0Z",
      "external_ref": "qui anim Duis ad ut",
      "members": [
        {
          "customer_id": "d1c6fef4-9fca-4598-6611-7e6b48462c9b",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "430676d6-b916-4b93-0297-b052cc37eaf1",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "f639134b-9930-6e56-b5cb-1d3f68c04519",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "09c568ac-785b-9cfe-8a4c-89e8918bb267",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1890-09-23T02:12:45.0Z",
      "next_charge": {
        "id": "b1dd1b57-502e-4a2e-a875-0090a7d2cb32",
        "amount": 3995,
        "currency": "GBP",
        "status": "awaiting_approval",
        "billing_period_from": "1964-04-04",
        "billing_period_to": "1913-02-11"
      },
      "payment_method": {
        "type": "card",
        "last_4": "do in nisi exercitation nulla",
        "card_brand": "amex"
      },
      "rate": {
        "id": "27a81a22-aae3-0476-a6b5-81ef0aaf6f07",
        "membership_type_id": "2056b99c-9f85-554b-b2b9-819c35ddbb8b",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "ad dolore est et",
          "Excepteur"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1938-03-29T04:24:10.0Z",
        "updated_at": "1923-11-08T01:41:35.0Z"
      },
      "site_id": "1a8178bd-5093-28e8-0079-3777e1144908",
      "source": "import",
      "start_date": "1943-12-10T13:46:15.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1893-03-08T10:35:18.0Z",
      "type": {
        "id": "d67bc03c-bcbe-2587-7e2d-337e2892e1e1",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "dolor ullamco",
        "brand_id": "87321c63-7704-f2bb-f2cc-4936ba8e1790",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1918-11-29T01:35:40.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "c7033511-26a1-9a1b-10e4-c905bb85d0a1",
            "membership_type_id": "8f764009-6019-3f6c-4961-3560a9d96098",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "exercitation veniam officia Lorem",
              "culpa adipisicing minim amet",
              "cupidatat non in cillum",
              "ullamco incididunt amet sed"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1965-05-20T21:01:05.0Z",
            "updated_at": "1968-08-12T04:25:07.0Z"
          },
          {
            "id": "36d75646-471a-cf50-5950-7016936bccaf",
            "membership_type_id": "eea1ed82-f1e8-2a93-cc77-86dcb88678ad",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "aliquip officia do"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1916-11-26T10:15:45.0Z",
            "updated_at": "1906-04-09T01:52:22.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1939-09-02T03:39:27.0Z",
        "updated_at": "1896-07-19T09:15:18.0Z",
        "deleted_at": "1951-04-02T16:17:04.0Z"
      },
      "payment_details_url": "proident",
      "created_at": "1931-07-07T20:39:12.0Z"
    },
    {
      "id": "5476c46f-9527-f3c8-308e-e545426a9655",
      "attention_reason": "no_mandate",
      "basket_id": "69f47ef47aa04b014c0000b8",
      "customer": {
        "id": "8d52ad90-65eb-d957-f59c-ed202056ed05",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1920-04-05",
        "brand_id": "9359a1cb-2051-5afb-e7a8-5251b4448569",
        "site_id": "b0a20655-584d-d713-76c6-7e4b36141bb3",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "7fcdaf09-e6d0-63cf-9d38-5728c666253a",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6741498c-1374-7c53-04a7-48755af84e0c",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6cce4175-b103-6e91-d98c-c756958d5855",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "4080483b-3db7-e394-6928-3696c930228f",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "449efb61-0a09-45b6-09e9-09cade0124fd",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1893-10-05T17:38:48.0Z",
        "created_at": "1894-03-30T05:50:47.0Z",
        "updated_at": "1923-05-29T04:55:23.0Z",
        "deleted_at": "1939-01-09T14:41:12.0Z",
        "last_active_at": "1905-01-09T09:13:23.0Z",
        "email_verified_at": "1891-11-01T22:14:35.0Z",
        "last_check_in": {
          "checked_in_at": "1894-10-07T13:18:26.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "6ac23c17-c156-d435-796b-96d2618e120b",
          "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": "consectetur magna"
      },
      "end_date": "1926-01-11T04:45:55.0Z",
      "external_ref": "commodo voluptate",
      "members": [
        {
          "customer_id": "6a091bb7-da57-5ad5-2aeb-b5fdfd8bfbc5",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "ccb9056c-29ea-a0f9-665a-79e62de0c15c",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "a2299c36-c9cb-2cf8-54f4-9590feda5769",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "055d8147-a455-96c3-71e6-81bd32f76853",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "97c9bcd2-71da-7b22-b993-4be086229d78",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1904-05-14T02:53:51.0Z",
      "next_charge": {
        "id": "eab3b34a-c254-a23a-5bb9-a995ba6347b4",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1925-05-26",
        "billing_period_to": "1933-10-27"
      },
      "payment_method": {
        "last_4": "voluptate",
        "status": "revoked"
      },
      "rate": {
        "id": "8d1b5e9a-5cbe-029c-08ac-adc51ea96bf5",
        "membership_type_id": "acee0f42-a344-ac84-a6fe-bc86cbbaee0a",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "ipsum",
          "cupidatat",
          "in irure eiusmod"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1942-03-26T15:15:42.0Z",
        "updated_at": "1915-08-23T23:03:42.0Z"
      },
      "site_id": "afcaad5b-a583-fb07-44d1-9fd2e20de35a",
      "source": "import",
      "start_date": "1939-11-18T12:21:37.0Z",
      "status": "needs_attention",
      "status_updated_at": "1909-11-25T16:08:21.0Z",
      "type": {
        "id": "5263251f-09ad-d807-cefb-109d1385af22",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "sunt adipisicing",
        "brand_id": "71494336-f2f2-8746-a358-7904894001b3",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1949-10-10T05:01:54.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "48e3b858-c220-be56-715a-542946b123af",
            "membership_type_id": "3ae86869-b8d8-5784-ef16-0fd85ec2e388",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "velit veniam ad dolor tempor"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1956-10-26T14:49:22.0Z",
            "updated_at": "1964-04-17T06:18:02.0Z"
          },
          {
            "id": "c729384f-6d19-e024-a118-b2df83fe1533",
            "membership_type_id": "6b712dfd-a961-ddef-a943-a92ecb501439",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1904-11-13T15:08:26.0Z",
            "updated_at": "1930-04-19T01:42:54.0Z"
          },
          {
            "id": "4e1ec898-50dc-8efe-0bfd-04045de10306",
            "membership_type_id": "39ee0923-c9d5-add1-ea18-ae73a4c4216b",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "velit culpa pariatur",
              "nostrud",
              "consequat",
              "laborum veniam"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1890-12-03T03:31:06.0Z",
            "updated_at": "1904-07-13T02:16:47.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1905-11-18T09:32:59.0Z",
        "updated_at": "1927-05-20T10:23:14.0Z",
        "deleted_at": "1937-04-03T20:49:23.0Z"
      },
      "payment_details_url": "voluptate",
      "created_at": "1930-05-27T20:21:11.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": "3ca4b971-36b5-8435-5fbb-40a08d9b61ad",
    "attention_reason": "payment_failed",
    "basket_id": "69f47ef47aa04b014c0000b9",
    "customer": {
      "id": "046d4f72-6e96-8251-ba8a-2e82ec8680cd",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1929-04-20",
      "brand_id": "1fd42910-bd8a-689c-76b4-3e15856eb804",
      "site_id": "63279674-ea59-2bd3-55c4-1085097e2762",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "8491b24b-bfbe-1dc7-6230-1b1a1a4e1ab3",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "28b2704b-2761-4d62-8992-42bf1dff6918",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "98c3e2b9-d7c0-86ff-cc7a-9e9c5fa97b21",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "859b6a84-f835-e9a1-9896-d80596882236",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "e0d16378-7eb6-e407-9186-f09214b6bd46",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1927-03-07T09:24:03.0Z",
      "created_at": "1959-11-28T20:34:46.0Z",
      "updated_at": "1898-11-18T19:57:44.0Z",
      "deleted_at": "1902-03-22T14:18:16.0Z",
      "last_active_at": "1960-10-08T17:46:41.0Z",
      "email_verified_at": "1912-02-21T16:35:54.0Z",
      "last_check_in": {
        "checked_in_at": "1897-12-06T19:28:58.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "32e4b335-773e-3857-4372-9a02645eaaa7",
        "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": "dolore voluptate esse"
    },
    "end_date": "1908-01-19T19:40:04.0Z",
    "external_ref": "fugiat nostrud cupidatat ipsum",
    "members": [
      {
        "customer_id": "3ac1a0db-84fd-57ac-2e1d-ae3aaea10d99",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "108184f3-a4f1-68ac-bf75-ebfd5316e548",
        "is_lead": false,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1938-04-17T01:42:17.0Z",
    "next_charge": {
      "id": "5649d79c-3846-2959-07d2-00432c24fb07",
      "amount": 3995,
      "currency": "GBP",
      "status": "failed",
      "billing_period_from": "1922-05-27",
      "billing_period_to": "1910-12-22"
    },
    "payment_method": {
      "type": "card",
      "last_4": "voluptate commodo Ut ut amet",
      "status": "revoked",
      "card_brand": "amex"
    },
    "rate": {
      "id": "9964b50e-8012-1b10-61ed-2458ec736df6",
      "membership_type_id": "c405ea17-7f00-b792-ab64-b66214fe6b6b",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "officia ea sed aliquip labore",
        "dolor est aliquip cupidatat",
        "ea dolore Lorem"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1892-11-01T02:53:01.0Z",
      "updated_at": "1940-08-20T20:33:16.0Z"
    },
    "site_id": "6c6f843f-594a-d16b-91c4-c2a1ae698142",
    "source": "import",
    "start_date": "1926-07-18T11:49:39.0Z",
    "status": "active",
    "status_updated_at": "1945-05-14T18:22:34.0Z",
    "type": {
      "id": "1f1e06b1-de7d-88d3-81e8-3adb39549236",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "laborum Lorem aliqua nisi dolor",
      "brand_id": "11392e9d-0ca2-aaa1-ce7b-310e56b38db2",
      "offline_payments": true,
      "disable_confirmation_email": true,
      "private": true,
      "visibility": "private",
      "minimum_start_date": "1960-08-22T12:48:18.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "a4fc6b9b-a1d7-ccd1-8bae-0d515615edb2",
          "membership_type_id": "fba472d0-e227-9435-8b03-584aa45914d5",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "veniam eiusmod ut",
            "dolor aliquip tempor"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1942-01-31T21:58:36.0Z",
          "updated_at": "1955-11-24T08:11:28.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1916-02-25T10:29:16.0Z",
      "updated_at": "1921-11-10T06:11:36.0Z",
      "deleted_at": "1960-05-27T23:59:25.0Z"
    },
    "payment_details_url": "non dolore",
    "created_at": "1902-10-10T18:58:29.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": "f83107f6-7ed1-8df2-5939-e417ef2b4df2",
    "membership": {
      "id": "9393f0b1-0e24-1a6a-c954-49eb37013dea",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "fdef26fe-4758-1017-01e3-4d25dda17d4e",
      "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": "et dolor consectetur magna irure",
    "can_download_receipt": true,
    "amount_refunded": -32112669,
    "refunded": true,
    "refunds": [
      {
        "id": "a61fce70-415f-a41c-8690-0129954d4812",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "721870ca-3fab-1065-4965-7f063fd7de1b",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1958-07-17T12:52:35.0Z",
        "updated_at": "1955-07-23T18:20:12.0Z"
      },
      {
        "id": "acffb8a6-248f-9b85-6d5b-b16db6a54586",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "36ca7809-9336-8000-0714-37c1e29d8ad8",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1923-12-01T05:26:04.0Z",
        "updated_at": "1946-12-24T02:03:22.0Z"
      },
      {
        "id": "1ac06388-1723-4e02-82dc-1026ad6515ea",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "0b30ca1c-be09-bdc5-2d88-b01abd104317",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1933-08-06T13:32:31.0Z",
        "updated_at": "1936-08-02T01:56:33.0Z"
      }
    ],
    "site_id": "8b3fd40f-012a-7bc0-efb6-6e430546b0be",
    "billing_period_from": "1910-01-16",
    "billing_period_to": "1890-05-05",
    "processing_at": "1934-07-16T08:05:50.0Z",
    "created_at": "1947-08-19T03:22:28.0Z",
    "updated_at": "1967-05-05T12:21:38.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": "5fa0820c-8d1c-b739-5fe2-9484dd9f17b6",
    "membership": {
      "id": "825fa013-e850-a1a0-1e5c-ea8a6be83e19",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "56b74a93-77ef-0348-b862-63e4d5cf196a",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "esse",
    "can_download_receipt": true,
    "amount_refunded": 74168582,
    "refunded": false,
    "refunds": [
      {
        "id": "bebd0121-f389-b981-5c33-8e244a8c383d",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1961-05-16T01:01:29.0Z",
        "updated_at": "1911-08-26T03:58:58.0Z"
      },
      {
        "id": "92593d26-4b4f-9e67-20b4-b684cc2de124",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "1e037f4d-69ca-6eae-c42d-af319cff3127",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1912-04-29T02:02:18.0Z",
        "updated_at": "1906-04-21T09:52:36.0Z"
      },
      {
        "id": "f3ae41a9-400f-6c99-a796-755d41eb52d5",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "e7f51681-44c5-6be6-463b-fd591d27d9ba",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1965-12-03T16:41:56.0Z",
        "updated_at": "1906-12-02T23:22:01.0Z"
      },
      {
        "id": "3163b81f-275c-4b56-3edc-3083963bc524",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1899-12-17T19:59:51.0Z",
        "updated_at": "1964-09-25T19:24:42.0Z"
      },
      {
        "id": "c425e11f-1a5d-ef6c-3c40-c2ed30d43872",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1926-02-03T01:23:49.0Z",
        "updated_at": "1964-02-14T03:41:35.0Z"
      }
    ],
    "site_id": "2f6472ed-460a-6966-b5c0-7b5226a99610",
    "billing_period_from": "1891-01-03",
    "billing_period_to": "1964-09-15",
    "processing_at": "1919-04-23T05:54:09.0Z",
    "created_at": "1890-02-18T05:58:56.0Z",
    "updated_at": "1954-01-04T14:47:24.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": "7d29887d-0499-e51c-87d3-2a8532ae81bf",
    "membership": {
      "id": "5aabed0b-99e8-98ab-019e-fe1029aee4ea",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "c88527a3-be65-c353-12c4-9135cbb4ce53",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "last_4": 4001,
      "processor_type_id": "69f47ef47aa04b014c0000ba"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "anim ut",
    "can_download_receipt": true,
    "amount_refunded": 55868499,
    "refunded": false,
    "refunds": [
      {
        "id": "d5984983-c595-8be2-446c-7edeed048613",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "9d81a60f-c894-5c73-6133-9b4bbaa59ffa",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1896-05-11T05:26:30.0Z",
        "updated_at": "1933-04-10T06:47:46.0Z"
      },
      {
        "id": "3d0640d8-ba9a-3d8a-53dc-683bb5e9a5a8",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "4a4986fa-db88-bec5-e948-ce5bd3f589ea",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1965-01-11T10:12:21.0Z",
        "updated_at": "1928-05-27T18:10:48.0Z"
      }
    ],
    "site_id": "21f0cd17-6cea-b573-6324-83762371e47a",
    "billing_period_from": "1910-07-10",
    "billing_period_to": "1956-02-13",
    "processing_at": "1907-12-03T23:18:45.0Z",
    "created_at": "1966-02-25T17:57:42.0Z",
    "updated_at": "1905-06-19T15:22:37.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": "69f47ef57aa04b014c00036e",
    "organisation_id": "5702d344-2e7c-1f69-5d7a-f78c5480b4f2",
    "site_id": "5fede339-1d41-1ba6-1fb4-5c8a1e7cd7b7",
    "customer_id": "51b2bbb2-2b67-4bd2-6aa9-23e94c0cfe37",
    "membership_id": "4c7bbc94-7fc8-d1fd-7857-b5feb5eba870",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "magna dolor laboris",
    "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": {
    "doloree1e": [
      "ullamco esse officia",
      "irure",
      "adipisicing aute incididunt"
    ],
    "consecteturcc": [
      "laborum",
      "et nisi non exercitation",
      "ullamco",
      "ex tempor id Excepteur fugiat"
    ]
  },
  "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": "c736737d-f2ef-ad14-4f0b-c14bd60e1b01",
    "organisation_id": "dad4c631-5bf1-4f77-b3bd-82dd4ccfbff4"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}