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": "d16ed10f-46cf-2409-d688-3c7b0bd221f1",
      "attention_reason": "payment_outstanding",
      "basket_id": "69d94eb31bec7c014200032d",
      "customer": {
        "id": "43c439ca-c66b-443c-a19c-0429d7606104",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1906-06-01",
        "brand_id": "d207f022-5a32-94c6-da89-c46b215c3475",
        "site_id": "ae93e781-4287-710f-8324-c4478b241a62",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "5d05e43a-783c-ef18-1fe4-2ce1efd9827f",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1962-10-18T22:22:47.0Z",
        "created_at": "1927-02-04T01:10:42.0Z",
        "updated_at": "1955-10-07T07:49:01.0Z",
        "deleted_at": "1891-03-25T03:04:13.0Z",
        "last_active_at": "1903-02-19T18:02:31.0Z",
        "email_verified_at": "1902-01-18T13:29:41.0Z",
        "last_check_in": {
          "checked_in_at": "1928-04-09T11:31:25.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "8a5b2ad2-fe83-b208-2eef-32a53080d3b7",
          "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": "et voluptate eu Lorem sed"
      },
      "end_date": "1924-11-13T14:26:30.0Z",
      "external_ref": "aliquip adipisicing exercitation",
      "members": [
        {
          "customer_id": "9a972be4-9956-91d9-b2ce-27f7d38f6266",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "5e86da1a-69b7-1e11-6bbc-cf5410bb492e",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1968-05-14T07:47:06.0Z",
      "next_charge": {
        "id": "822e6713-e27d-ec94-35d0-372535397f9c",
        "amount": 3995,
        "currency": "GBP",
        "status": "failed",
        "billing_period_from": "1959-08-01",
        "billing_period_to": "1930-08-22"
      },
      "payment_method": {
        "id": "Ut deserunt",
        "type": "card",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "91242c41-1a9b-0fb5-0969-2948689f2210",
        "membership_type_id": "419e43ed-c118-3779-2cec-12e36daae9e4",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "culpa proident exercitation cillum ea",
          "laborum aliqua Excepteur",
          "aliqua",
          "Ut laborum"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1897-07-02T23:27:15.0Z",
        "updated_at": "1920-01-20T22:36:50.0Z"
      },
      "site_id": "28a6345f-90e5-de0a-d317-fe7e6c924c00",
      "source": "unknown",
      "start_date": "1919-04-22T01:22:51.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1900-12-04T10:53:23.0Z",
      "type": {
        "id": "cd6e4fdf-53d2-51b0-2b1f-87839b024cca",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "cillum exercitation",
        "brand_id": "28e8c544-f6a0-b96c-2bdd-aff0c5dd0f3f",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1940-10-07T21:25:38.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "cce4cda8-4568-d572-329a-043b57940bed",
            "membership_type_id": "5c9bab4f-da3d-fb55-7a13-de2f8cb7fcc5",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "fugiat sit ex aliquip",
              "exercitation nisi nulla"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1932-02-09T23:48:13.0Z",
            "updated_at": "1936-03-20T10:31:26.0Z"
          },
          {
            "id": "d3cd2353-8dfe-bc2f-1269-159430c1488d",
            "membership_type_id": "9c0e2ae6-90f7-b64e-4b1e-6a2d0407d8c4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1901-03-05T14:10:35.0Z",
            "updated_at": "1933-11-30T01:34:27.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1908-05-08T17:50:59.0Z",
        "updated_at": "1902-11-17T19:30:41.0Z",
        "deleted_at": "1942-04-01T22:18:47.0Z"
      },
      "payment_details_url": "Duis sint nostrud cillum eu",
      "created_at": "1891-02-05T21:27:53.0Z"
    },
    {
      "id": "5b72106f-2411-e7c9-589d-21f4025e85b8",
      "attention_reason": "payment_disputed",
      "basket_id": "69d94eb31bec7c014200032e",
      "customer": {
        "id": "0abb5a22-5e5c-691e-cf77-e43df5d8e384",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1947-09-05",
        "brand_id": "436ae4b8-95b1-ab3f-c45f-b79163a6b3d9",
        "site_id": "84ad7ecc-8b26-81bb-1839-b85ef75c9bd1",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "e1c83709-db85-bcbb-743d-776f0e17fe22",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "46dee367-f85b-7f30-1841-e3fe4cbf97ee",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "12914da5-f61e-f160-cf79-682861da4c52",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1931-07-15T01:53:34.0Z",
        "created_at": "1925-10-03T17:37:40.0Z",
        "updated_at": "1944-07-20T12:24:55.0Z",
        "deleted_at": "1968-10-02T22:37:32.0Z",
        "last_active_at": "1956-09-10T02:25:59.0Z",
        "email_verified_at": "1906-10-11T01:13:17.0Z",
        "last_check_in": {
          "checked_in_at": "1914-05-27T21:28:51.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "f6df8628-e6be-e6fc-a7df-077787f84ae9",
          "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": "commodo laborum enim"
      },
      "end_date": "1963-10-06T14:57:36.0Z",
      "external_ref": "tempor do Duis",
      "members": [
        {
          "customer_id": "e4e002db-23dc-94f1-a672-98a4e4f0ecdc",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "e660efaf-349b-0a68-3adb-8e460064783d",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "9189bcef-25db-61d4-f48d-433a8e0416cd",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1952-01-28T16:39:50.0Z",
      "next_charge": {
        "id": "24c8bcd5-45d6-5de4-74a8-f0ddd28f3fad",
        "amount": 3995,
        "currency": "GBP",
        "status": "awaiting_approval",
        "billing_period_from": "1892-07-16",
        "billing_period_to": "1892-02-10"
      },
      "payment_method": {
        "id": "et",
        "type": "card",
        "last_4": "velit et aliquip irure adipisicing",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "b8215478-b2d0-012c-ab38-c9ee5ca46f77",
        "membership_type_id": "5de46601-c9d2-bae4-c9b3-586974d07d95",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "deserunt magna et",
          "Duis",
          "pariatur est in qui"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1956-09-07T01:21:01.0Z",
        "updated_at": "1928-03-08T14:18:31.0Z"
      },
      "site_id": "2b66c42a-8460-6b34-0325-5587fdcec464",
      "source": "import",
      "start_date": "1943-09-05T15:34:46.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1911-04-14T10:43:11.0Z",
      "type": {
        "id": "17769b7d-7566-1e14-92af-f2c29754c23f",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "dolore sunt ad in dolor",
        "brand_id": "338bd22a-17ee-e0cb-ff79-e9d4ceeb1a02",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "private",
        "minimum_start_date": "1895-11-30T10:44:17.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "7d8ca8e5-abab-868b-f2d0-ec5272a8a109",
            "membership_type_id": "5b8db8da-7b28-a5cb-98a2-bbf4f3b91d0d",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "deserunt",
              "reprehenderit ut nostrud"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1948-11-05T09:53:50.0Z",
            "updated_at": "1929-05-22T17:19:44.0Z"
          },
          {
            "id": "1fc6fd38-61c8-5163-4deb-526e9d3524e2",
            "membership_type_id": "8e12a336-0cfd-657d-c9dd-c8bb935a0996",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "laboris cillum non laborum nisi",
              "commodo dolor deserunt",
              "nisi in do ullamco deserunt",
              "anim tempor exercitation",
              "culpa ullamco occaecat tempor laborum"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1947-10-27T17:12:11.0Z",
            "updated_at": "1927-10-07T23:23:51.0Z"
          },
          {
            "id": "669ec3eb-2607-8000-fbe8-14eeebb53430",
            "membership_type_id": "3360d204-3721-fd18-8fd5-05c9806de6b6",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1958-01-17T03:23:13.0Z",
            "updated_at": "1939-04-24T14:23:43.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1949-03-22T13:32:50.0Z",
        "updated_at": "1892-08-30T15:27:50.0Z",
        "deleted_at": "1908-10-10T14:49:42.0Z"
      },
      "payment_details_url": "reprehenderit",
      "created_at": "1936-02-02T02:23:33.0Z"
    },
    {
      "id": "756d739e-f33e-82b0-dbfc-d5b60d63c267",
      "attention_reason": "setup_unpaid",
      "basket_id": "69d94eb31bec7c014200032f",
      "customer": {
        "id": "7c9d8d48-02d9-af5c-c609-e72c611740ed",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1944-12-29",
        "brand_id": "0f960bbf-1eb2-5df7-e12d-cc065c5101d6",
        "site_id": "e139e0fe-21f7-4b03-6f7b-16fb67cf99d7",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "f99e81c2-b514-76a9-50fb-51e40d40f0b0",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "69230c68-a739-1baf-6eaa-4917ce5fefd9",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "efa6372b-c8b6-39bf-2977-881de12dc70c",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1903-01-25T01:24:15.0Z",
        "created_at": "1960-04-22T04:46:38.0Z",
        "updated_at": "1947-04-13T23:06:40.0Z",
        "deleted_at": "1925-03-28T22:24:52.0Z",
        "last_active_at": "1932-11-24T20:58:44.0Z",
        "email_verified_at": "1933-05-04T01:22:43.0Z",
        "last_check_in": {
          "checked_in_at": "1923-06-03T20:01:07.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "5a717cda-11a0-8a63-ec8d-9d58b11b99df",
          "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 non id labore"
      },
      "end_date": "1919-05-15T10:01:48.0Z",
      "external_ref": "exercitation veniam do",
      "members": [
        {
          "customer_id": "8bc8da85-89a5-cd94-1c04-cb321070dfbd",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "7c4fae36-7841-57dc-7ce5-0ec0232775fd",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "c4533208-266f-bf04-61f1-035e67c9d105",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1903-03-08T16:36:08.0Z",
      "next_charge": {
        "id": "4ea6a2a3-953e-ae6b-0595-dde1ab7f5629",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1907-11-24",
        "billing_period_to": "1924-08-19"
      },
      "payment_method": {
        "type": "card",
        "last_4": "quis do in",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "078d5dd2-50e9-df4e-1114-c6ffdf437f93",
        "membership_type_id": "0bf7d36c-58c1-7633-985b-5eabcbc124ae",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1963-02-23T12:25:39.0Z",
        "updated_at": "1940-04-19T20:22:36.0Z"
      },
      "site_id": "97d3b04f-c6e1-6050-cf4b-caf1a71da0ad",
      "source": "app",
      "start_date": "1963-05-22T01:47:17.0Z",
      "status": "active",
      "status_updated_at": "1899-08-23T13:19:42.0Z",
      "type": {
        "id": "0960e853-2667-b0e3-2254-225da19058f2",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "ex reprehenderit aliqua",
        "brand_id": "31df85ff-bbab-c9f2-627c-b9657a2eb288",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1962-09-03T05:42:13.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1942-03-22T07:28:06.0Z",
        "updated_at": "1956-10-14T13:53:29.0Z",
        "deleted_at": "1925-06-28T08:22:38.0Z"
      },
      "payment_details_url": "dolor",
      "created_at": "1919-09-06T09:27:29.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": "7af3c675-855f-a62a-a962-0f15d4f3c083",
    "attention_reason": "no_mandate",
    "basket_id": "69d94eb31bec7c0142000330",
    "customer": {
      "id": "e804e1ac-eb02-5ab2-19f6-bc440db0f4ac",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1915-06-09",
      "brand_id": "ede3303f-5629-b737-9194-8d564f8ae4e8",
      "site_id": "e3c1dd13-85bd-d952-a97b-476eab3a5f11",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "ca771c69-b02f-1535-36cf-993e2381a146",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1963-11-28T22:18:22.0Z",
      "created_at": "1910-03-20T07:17:18.0Z",
      "updated_at": "1936-12-24T09:36:30.0Z",
      "deleted_at": "1938-02-10T21:59:51.0Z",
      "last_active_at": "1959-09-30T04:46:59.0Z",
      "email_verified_at": "1912-11-01T17:41:35.0Z",
      "last_check_in": {
        "checked_in_at": "1963-06-28T15:25:04.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "a1e58b47-978d-fc08-45f8-a63cb44234fa",
        "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": "ad consectetur"
    },
    "end_date": "1956-09-23T14:36:42.0Z",
    "external_ref": "minim aliquip",
    "members": [
      {
        "customer_id": "775a1e7b-43b0-9f29-b3d6-9aa3667c3583",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "f664f851-68cf-38a3-1a0e-739786e44f25",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "239b697e-f75b-f12b-0bc2-8b92d87c8155",
        "is_lead": true,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "663ca5b7-45d9-2cb8-f690-75d80dce11e3",
        "is_lead": false,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1907-02-25T08:47:45.0Z",
    "next_charge": {
      "id": "18eb9d22-d915-8df4-95a4-2bc69907a179",
      "amount": 3995,
      "currency": "GBP",
      "status": "succeeded",
      "billing_period_from": "1920-05-17",
      "billing_period_to": "1965-11-02"
    },
    "payment_method": {
      "id": "est consectetur",
      "type": "direct_debit"
    },
    "rate": {
      "id": "46f29c7b-efce-0fad-f05b-004b34ed6f64",
      "membership_type_id": "8927ad38-3da4-17e0-3bdc-b1d1f06cbc50",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "sed sunt velit",
        "dolore",
        "dolore mollit commodo",
        "anim mollit",
        "dolore voluptate reprehenderit eu"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1904-05-22T15:36:34.0Z",
      "updated_at": "1932-12-17T17:17:35.0Z"
    },
    "site_id": "5bd435be-1ed7-6b4e-6287-43ae5b0d6398",
    "source": "app",
    "start_date": "1943-05-21T06:09:20.0Z",
    "status": "active",
    "status_updated_at": "1896-03-23T19:21:56.0Z",
    "type": {
      "id": "bb606aec-6fea-9f48-e7fd-9ccbe82b6ee6",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "sit in enim",
      "brand_id": "35d6ce25-b26c-e97d-1b57-f9ac35376c61",
      "offline_payments": false,
      "disable_confirmation_email": true,
      "private": true,
      "visibility": "private",
      "minimum_start_date": "1949-07-18T20:04:41.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "639c5585-622d-0898-114b-b04f26f7e6bc",
          "membership_type_id": "d2403dbb-7fa2-5e9c-df8f-5810800930e4",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1923-04-17T16:33:31.0Z",
          "updated_at": "1962-12-06T15:37:04.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1890-06-18T01:16:13.0Z",
      "updated_at": "1925-08-30T09:54:16.0Z",
      "deleted_at": "1899-06-11T03:46:17.0Z"
    },
    "payment_details_url": "adipisicing",
    "created_at": "1913-12-11T09:58:17.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": "6d592cc7-7ce5-c76f-a3c0-253f57c1494d",
    "membership": {
      "id": "545ceeaa-633b-9b35-8e57-62166e66b552",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "5dab00fa-a193-b9ac-ac7d-d3ebfbf22677",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "69d94eb41bec7c014200042b"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "tempor",
    "can_download_receipt": false,
    "amount_refunded": -78350826,
    "refunded": false,
    "refunds": [],
    "site_id": "0dd98909-7dac-27e8-4b40-48a0b510c51f",
    "billing_period_from": "1966-12-14",
    "billing_period_to": "1920-03-25",
    "processing_at": "1924-10-09T12:58:58.0Z",
    "created_at": "1941-04-10T11:01:48.0Z",
    "updated_at": "1907-09-11T21:54:57.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": "05dddeed-2470-b9b2-cdb6-44d4dfa1c169",
    "membership": {
      "id": "ca6e4d04-fb03-f4db-0d67-25507d9af374",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "2575a73d-2703-a1b5-cc03-8fa7143cecf1",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "processor_type": "Cash",
      "processor_type_id": "69d94eb31bec7c0142000331"
    },
    "amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "ullamco",
    "can_download_receipt": true,
    "amount_refunded": 62751615,
    "refunded": true,
    "refunds": [
      {
        "id": "994fb29a-8aff-65e5-44be-2871d7a410aa",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "cc5968e6-70b9-8ab6-6b1a-6b1944eb759f",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1939-08-11T05:04:03.0Z",
        "updated_at": "1902-06-26T10:53:02.0Z"
      }
    ],
    "site_id": "2d2f447e-25fe-f14b-6913-14582abbbc80",
    "billing_period_from": "1969-07-12",
    "billing_period_to": "1893-08-15",
    "created_at": "1918-01-16T10:20:01.0Z",
    "updated_at": "1956-03-15T05:01:58.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": "9cfa3c8d-ec73-5f9f-e3d4-f51b057a5b0f",
    "membership": {
      "id": "133aad21-6503-24a9-2993-8b104ce42d8d",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "aadd9aea-8404-60a2-d9e8-ae9dc95158db",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "last_4": 4001,
      "processor_type_id": "69d94eb31bec7c0142000332"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "nostrud anim incididunt",
    "can_download_receipt": false,
    "amount_refunded": 88147537,
    "refunded": true,
    "refunds": [
      {
        "id": "f94ffda5-c70a-a8be-8f17-b37de7400f68",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "783ac577-53e0-b6c8-1ac7-c708a47c4b0a",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1933-07-10T12:50:05.0Z",
        "updated_at": "1935-10-01T11:19:22.0Z"
      },
      {
        "id": "b2c2ddba-eabb-b443-b735-d6bb7363343d",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1947-07-23T03:54:37.0Z",
        "updated_at": "1916-12-30T19:01:49.0Z"
      }
    ],
    "site_id": "5d4b52ae-6f45-9663-3bb5-c95476e27872",
    "billing_period_from": "1910-05-02",
    "billing_period_to": "1924-08-15",
    "processing_at": "1950-07-01T01:33:20.0Z",
    "created_at": "1937-09-29T21:10:49.0Z",
    "updated_at": "1930-08-05T01:48:10.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": "69d94eb41bec7c014200042c",
    "organisation_id": "e30f9150-0679-4b2b-5fe1-ea24a82ac4f1",
    "site_id": "908343fa-f579-7931-edaf-2b5b53b3a0f5",
    "customer_id": "4a8eecff-bdbc-360c-5435-11d8967dee83",
    "membership_id": "9dff9922-e307-a137-e52c-928f089c655d",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "eiusmod nulla",
    "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": {
    "occaecatd1": [
      "mollit laboris id fugiat velit",
      "cillum esse",
      "voluptate pariatur cillum"
    ],
    "Lorem68": [
      "et irure dolor",
      "dolor magna sit qui",
      "commodo laborum sit ut tempor",
      "eiusmod proident amet cupidatat aute",
      "eiusmod veniam culpa"
    ],
    "occaecat_14": [
      "dolore mollit velit id"
    ]
  },
  "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": "66e92a55-f292-918f-932e-d1a531ac8899",
    "organisation_id": "f34fca2b-e3f2-44b3-5def-3bde8931da24"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}