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": "cb5c8f6b-46c0-1de3-77e1-a1733829dd8f",
      "attention_reason": "mandate_revoked",
      "basket_id": "69e64b77e1a8c4013a000301",
      "customer": {
        "id": "800f48c4-690c-3b56-67da-2fbdd71f0946",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1968-10-24",
        "brand_id": "94753030-6aac-b9dd-9ce2-993086a1d6b7",
        "site_id": "9c5c59d8-de68-f2fa-00ef-a8a2460b037e",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "0d59afe8-f1d8-f233-4175-7c822e5b33f5",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "11a449d2-7599-e54d-e21e-de45f1380af9",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "4d383e83-be33-a15a-36af-64160454927b",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "4d70327b-d1ef-dc3f-53d2-3fbdc1cdb2d8",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "409d4378-d002-6cfe-d647-20dcf268ad51",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1937-04-27T05:06:27.0Z",
        "created_at": "1959-03-18T22:25:45.0Z",
        "updated_at": "1950-04-19T01:52:28.0Z",
        "deleted_at": "1898-09-05T02:21:50.0Z",
        "last_active_at": "1956-01-20T17:45:15.0Z",
        "email_verified_at": "1900-01-09T08:10:01.0Z",
        "last_check_in": {
          "checked_in_at": "1934-06-15T19:19:27.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "d7acc391-b931-e2b3-4122-9d113f99f4d9",
          "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": "magna sint consectetur"
      },
      "end_date": "1929-07-26T18:02:40.0Z",
      "external_ref": "non consequat labore officia exercitation",
      "members": [
        {
          "customer_id": "049b4cc7-7c2d-de94-3809-47281cde2cee",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "1a2575c3-9178-6e7c-e78c-f979e3834f78",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1922-02-01T18:37:28.0Z",
      "next_charge": {
        "id": "068776e5-111c-595c-610f-7f6c5f8e6fc3",
        "amount": 3995,
        "currency": "GBP",
        "status": "awaiting_approval",
        "billing_period_from": "1950-07-01",
        "billing_period_to": "1937-10-15"
      },
      "payment_method": {},
      "rate": {
        "id": "4a7305a6-01fb-c8ed-ee1c-6cd3706c5a09",
        "membership_type_id": "294817d4-e1c4-880e-2e8c-bb547d777f96",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1948-02-01T01:30:51.0Z",
        "updated_at": "1912-08-02T07:27:06.0Z"
      },
      "site_id": "9ad34b8e-8948-6dc0-b434-8838ba2bda61",
      "source": "import",
      "start_date": "1931-08-21T12:35:52.0Z",
      "status": "inactive",
      "status_updated_at": "1925-02-28T07:14:20.0Z",
      "type": {
        "id": "3addf324-5cb2-06f9-aac0-3656b34ce934",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "Excepteur",
        "brand_id": "31cdce79-8c6c-61d8-13b9-6510bff78eae",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1960-06-16T04:40:09.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "6ad8fd24-1916-189b-54ad-a08ed691e927",
            "membership_type_id": "5fbf5330-9086-4019-edd9-ff34c88124b8",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolor sint",
              "Excepteur ad est",
              "magna esse fugiat nisi",
              "dolor exercitation enim irure",
              "pariatur reprehenderit ipsum"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1934-01-19T20:44:33.0Z",
            "updated_at": "1930-06-06T08:39:41.0Z"
          },
          {
            "id": "caa3d450-1591-6142-bcda-8e0910460aad",
            "membership_type_id": "0d0aef10-23b9-06cc-955e-78ec59d7350c",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "et id",
              "consequat ea elit",
              "sit ipsum",
              "cupidatat non consectetur",
              "non reprehenderit"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1912-05-22T09:18:15.0Z",
            "updated_at": "1955-02-13T17:18:39.0Z"
          },
          {
            "id": "829c6276-6bdb-7cc7-ad1e-2b093f0131ae",
            "membership_type_id": "b4c649a0-d2b3-6fd5-5394-07266fdfc485",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "proident Lorem consequat cupidatat",
              "ullamco aute ipsum"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1900-05-05T17:55:59.0Z",
            "updated_at": "1935-09-08T17:49:44.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1968-12-19T16:44:23.0Z",
        "updated_at": "1943-04-10T03:57:39.0Z",
        "deleted_at": "1931-06-29T20:58:22.0Z"
      },
      "payment_details_url": "exercitation pariatur",
      "created_at": "1906-01-27T07:40:31.0Z"
    },
    {
      "id": "c15c2b67-6d4d-3682-b69d-443f48baa830",
      "attention_reason": "payment_disputed",
      "basket_id": "69e64b77e1a8c4013a000302",
      "customer": {
        "id": "aba5717f-6119-3363-e9c7-63750f80fd8d",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1967-12-23",
        "brand_id": "d7263924-9b32-f86f-55f9-4edb800d30b3",
        "site_id": "9b647f11-7d3c-a0bb-9f87-42fe94f0eb16",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "caf64c31-aef5-8a7e-1dcf-5d5f1a604f6d",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "401704d0-b14f-5e38-7d36-370baba7b417",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "a3086235-1b7c-8855-b6f1-3fb7ed607590",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "ad342d0e-039c-5743-74cb-c1d9a28968d0",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1894-09-15T16:11:30.0Z",
        "created_at": "1916-09-01T01:58:33.0Z",
        "updated_at": "1930-03-14T02:19:19.0Z",
        "deleted_at": "1948-11-06T13:32:27.0Z",
        "last_active_at": "1945-08-01T12:16:43.0Z",
        "email_verified_at": "1929-08-25T19:10:23.0Z",
        "last_check_in": {
          "checked_in_at": "1959-05-08T01:58:47.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "c8d87ebf-8438-24b6-b788-60e3fdbd947c",
          "file_name": "super-cool-photo.jpg",
          "mime_type": "image/jpeg",
          "original_url": "https://example.com/media/super-cool-photo.jpg",
          "size": 84256,
          "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
        },
        "external_ref": "nulla qui officia Ut exercitation"
      },
      "end_date": "1922-05-27T15:34:17.0Z",
      "external_ref": "esse dolore dolor",
      "members": [
        {
          "customer_id": "91d72e3c-c00f-da4c-4030-0fd8dad34698",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1953-10-20T02:57:38.0Z",
      "next_charge": {
        "id": "fedadc1d-bad8-4303-4cb6-af3b26f88cee",
        "amount": 3995,
        "currency": "GBP",
        "status": "succeeded",
        "billing_period_from": "1890-11-01",
        "billing_period_to": "1939-03-21"
      },
      "payment_method": {
        "id": "consectetur fugiat Ut sunt adipisicing",
        "type": "direct_debit"
      },
      "rate": {
        "id": "bf08326e-0168-f532-5562-b3e4e01e8078",
        "membership_type_id": "8bf7245c-da0a-18d0-3167-1fc516991556",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "mollit in aliqua est Duis",
          "reprehenderit exercitation dolor et",
          "labore voluptate dolor magna",
          "incididunt"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1935-07-20T17:44:07.0Z",
        "updated_at": "1928-07-24T01:36:28.0Z"
      },
      "site_id": "4e3c5f0b-bc20-220c-2d30-5175895b57b3",
      "source": "import",
      "start_date": "1948-01-28T12:06:57.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1943-11-19T14:47:28.0Z",
      "type": {
        "id": "e4ce4d6e-a19f-1342-752d-8c937a94dcd4",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "amet et ullamco eiusmod aliqua",
        "brand_id": "ad12810d-7a64-4539-88c9-893ddf215fb0",
        "offline_payments": true,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1925-12-09T23:10:36.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1933-01-22T01:58:28.0Z",
        "updated_at": "1961-06-05T07:41:04.0Z",
        "deleted_at": "1904-11-03T22:16:36.0Z"
      },
      "payment_details_url": "Ut amet cillum cupidatat consectetur",
      "created_at": "1893-10-12T18:35:40.0Z"
    },
    {
      "id": "66ea4e11-b16c-6076-2260-3e8888b08097",
      "attention_reason": "site_id",
      "basket_id": "69e64b77e1a8c4013a000303",
      "customer": {
        "id": "981bd718-65ef-e1ad-63d1-72daad0ae40c",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1936-02-05",
        "brand_id": "c292ab0f-b098-3922-4440-2b549592bf0a",
        "site_id": "dbb70992-a40a-03eb-84d3-79757c9c873d",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "e2a93e0e-d9d6-1dee-97aa-1d9a9e98f715",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "0a202a7d-403d-d164-5f26-56efbc85ab00",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6105f2ba-cd39-a37e-115d-467537f6bb07",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "d47bde80-4c9a-202b-4cb6-d2b45a2f92e7",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1943-09-22T17:52:52.0Z",
        "created_at": "1947-11-24T17:19:58.0Z",
        "updated_at": "1948-06-02T17:50:48.0Z",
        "deleted_at": "1937-11-01T13:02:16.0Z",
        "last_active_at": "1910-06-25T04:28:52.0Z",
        "email_verified_at": "1902-04-30T03:04:19.0Z",
        "last_check_in": {
          "checked_in_at": "1911-02-08T12:27:55.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "0d549003-f3ad-9c09-4713-ab5481fce0a8",
          "file_name": "super-cool-photo.jpg",
          "mime_type": "image/jpeg",
          "original_url": "https://example.com/media/super-cool-photo.jpg",
          "size": 84256,
          "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
        },
        "external_ref": "ut occaecat id nostrud sint"
      },
      "end_date": "1967-03-15T09:10:46.0Z",
      "external_ref": "commodo",
      "members": [
        {
          "customer_id": "61abc372-0c44-3b59-7127-77e5b2af5c0e",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "e9f7e629-023d-f7e1-17d7-7fe2d3cfa90c",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "4b50d647-f62b-4a42-a141-1963a0bd0e07",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "4afdfd6f-db9f-a4a5-b5e6-51ee7283e39e",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1916-08-17T01:42:23.0Z",
      "next_charge": {
        "id": "203e00f2-a21e-5c83-3608-cf3125c1b13c",
        "amount": 3995,
        "currency": "GBP",
        "status": "errored",
        "billing_period_from": "1966-11-29",
        "billing_period_to": "1952-11-07"
      },
      "payment_method": {
        "id": "adipisicing exercitation",
        "type": "card",
        "last_4": "exercitation laborum",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "f562d945-dc58-9aa7-4213-7a59e0c93c9e",
        "membership_type_id": "c73d97a9-ecb4-389d-56e7-3dfe0e7fac19",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "voluptate fugiat nisi Lorem eiusmod",
          "anim velit magna nostrud ut",
          "amet ut",
          "eu Duis aliquip aute irure"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1961-07-18T06:52:32.0Z",
        "updated_at": "1908-01-14T09:44:59.0Z"
      },
      "site_id": "051c9705-cfd6-cdf1-6d34-02ac90478da5",
      "source": "import",
      "start_date": "1898-07-14T08:59:11.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1932-11-30T22:18:05.0Z",
      "type": {
        "id": "de6f2a0a-0ba0-9c92-de2b-919a49a9e2de",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "non esse dolore et ullamco",
        "brand_id": "09f7a86c-7086-8dea-e357-468fd4c77eca",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1898-09-20T12:15:14.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "e9dd0505-95e6-4746-2eac-574efc76d493",
            "membership_type_id": "e395c551-624b-4b87-6e21-ecb249e68ef4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "enim in incididunt sed sint"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1923-08-21T11:07:28.0Z",
            "updated_at": "1915-08-27T03:26:25.0Z"
          },
          {
            "id": "fcf5b586-b249-5a6e-663e-c297d5d7958d",
            "membership_type_id": "b6a21cfd-0987-eb54-60d6-1b4a3c291569",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1965-02-05T15:01:44.0Z",
            "updated_at": "1951-05-06T18:57:34.0Z"
          },
          {
            "id": "b001ab88-0a64-8094-c9d2-003c5b25caf8",
            "membership_type_id": "f7e0121a-6a1e-1cc6-5db0-5391ea9d1245",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "eiusmod",
              "laboris sint dolore"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1933-02-10T06:32:51.0Z",
            "updated_at": "1913-05-20T01:03:50.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1923-11-24T21:39:19.0Z",
        "updated_at": "1902-10-26T20:52:26.0Z",
        "deleted_at": "1942-12-01T02:33:03.0Z"
      },
      "payment_details_url": "in ut sunt veniam dolor",
      "created_at": "1961-10-09T23:45:04.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": "dc77849b-9f3d-0dae-29a0-3b5abf81cd7a",
    "attention_reason": "payment_outstanding",
    "basket_id": "69e64b77e1a8c4013a000304",
    "customer": {
      "id": "f19cb975-4008-c2fa-d78b-5a07f2f04eb8",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1965-08-24",
      "brand_id": "ed16da65-a3e7-fd78-d820-c535820e8713",
      "site_id": "ab6bfb90-c1ee-7174-c83f-1d5505d54503",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [],
      "preferred_locale": "en",
      "locked_at": "1912-05-08T12:26:40.0Z",
      "created_at": "1932-07-04T13:45:42.0Z",
      "updated_at": "1928-08-26T11:53:59.0Z",
      "deleted_at": "1919-10-05T14:20:59.0Z",
      "last_active_at": "1962-06-26T10:55:35.0Z",
      "email_verified_at": "1952-03-13T20:52:47.0Z",
      "last_check_in": {
        "checked_in_at": "1942-03-10T12:15:17.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "c79e5985-66d0-cf44-e666-8bb90fdabbb4",
        "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 veniam ad elit"
    },
    "end_date": "1964-10-24T01:10:07.0Z",
    "external_ref": "elit",
    "members": [
      {
        "customer_id": "11795250-46ea-cea2-375c-2e0f8105fe79",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "da4b4a85-c7dc-065c-c47a-3c0a0c3b9630",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "d8304798-3e64-023d-637d-a3baa9c8ccfa",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "42661144-463e-17bf-e767-51d3400c6d38",
        "is_lead": true,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1892-08-08T10:17:38.0Z",
    "next_charge": {
      "id": "f083fe1d-0471-18b0-f4c8-c555c16ed1be",
      "amount": 3995,
      "currency": "GBP",
      "status": "awaiting_approval",
      "billing_period_from": "1932-08-13",
      "billing_period_to": "1968-01-10"
    },
    "payment_method": {
      "id": "do aliquip aliqua voluptate officia",
      "type": "card"
    },
    "rate": {
      "id": "f6c594d9-ddfa-ece4-8999-dcbe53ca1463",
      "membership_type_id": "6571d8c7-4b73-46c7-817c-fbe9b93fff01",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "voluptate consequat anim nulla",
        "dolor",
        "elit",
        "aliqua in elit",
        "magna Ut exercitation"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1904-12-21T21:30:04.0Z",
      "updated_at": "1896-10-15T19:13:33.0Z"
    },
    "site_id": "e4892cf8-318f-4ccd-8460-741e1d58c597",
    "source": "self_signup",
    "start_date": "1891-03-30T13:02:28.0Z",
    "status": "active",
    "status_updated_at": "1914-04-24T16:24:57.0Z",
    "type": {
      "id": "acd2df7e-e74c-7675-e07d-652d77d12141",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "sed ipsum cillum fugiat deserunt",
      "brand_id": "5a7aee1b-f4f0-dc54-7982-bf6c102e3032",
      "offline_payments": true,
      "disable_confirmation_email": false,
      "private": false,
      "visibility": "private",
      "minimum_start_date": "1969-01-15T15:47:34.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1957-03-09T01:12:14.0Z",
      "updated_at": "1919-09-24T11:30:04.0Z",
      "deleted_at": "1926-04-10T23:09:34.0Z"
    },
    "payment_details_url": "adipisicing magna consequat reprehenderit",
    "created_at": "1946-07-22T12:01:28.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": "daf6b5de-b4a0-8151-73bb-d56c2b82f84c",
    "membership": {
      "id": "fcba5e68-e879-e4c4-082e-28690ca1dbd6",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "b4d27762-64a6-d97f-d780-aa3933a78a02",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "anim non commodo ad ea",
    "can_download_receipt": false,
    "amount_refunded": -86227727,
    "refunded": true,
    "refunds": [
      {
        "id": "d6b5ef1d-be8e-87f7-7ed8-b0f54beeb5e9",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "256b6049-6289-793f-3566-0ea434f27c6b",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1940-01-28T16:41:43.0Z",
        "updated_at": "1930-04-17T02:23:34.0Z"
      },
      {
        "id": "d0ec518b-725c-72e7-ec39-e56d1f874d63",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "51e9ecd4-b2a3-b393-f5d0-0fde22b48045",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1896-09-09T06:14:07.0Z",
        "updated_at": "1944-12-28T11:39:27.0Z"
      },
      {
        "id": "6a89e427-5429-d984-6cb8-c2006c1623e4",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "4564934b-990e-768c-51ac-619054d5d3c9",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1932-01-11T03:37:20.0Z",
        "updated_at": "1923-08-14T12:14:29.0Z"
      }
    ],
    "site_id": "4dbc8f31-ad6b-c19f-443c-bdb2994b5c78",
    "billing_period_from": "1901-03-02",
    "billing_period_to": "1904-07-19",
    "processing_at": "1944-05-06T03:41:21.0Z",
    "created_at": "1890-01-18T06:21:10.0Z",
    "updated_at": "1915-09-11T22:36:19.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": "7cbf6c24-d2eb-97a4-faae-8a9ac2699539",
    "membership": {
      "id": "dad54d26-befe-9aa9-8e06-6d0d5a838e6a",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "024d9fa7-8a1e-f3c5-3f3e-b5a9bb5c7a5e",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "processor_type_id": "69e64b77e1a8c4013a000305"
    },
    "amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "Lorem culpa sit minim mollit",
    "can_download_receipt": true,
    "amount_refunded": 34663812,
    "refunded": true,
    "refunds": [
      {
        "id": "5458899b-5494-59b6-6fce-080d2ba13b98",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "1144e83f-42b2-a526-016e-c95033d49c56",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1897-01-21T04:27:54.0Z",
        "updated_at": "1962-06-13T13:01:33.0Z"
      },
      {
        "id": "2033037a-583c-99ba-1f2a-16a7557173fe",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "aa3c24fd-f83f-62ef-366e-0784635dc3c5",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1956-10-31T17:26:03.0Z",
        "updated_at": "1961-12-19T11:03:34.0Z"
      },
      {
        "id": "8c6bd75c-935b-997e-2f84-1c9ab0935592",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "2938b9fb-555b-f350-66f2-5c09461684d7",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1933-08-25T15:06:13.0Z",
        "updated_at": "1892-05-30T06:59:11.0Z"
      },
      {
        "id": "f0952018-d53a-56c7-7b68-83c9185fe41e",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "67ebc3bb-676b-11dd-a0b4-918eee8073e5",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1908-04-17T22:45:26.0Z",
        "updated_at": "1916-03-15T03:15:07.0Z"
      },
      {
        "id": "473933d9-9b51-d7d4-403c-d0d02a3af02a",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "7858f3a8-8860-8f85-a78b-c46fb31ddc9f",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1925-03-06T15:17:28.0Z",
        "updated_at": "1908-08-22T01:18:45.0Z"
      }
    ],
    "site_id": "933120bb-27ef-bf60-ac12-26a2a2fd70cf",
    "billing_period_from": "1916-09-01",
    "billing_period_to": "1969-09-14",
    "processing_at": "1959-01-25T11:06:10.0Z",
    "created_at": "1961-09-28T13:10:32.0Z",
    "updated_at": "1967-09-08T11:28:13.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": "64164db5-e60a-8a03-6ad4-6d3810d65040",
    "membership": {
      "id": "266db827-1dca-3280-599e-fdb15c329452",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "2c7b8e2f-0258-e1a7-1320-4401f09ae1d8",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "last_4": 4001
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "laborum",
    "can_download_receipt": false,
    "amount_refunded": 79296323,
    "refunded": false,
    "refunds": [
      {
        "id": "f02b2632-5e87-2565-73d2-e209a11854d3",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1910-10-28T18:45:08.0Z",
        "updated_at": "1911-02-10T19:08:50.0Z"
      },
      {
        "id": "433ab73f-155d-d415-b109-bccd944b9ec9",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "57105cf2-56c4-3c2a-f4d5-9cd034e200d6",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1901-08-09T10:10:14.0Z",
        "updated_at": "1928-09-20T02:19:13.0Z"
      },
      {
        "id": "5ede2463-cafa-6215-0536-3e4e1d6ec372",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "30069e28-4ca7-1eea-da9a-c7c35c521da1",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1942-12-31T01:26:13.0Z",
        "updated_at": "1916-11-25T21:39:14.0Z"
      },
      {
        "id": "a9076cbf-2dbc-3db9-053a-ee1b548048d3",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "5f2e40d5-e086-f8a4-6085-66f6b01eaa67",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1892-12-19T21:41:51.0Z",
        "updated_at": "1945-12-29T21:26:09.0Z"
      },
      {
        "id": "1a1f84ca-57af-b72e-899c-8043a69f33a2",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "dae1832b-6d87-7f04-807e-04e9a1120b6f",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1919-01-03T20:18:50.0Z",
        "updated_at": "1909-07-15T03:01:15.0Z"
      }
    ],
    "site_id": "259f9c3c-5c0a-2ce7-5017-16066603f755",
    "billing_period_from": "1898-05-12",
    "billing_period_to": "1904-11-26",
    "processing_at": "1962-05-18T06:01:25.0Z",
    "created_at": "1969-06-21T15:46:01.0Z",
    "updated_at": "1943-03-30T20:30:07.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": "69e64b77e1a8c4013a000408",
    "organisation_id": "7712732f-565b-6e34-31bf-86ffb210f388",
    "site_id": "e1587298-3f26-baf1-6d12-73a59db7663e",
    "customer_id": "7ff0c866-3ae0-7b94-8e31-2aaf120a93d2",
    "membership_id": "54886f72-05ce-0a50-f923-06e9e1d4ecb9",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "minim fugiat occaecat ullamco Excepteur",
    "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": {
    "irure_2c4": []
  },
  "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": "5dcdad35-331b-4e5b-4fdd-24034864dd9d",
    "organisation_id": "dd9649f5-aab3-b6a0-e3dc-61bc8ba8a77e"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}