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": "bf640e49-1a1e-b783-b84f-3b958cf0898c",
      "attention_reason": "payment_failed",
      "basket_id": "69e22d6d5e44c40152000092",
      "customer": {
        "id": "927e5b94-86d0-97d3-910f-e5615d032182",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1937-04-18",
        "brand_id": "3dc9e253-7106-309e-95ec-a4fd350d261b",
        "site_id": "f9504cbe-6417-eb6d-39b9-63ceb3ed708e",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [],
        "preferred_locale": "en",
        "locked_at": "1931-01-21T14:32:19.0Z",
        "created_at": "1903-06-09T04:21:48.0Z",
        "updated_at": "1968-04-10T07:49:37.0Z",
        "deleted_at": "1917-10-07T01:50:08.0Z",
        "last_active_at": "1961-05-23T07:15:57.0Z",
        "email_verified_at": "1957-06-09T04:41:01.0Z",
        "last_check_in": {
          "checked_in_at": "1917-05-16T17:48:29.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "98bde290-1df5-651b-c0cd-66ad54274864",
          "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": "nostrud culpa dolor irure"
      },
      "end_date": "1929-09-03T10:49:40.0Z",
      "external_ref": "commodo non ipsum sit dolor",
      "members": [
        {
          "customer_id": "f80ac998-3347-ba57-a3c8-aee7885a3b42",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "04c50465-b1e0-20be-987e-11d5f2120638",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1945-12-28T17:31:05.0Z",
      "next_charge": {
        "id": "f4ec5ff2-c497-5ae9-b484-b73c839735ed",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1944-12-11",
        "billing_period_to": "1925-04-29"
      },
      "payment_method": {
        "id": "enim aliquip",
        "type": "card",
        "last_4": "nostrud pariatur",
        "status": "revoked"
      },
      "rate": {
        "id": "a5c858b5-3edb-b780-5ade-e63d81e60173",
        "membership_type_id": "15491ce6-7244-fa06-5bb2-3f21aabeb01d",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "sit esse officia incididunt",
          "sed consectetur"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1965-07-15T09:06:25.0Z",
        "updated_at": "1923-12-08T08:29:24.0Z"
      },
      "site_id": "044dcee3-b0ce-a962-8927-3e44a607ce6d",
      "source": "self_signup",
      "start_date": "1892-05-22T16:53:18.0Z",
      "status": "inactive",
      "status_updated_at": "1911-03-29T23:53:20.0Z",
      "type": {
        "id": "56eafe87-2a95-090a-08bb-bd4a8b0b5596",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "voluptate cupidatat non consequat",
        "brand_id": "d40e49d0-4e4d-89a2-d5d1-7b3c8dceb595",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "public",
        "minimum_start_date": "1938-11-25T12:09:12.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "425f1610-883c-d38f-0b72-d75635ac4d13",
            "membership_type_id": "efcbab00-3ca2-7648-ed62-d5e1f3135f0d",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1919-12-19T10:43:28.0Z",
            "updated_at": "1915-03-28T22:47:43.0Z"
          },
          {
            "id": "00bdae11-5cba-d786-230b-33384c8b16e7",
            "membership_type_id": "669975d8-8dbf-928c-84ad-ced61bdb2e68",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "commodo cillum",
              "reprehenderit ex sit id in"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1957-12-16T15:39:27.0Z",
            "updated_at": "1928-12-29T02:50:06.0Z"
          },
          {
            "id": "f3e6076d-49cd-297e-522f-6781df9a5676",
            "membership_type_id": "6d4cd2a6-5f98-1a72-179b-3e4240169c72",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "in aliqua ut amet",
              "officia ut ad",
              "irure cillum Ut",
              "ut"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1931-08-26T02:18:01.0Z",
            "updated_at": "1963-06-03T21:11:45.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1935-12-09T11:11:30.0Z",
        "updated_at": "1961-03-23T15:50:01.0Z",
        "deleted_at": "1898-06-03T16:46:16.0Z"
      },
      "payment_details_url": "do",
      "created_at": "1890-06-23T13:51:49.0Z"
    },
    {
      "id": "7e9de61f-e606-8746-db7c-236fe719846b",
      "attention_reason": "mandate_revoked",
      "basket_id": "69e22d6d5e44c40152000093",
      "customer": {
        "id": "1e63b7bd-435d-1ea2-18c0-adc829b4deb1",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1968-05-07",
        "brand_id": "ebd15877-222c-d352-513d-c997d7f0959b",
        "site_id": "4f9ff18c-2a7e-7681-7603-d41bc071ad7e",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "5c4e3f3d-aaec-c6a1-0d8b-8364826e8601",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1918-04-24T05:25:36.0Z",
        "created_at": "1948-12-04T01:51:15.0Z",
        "updated_at": "1936-12-24T10:07:39.0Z",
        "deleted_at": "1951-04-04T09:33:04.0Z",
        "last_active_at": "1939-11-26T17:15:14.0Z",
        "email_verified_at": "1963-12-25T23:31:44.0Z",
        "last_check_in": {
          "checked_in_at": "1925-08-06T09:16:20.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "aff8fffe-41a6-9632-0ee9-0ddfc7a4460f",
          "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": "fugiat eiusmod"
      },
      "end_date": "1941-01-15T21:55:52.0Z",
      "external_ref": "non",
      "members": [],
      "membership_number": "1234567890",
      "next_billing_date": "1935-06-08T12:31:23.0Z",
      "next_charge": {
        "id": "5427ecfb-b651-75b9-1db7-be529e8db6c6",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1894-04-15",
        "billing_period_to": "1950-01-29"
      },
      "payment_method": {
        "id": "mollit in ea anim ullamco",
        "type": "card",
        "last_4": "eu cillum sint",
        "status": "revoked"
      },
      "rate": {
        "id": "046c95aa-e91e-ee9d-b070-d495c7a57f85",
        "membership_type_id": "d12a92ec-0c97-7c4e-1d38-f200a47b520b",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "reprehenderit",
          "officia sunt"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1952-01-25T04:43:10.0Z",
        "updated_at": "1949-11-30T03:27:27.0Z"
      },
      "site_id": "b4c2ec0f-7d42-7de7-fdaa-df80062eb099",
      "source": "app",
      "start_date": "1928-10-05T02:01:06.0Z",
      "status": "needs_attention",
      "status_updated_at": "1944-12-11T17:16:46.0Z",
      "type": {
        "id": "acea0535-63d4-b85c-08af-2ca6060dd8ef",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "est mollit",
        "brand_id": "176022e9-0167-0cb9-afa4-095072be8af6",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1909-12-03T01:18:19.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "e45bf65d-aec4-bdbe-7eb4-4ef94cf49d42",
            "membership_type_id": "2a3624fb-c799-7f96-d8ae-815ab9564441",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "id exercitation ad",
              "qui consequat",
              "exercitation ut cillum",
              "nostrud non reprehenderit fugiat est"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1890-10-09T01:50:04.0Z",
            "updated_at": "1904-09-17T22:14:32.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1922-02-12T01:52:54.0Z",
        "updated_at": "1957-11-14T22:28:24.0Z",
        "deleted_at": "1899-10-04T06:04:10.0Z"
      },
      "payment_details_url": "laboris Lorem",
      "created_at": "1914-06-15T16:54:21.0Z"
    },
    {
      "id": "3bb838ee-1739-9544-92f4-d390486e6c38",
      "attention_reason": "setup_unpaid",
      "basket_id": "69e22d6d5e44c40152000094",
      "end_date": "1939-01-14T10:31:04.0Z",
      "external_ref": "minim nostrud aute eiusmod",
      "members": [
        {
          "customer_id": "4034691d-147f-9e04-8756-9119dd7f29d9",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "6f2bbe7c-29e2-5486-7857-1cdecacc558e",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "298dafce-df5a-c810-47a2-772cf447bae5",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "df9a4a1a-a785-99aa-8633-49ad47a2ea4c",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1958-10-27T23:44:36.0Z",
      "payment_method": {
        "type": "direct_debit",
        "last_4": "sunt dolor sed"
      },
      "rate": {
        "id": "4c293491-e22f-186a-cf08-430a3fa7e57e",
        "membership_type_id": "f089519d-935a-2799-6993-060489b4cb4a",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "non ea minim",
          "ut",
          "sint dolore eiusmod voluptate",
          "veniam"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1947-06-16T04:52:21.0Z",
        "updated_at": "1913-10-14T15:23:08.0Z"
      },
      "site_id": "e53fa652-bf43-69d2-8843-5f97f4c8b473",
      "source": "self_signup",
      "start_date": "1915-05-08T19:56:24.0Z",
      "status": "expired",
      "status_updated_at": "1950-09-07T05:07:31.0Z",
      "type": {
        "id": "33bf3acc-ef0a-fad2-ebd6-443b76f2dfe5",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "eiusmod",
        "brand_id": "e77ce931-1dfe-8191-220c-26a6a9d95410",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "public",
        "minimum_start_date": "1897-11-30T01:35:43.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "2763f9d0-adfb-0795-93dc-34d9ac0ab7a4",
            "membership_type_id": "2e6b2fb1-5f1a-7687-df6c-648c18bd5e38",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1962-10-07T19:56:55.0Z",
            "updated_at": "1906-02-03T14:35:05.0Z"
          },
          {
            "id": "58e45705-b0ba-4cd6-64ae-b5706fffd7a6",
            "membership_type_id": "e99e977e-8bf7-2a7c-24eb-7c5a4d6e743f",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "pariatur",
              "fugiat ea ex",
              "mollit deserunt",
              "magna sit officia"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1917-05-16T08:19:56.0Z",
            "updated_at": "1954-07-09T23:58:33.0Z"
          },
          {
            "id": "1056a1dd-f9f2-4ac4-68b6-c1c0684ae7de",
            "membership_type_id": "27007680-5b90-3d04-3928-8a4abc33df3a",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "laboris velit culpa"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1903-05-12T14:08:19.0Z",
            "updated_at": "1950-07-25T12:50:02.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1944-07-13T15:58:11.0Z",
        "updated_at": "1936-09-25T02:26:54.0Z",
        "deleted_at": "1926-12-19T10:06:47.0Z"
      },
      "payment_details_url": "amet ipsum esse veniam",
      "created_at": "1949-03-22T21:48:08.0Z"
    },
    {
      "id": "94110802-affe-19af-b175-180a3b3b1793",
      "attention_reason": "payment_outstanding",
      "basket_id": "69e22d6d5e44c40152000095",
      "customer": {
        "id": "eaba2c6d-a44a-da4f-f424-e99204542bbc",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1923-05-27",
        "brand_id": "9ae7bcf7-47ca-b843-15f4-9064e94ebc3b",
        "site_id": "608ab0e9-e45b-bc46-e18e-d0ffe7f8aa27",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "7954d164-8075-46ec-87b0-5523a11a4077",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1911-02-01T08:30:45.0Z",
        "created_at": "1930-07-21T02:34:16.0Z",
        "updated_at": "1954-10-07T11:37:40.0Z",
        "deleted_at": "1894-05-05T23:56:05.0Z",
        "last_active_at": "1903-11-08T03:33:51.0Z",
        "email_verified_at": "1940-09-23T08:19:33.0Z",
        "last_check_in": {
          "checked_in_at": "1895-06-22T08:40:34.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "7797f7e7-77dd-e01c-5e5d-30e8393dbfe8",
          "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": "est sint cillum"
      },
      "end_date": "1921-05-20T14:51:53.0Z",
      "external_ref": "proident enim",
      "members": [],
      "membership_number": "1234567890",
      "next_billing_date": "1926-08-13T04:32:45.0Z",
      "next_charge": {
        "id": "a90ff96c-c25a-6342-3e26-0f813a1813c9",
        "amount": 3995,
        "currency": "GBP",
        "status": "processing",
        "billing_period_from": "1954-11-19",
        "billing_period_to": "1930-11-07"
      },
      "payment_method": {
        "id": "ullamco nisi voluptate incididunt",
        "type": "card",
        "last_4": "ex deserunt Lorem",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "f823a912-9b15-1fa6-435c-72c3a6a486ca",
        "membership_type_id": "dd59bf0f-1973-f9f9-df9a-ece0e63cddf8",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "tempor Lorem",
          "mollit"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1936-03-26T10:36:58.0Z",
        "updated_at": "1890-05-28T05:30:17.0Z"
      },
      "site_id": "c757ad04-c063-2361-933e-7da9d8c18467",
      "source": "unknown",
      "start_date": "1961-09-02T01:42:32.0Z",
      "status": "needs_attention",
      "status_updated_at": "1916-02-13T22:05:24.0Z",
      "type": {
        "id": "14acfa04-b5d4-8391-8320-f7fe9f4dd398",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "labore ipsum velit voluptate fugiat",
        "brand_id": "5ee1d096-92a4-2997-a7d2-05f70527de9b",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1949-10-15T01:02:24.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "ccaa0d9a-8072-e094-1f7b-2b59233db623",
            "membership_type_id": "f3b85fe1-d554-bae6-5991-2e6d556e14d8",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "esse",
              "dolor tempor magna",
              "qui nulla nostrud quis cupidatat"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1963-06-27T01:02:16.0Z",
            "updated_at": "1915-08-28T23:22:48.0Z"
          },
          {
            "id": "8b6cf19a-6e19-8704-8fa4-8dcf94eaf3cc",
            "membership_type_id": "77ad09a2-4f50-8ad6-333b-4526720ad30f",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolor elit",
              "Ut reprehenderit ut in magna",
              "sint ad ullamco esse",
              "ullamco"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1899-04-06T13:04:08.0Z",
            "updated_at": "1909-04-01T23:45:07.0Z"
          },
          {
            "id": "1dd087c1-b34d-d1c8-67de-f1ce2e6143dc",
            "membership_type_id": "5b717bf0-c898-6b4c-8ebb-045ef7c56e12",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1965-12-17T17:05:23.0Z",
            "updated_at": "1905-08-23T05:22:33.0Z"
          },
          {
            "id": "48d268fa-2c92-3226-9f68-f76f573ae057",
            "membership_type_id": "f5b092c6-c0ba-1792-8d0e-3af359c9930b",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "reprehenderit est dolor ex",
              "dolore ea"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1966-01-11T19:56:42.0Z",
            "updated_at": "1900-11-24T07:48:27.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1969-08-19T14:01:37.0Z",
        "updated_at": "1952-11-09T23:04:21.0Z",
        "deleted_at": "1893-03-11T07:50:17.0Z"
      },
      "payment_details_url": "consectetur ullamco ex nisi",
      "created_at": "1927-09-23T03:17:32.0Z"
    },
    {
      "id": "61098e52-e25c-52eb-54a1-ff4c07d70d55",
      "attention_reason": "no_mandate",
      "basket_id": "69e22d6d5e44c40152000096",
      "customer": {
        "id": "1d2f903f-9a57-1a6b-f90e-9db0cd6185fa",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1943-05-30",
        "brand_id": "9ed9d38f-13f0-a98e-6256-228ce5c1d4c2",
        "site_id": "97c8d12a-43c0-1da5-11d7-e57cf688469a",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "b193d3c0-3251-9910-5cbf-15f1479e2d12",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6ca2b085-b626-0399-e2cf-9be8c5ddb224",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "2c515933-0732-4e8a-5339-d8811d1f62af",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1950-01-31T17:18:44.0Z",
        "created_at": "1897-05-17T20:26:58.0Z",
        "updated_at": "1958-08-02T02:36:48.0Z",
        "deleted_at": "1958-07-31T07:08:43.0Z",
        "last_active_at": "1902-08-03T15:07:17.0Z",
        "email_verified_at": "1914-04-22T13:07:21.0Z",
        "last_check_in": {
          "checked_in_at": "1939-10-12T02:32:18.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "1db6c383-be0d-5ef0-64a0-f7abca47e9a1",
          "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 in eiusmod proident"
      },
      "end_date": "1934-07-14T09:50:46.0Z",
      "external_ref": "mollit",
      "members": [],
      "membership_number": "1234567890",
      "next_billing_date": "1929-02-12T02:47:25.0Z",
      "next_charge": {
        "id": "cd9cd67b-9b39-be60-1e40-6e35bd8b1407",
        "amount": 3995,
        "currency": "GBP",
        "status": "processing",
        "billing_period_from": "1907-12-06",
        "billing_period_to": "1903-02-01"
      },
      "payment_method": {
        "id": "aliquip aliqua sint voluptate eu",
        "type": "direct_debit",
        "last_4": "ex pariatur Ut dolor",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "14aad3ed-43f7-70db-a094-a6b8897fb0eb",
        "membership_type_id": "b86b2324-761d-eda1-d8e9-df8b2c6eeda6",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "Lorem nostrud",
          "sint amet",
          "sit"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1937-04-04T14:59:45.0Z",
        "updated_at": "1907-12-11T21:54:50.0Z"
      },
      "site_id": "1e351df8-fb1b-23d6-021d-077b9c696c5e",
      "source": "unknown",
      "start_date": "1960-10-22T04:33:57.0Z",
      "status": "reserved",
      "status_updated_at": "1963-07-10T13:04:39.0Z",
      "type": {
        "id": "e25daa4f-e205-c796-abf9-3fe768f5aeef",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "voluptate Ut tempor magna",
        "brand_id": "c35920e2-dbc9-3fbb-8bbe-ab4b40e8d243",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1934-06-04T10:56:52.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "7762b5a9-25cb-02c4-5e8d-cf59b6c210ff",
            "membership_type_id": "5b675a04-7bc4-8362-0fcc-55467720dbb9",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "enim laborum consequat sed est",
              "ut pariatur"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1927-01-09T12:47:54.0Z",
            "updated_at": "1963-01-14T18:56:15.0Z"
          },
          {
            "id": "ceb04d74-5d21-db3f-6cea-68ce3c2af4fe",
            "membership_type_id": "c42a56e4-258b-ea83-f907-a0d1707f23e4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "exercitation occaecat adipisicing veniam est",
              "in",
              "commodo",
              "eiusmod velit voluptate"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1938-02-24T10:28:48.0Z",
            "updated_at": "1901-12-26T12:53:34.0Z"
          },
          {
            "id": "787a25d0-f20c-2ad3-ece8-a11829a83c42",
            "membership_type_id": "05af6d7e-5d72-0a9e-f4c9-afc1b774fe66",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "pariatur",
              "voluptate deserunt sint nulla aliqua"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1927-12-08T13:51:51.0Z",
            "updated_at": "1945-04-25T01:27:20.0Z"
          },
          {
            "id": "5c4eb4f6-0d14-b32e-9de3-b1de67d06d65",
            "membership_type_id": "a04e5840-a1e7-d683-8997-3cb17e10c526",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolor commodo culpa",
              "sint"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1945-05-12T19:39:08.0Z",
            "updated_at": "1969-10-17T01:33:23.0Z"
          },
          {
            "id": "a821095f-9320-0fb9-b912-817d6cc19131",
            "membership_type_id": "dbb9ed5f-b9fa-48a7-003b-2e1d43c3e71d",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "ullamco",
              "in veniam",
              "pariatur",
              "ullamco dolor"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1948-01-18T13:33:27.0Z",
            "updated_at": "1953-07-10T11:30:13.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1893-11-04T20:18:25.0Z",
        "updated_at": "1957-11-02T06:38:12.0Z",
        "deleted_at": "1894-12-07T18:31:47.0Z"
      },
      "payment_details_url": "Lorem ad ex",
      "created_at": "1960-09-05T11:30:41.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": "2c0344cf-c7d3-fbcb-8ef7-fd43c29a8114",
    "attention_reason": "site_id",
    "basket_id": "69e22d6d5e44c40152000097",
    "customer": {
      "id": "cdd8d356-4433-f722-df28-b489dbd16963",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1907-04-08",
      "brand_id": "738e97d5-fabf-6be1-9fad-357ccadcbf7e",
      "site_id": "a3d8dc86-a920-25b1-d724-e54921eb864a",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [],
      "preferred_locale": "en",
      "locked_at": "1916-05-16T19:01:35.0Z",
      "created_at": "1894-12-05T11:43:22.0Z",
      "updated_at": "1964-08-21T22:55:14.0Z",
      "deleted_at": "1941-04-14T03:01:34.0Z",
      "last_active_at": "1961-05-14T14:58:15.0Z",
      "email_verified_at": "1920-04-26T08:46:03.0Z",
      "last_check_in": {
        "checked_in_at": "1947-07-23T14:46:09.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "365e8e4b-16e6-fb99-4e1c-ebcc72e1da4e",
        "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": "reprehenderit amet deserunt proident"
    },
    "end_date": "1905-10-04T12:20:32.0Z",
    "external_ref": "veniam esse occaecat ullamco",
    "members": [
      {
        "customer_id": "de94f8a8-eed8-3881-7711-61fe21d0897d",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "9aecf8df-d539-b703-538d-d7bac38d4214",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "a46530b6-a2d0-3bc2-51d6-350b75527fb1",
        "is_lead": false,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1920-12-30T07:30:56.0Z",
    "next_charge": {
      "id": "681967aa-3e57-4ec8-2d95-ea2e6b230b73",
      "amount": 3995,
      "currency": "GBP",
      "status": "pending",
      "billing_period_from": "1896-04-04",
      "billing_period_to": "1924-01-16"
    },
    "payment_method": {
      "id": "dolore sit aute sunt deserunt"
    },
    "rate": {
      "id": "909ddd09-ea87-1697-6441-400928728679",
      "membership_type_id": "f25c0089-4fdc-5f6d-94d1-b8d267a2e266",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "aute tempor dolor proident",
        "in irure non ullamco",
        "minim",
        "pariatur aliqua in sit",
        "enim reprehenderit"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1951-12-27T21:16:13.0Z",
      "updated_at": "1962-11-20T02:29:38.0Z"
    },
    "site_id": "3440a8eb-56a6-e543-f92a-2b57cf3e9bc9",
    "source": "app",
    "start_date": "1963-07-30T01:12:23.0Z",
    "status": "expired",
    "status_updated_at": "1912-06-21T09:42:58.0Z",
    "type": {
      "id": "9d413f89-538e-81ed-036e-19492d1b84b3",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "voluptate aute reprehenderit",
      "brand_id": "27a4381c-fd3b-c2bc-0e86-d1dd59509f44",
      "offline_payments": false,
      "disable_confirmation_email": true,
      "private": false,
      "visibility": "private",
      "minimum_start_date": "1933-01-07T06:19:45.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "134f59a7-a6bb-4191-d022-f7e22c25a659",
          "membership_type_id": "8ceb7257-0b26-998a-3ae1-a0264432e824",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "sit nulla et",
            "officia enim",
            "qui do id proident"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1930-08-06T14:13:07.0Z",
          "updated_at": "1906-09-24T14:56:03.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1890-09-11T22:45:38.0Z",
      "updated_at": "1953-02-14T05:04:30.0Z",
      "deleted_at": "1906-07-29T14:51:33.0Z"
    },
    "payment_details_url": "voluptate sed mollit",
    "created_at": "1897-04-08T14:08:56.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": "7df9e9a9-a0bb-e519-55d5-b7b6b5da7e20",
    "membership": {
      "id": "0f8a5cce-8e19-975e-14d2-24708db84765",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "c0527026-5564-664e-4c49-96e25b885b26",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "processor_type": "Cash",
      "processor_type_id": "69e22d6e5e44c4015200013a"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "amet laborum velit",
    "can_download_receipt": false,
    "amount_refunded": 10989737,
    "refunded": true,
    "refunds": [
      {
        "id": "d2d31e79-4f74-3143-48f5-eba51c834c7d",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "5f77adc8-23ac-ad85-819f-166d60aa60d6",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1919-09-15T16:46:02.0Z",
        "updated_at": "1930-07-31T22:58:54.0Z"
      },
      {
        "id": "f090349c-ea41-62f1-2e13-031e92305ad0",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "6680764b-0e5c-c9d2-d37f-9200f4232934",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1945-01-16T10:05:43.0Z",
        "updated_at": "1944-11-27T01:37:48.0Z"
      },
      {
        "id": "625a4371-4f10-7d78-fd00-c0a4765ec562",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "c75372fd-00c8-831d-dd2d-163574596547",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1961-09-17T20:41:50.0Z",
        "updated_at": "1913-08-21T08:19:58.0Z"
      },
      {
        "id": "4122d870-f4cf-b254-6849-0adccaf4b445",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "7b58ee20-468f-48fd-4861-f3c1a807129d",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1965-08-24T10:42:39.0Z",
        "updated_at": "1909-10-16T17:01:09.0Z"
      }
    ],
    "site_id": "e7219860-513d-412f-b76f-f22c586426b1",
    "billing_period_from": "1946-03-23",
    "billing_period_to": "1892-01-08",
    "processing_at": "1893-05-26T01:59:24.0Z",
    "created_at": "1961-04-12T22:49:23.0Z",
    "updated_at": "1918-08-09T18:50:14.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": "1ba4f060-4bf0-7cbb-2dd9-3f9cfeae471f",
    "membership": {
      "id": "a18bfa8d-1d4e-614b-ef9a-2feade346c75",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "989861f0-ee83-6ddd-8b91-9fb486ac760d"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "69e22d6d5e44c40152000098"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "id adipisicing pariatur",
    "can_download_receipt": true,
    "amount_refunded": 65122403,
    "refunded": false,
    "refunds": [
      {
        "id": "06f44c36-1b4d-8d42-ffca-34b8799b10ca",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "022bbd33-c847-1c29-67fc-4fbff7c678a1",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1916-10-25T06:29:32.0Z",
        "updated_at": "1952-11-04T13:01:51.0Z"
      }
    ],
    "site_id": "0097f537-0ccc-3822-425b-163ff07ea3ec",
    "billing_period_from": "1928-10-18",
    "billing_period_to": "1963-09-08",
    "processing_at": "1951-01-15T12:34:01.0Z",
    "created_at": "1937-06-25T22:19:14.0Z",
    "updated_at": "1923-04-25T23:02:19.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": "c573f5ee-6afb-ec4d-5ac7-1f233130ab5d",
    "membership": {
      "id": "22e6ee5e-5fb4-58ec-499b-a32c3806b47e",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "6da506b3-f33a-2d33-d68d-c67ca0ec45b9",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type_id": "69e22d6d5e44c40152000099"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "ipsum velit",
    "can_download_receipt": true,
    "amount_refunded": -32347323,
    "refunded": true,
    "refunds": [
      {
        "id": "265368cd-d032-7d00-4497-b316abed67fb",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "9d781c4f-d298-6c61-803a-b5244b79d648",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1938-10-15T20:30:31.0Z",
        "updated_at": "1926-10-11T20:58:34.0Z"
      },
      {
        "id": "aa09c605-cea8-df1e-5503-cfd62cbc790d",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "4978e0f3-a030-d01c-d2b8-176bd1a37243",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1891-09-22T02:51:59.0Z",
        "updated_at": "1919-12-07T11:27:27.0Z"
      },
      {
        "id": "e2dbcd91-b14f-4f2f-43f2-e897af120e33",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "2b1b104b-0be5-af75-78b4-cddfca719500",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1942-01-14T15:34:51.0Z",
        "updated_at": "1964-06-29T11:43:22.0Z"
      },
      {
        "id": "9d6a641d-ec8d-8501-8ffe-0e287ca360de",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "82cd70e8-93a7-7481-5fbe-301decd0076d",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1900-12-23T05:16:03.0Z",
        "updated_at": "1919-07-23T14:02:07.0Z"
      }
    ],
    "site_id": "ab2bb606-c09a-df81-32c7-256b31364761",
    "billing_period_from": "1960-01-18",
    "billing_period_to": "1968-08-24",
    "processing_at": "1904-12-12T06:11:47.0Z",
    "created_at": "1961-03-08T13:03:51.0Z",
    "updated_at": "1930-08-28T17:48:59.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": "69e22d6e5e44c4015200013b",
    "organisation_id": "a5883f7b-1150-b525-70ed-396c9dc49b85",
    "site_id": "d1741adf-560e-d9f7-4694-c7d141ef6006",
    "customer_id": "50d9992b-4406-09c4-67bf-d3fd512edcef",
    "membership_id": "8b183cf8-6985-d78d-814c-ec55cf57f759",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "voluptate aliquip",
    "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": {
    "cupidatatc2": [
      "irure deserunt esse",
      "velit dolore",
      "Excepteur ut",
      "ut esse"
    ]
  },
  "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": "f5081f27-c485-e67d-cc53-2bc3a927f68f",
    "organisation_id": "bb124a7d-b698-c207-3fec-ceaeee111a95"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}