Memberships

A Membership represents a membership belonging to one or more Customers.

Schema

Attributes

  • The ID of the membership

  • The ID of the site this membership belongs to

  • 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.

  • Possible values are active, needs_dd_mandate, needs_attention, reserved, inactive, expired and upcoming

  • Where the membership was created

    Possible values are self_signup, app, import and unknown

  • 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 date which the membership starts

  • The date which the membership ends

  • The datetime which the membership was created

  • The basket ID which was used to purchase this membership, if applicable.

  • An external reference for this membership.

  • 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.

  • 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

""
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": "b5b43ac2-c65d-86fa-efe0-d04a25bbf181",
      "site_id": "da09c07d-ceb7-4856-c783-2bea596ed69d",
      "membership_number": "1234567890",
      "customer": {
        "id": "98719276-e5f5-d080-0515-f7d6db2d23ce",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1943-01-09",
        "brand_id": "fb844de2-c16e-2343-7ae3-f322f4ecba3d",
        "site_id": "a77e5dba-be1b-2803-3016-ca105b7fd3fb",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "7fe61b7a-70b2-0985-b5ad-0dc08214393d",
            "name": "VIP",
            "color": "ff6634"
          },
          {
            "id": "ed719d6c-06e4-6a8c-fcf4-58354a232ca7",
            "name": "VIP",
            "color": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1928-06-26T18:45:42.0Z",
        "created_at": "1910-05-08T04:28:30.0Z",
        "updated_at": "1917-06-10T15:57:46.0Z",
        "deleted_at": "1906-06-22T21:19:06.0Z",
        "last_active_at": "1965-07-05T11:18:03.0Z",
        "email_verified_at": "1963-06-09T01:23:55.0Z",
        "last_check_in": {
          "checked_in_at": "1962-04-30T13:56:20.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "bae04d77-71a0-cf81-e599-6a8a2bb68386",
          "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"
      },
      "members": [
        {
          "customer_id": "bbbed04c-afba-85b4-1e55-83ed1f9eeaab",
          "membership_number": "1234567890",
          "is_lead": false
        },
        {
          "customer_id": "7250a621-4024-7219-0484-9870760ea549"
        },
        {
          "customer_id": "2f4a0ad6-956e-3827-6f30-ec5781330aff",
          "membership_number": "1234567890",
          "is_lead": false
        }
      ],
      "type": {
        "id": "c25fd7da-5d1c-bf63-3702-1a66aae8d141",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "exercitation sint proident",
        "brand_id": "57d874f3-70b4-9d85-0384-ef4b2682c72c",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "public",
        "minimum_start_date": "1942-08-02T20:06:28.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "94b87555-29aa-f042-c7d0-79570ebdaf70",
            "membership_type_id": "436f40ad-3af3-c7cc-944f-f6509e1761f6",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1937-06-17T09:30:58.0Z",
            "updated_at": "1894-09-15T10:03:41.0Z"
          },
          {
            "id": "649627f6-87f0-5544-a539-adc3e2d47fdb",
            "membership_type_id": "3fe0e826-0d3b-fbd8-2068-5bc1415eca5c",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "aute ipsum minim",
              "aute",
              "in est incididunt minim velit"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1893-01-24T20:10:44.0Z",
            "updated_at": "1951-09-25T05:14:58.0Z"
          },
          {
            "id": "f8634c85-7650-938c-4d7d-ce89fd981399",
            "membership_type_id": "722a56a7-c648-e9f6-df99-2c94bdf1333a",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "nulla occaecat in amet in",
              "irure in in"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1953-02-28T10:20:36.0Z",
            "updated_at": "1924-03-21T05:54:27.0Z"
          },
          {
            "id": "4471b374-be8c-9947-f138-aeecc2723b3c",
            "membership_type_id": "8d615d4a-f324-690e-7dcc-d1bacdcbc3c7",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "consequat ut aliquip reprehenderit",
              "incididunt aliqua in",
              "tempor sed cupidatat",
              "consectetur Lorem dolore ex nulla",
              "Lorem quis"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1953-07-22T01:50:36.0Z",
            "updated_at": "1900-01-31T02:25:23.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1915-03-01T03:33:17.0Z",
        "updated_at": "1922-05-18T22:01:48.0Z",
        "deleted_at": "1916-02-08T10:07:33.0Z"
      },
      "rate": {
        "id": "576048e9-39d3-efc8-1571-f2eac783cc01",
        "membership_type_id": "e6854230-1c06-c028-28ca-b7591bd0ac8d",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "enim"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1939-10-03T04:21:21.0Z",
        "updated_at": "1933-10-18T05:33:23.0Z"
      },
      "status": "upcoming",
      "source": "self_signup",
      "payment_method": {
        "id": "pariatur in fugiat exercitation",
        "type": "direct_debit",
        "last_4": "enim officia pariatur est ut",
        "status": "revoked",
        "card_brand": "amex"
      },
      "start_date": "1891-03-24T01:36:40.0Z",
      "basket_id": "697a3840738b9f011d000055",
      "next_billing_date": "1956-06-12T01:22:43.0Z",
      "next_charge": {
        "id": "684224af-476e-bf8f-d4c5-be6c1ff564cb",
        "amount": 3995,
        "currency": "GBP",
        "status": "awaiting_approval",
        "billing_period_from": "1940-03-05",
        "billing_period_to": "1962-06-27"
      }
    },
    {
      "id": "94243732-59b4-6c06-3416-1b3ab510b441",
      "site_id": "d12f1ece-bb14-8c4c-b6e7-690b49c81d4c",
      "membership_number": "1234567890",
      "customer": {
        "id": "35c8b829-2de0-4c58-2195-6d9b9ade234c",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1937-05-28",
        "brand_id": "c9f39cdd-58c3-b01e-2615-67a509fd3dd1",
        "site_id": "df28e098-5aed-e11e-a608-fe498a8497d1",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "de6e7cd0-ea89-f269-7da3-e76c507fad00",
            "name": "VIP",
            "color": "ff6634"
          },
          {
            "id": "3b32e060-3164-4605-c52f-4c35ec68839b",
            "name": "VIP",
            "color": "ff6634"
          },
          {
            "id": "ee80c7ab-76bd-454d-dc42-5a6cdc585759",
            "name": "VIP",
            "color": "ff6634"
          },
          {
            "id": "ae8629a6-d035-54e1-5b87-4c0d590b7281",
            "name": "VIP",
            "color": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1944-01-05T20:34:03.0Z",
        "created_at": "1937-08-08T05:49:42.0Z",
        "updated_at": "1917-01-07T13:07:03.0Z",
        "deleted_at": "1955-05-12T16:12:14.0Z",
        "last_active_at": "1901-12-13T01:01:10.0Z",
        "email_verified_at": "1940-08-03T16:56:51.0Z",
        "last_check_in": {
          "checked_in_at": "1897-11-10T01:45:47.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "b0471778-a15d-593c-ac10-2835a41ab946",
          "file_name": "super-cool-photo.jpg",
          "mime_type": "image/jpeg",
          "original_url": "https://example.com/media/super-cool-photo.jpg",
          "size": 84256,
          "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
        },
        "external_ref": "enim irure mollit consectetur"
      },
      "members": [],
      "type": {
        "id": "e34baeed-4519-4b69-0023-eb0f064e80c6",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "ut Excepteur ut",
        "brand_id": "491b5bfa-30a7-bb4a-663e-0109f5325bbd",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1947-08-11T01:33:18.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "c2c5a788-ff46-1328-2159-f7db74c32f00",
            "membership_type_id": "fdfc3225-5228-7205-97af-d6f45dc86e02",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "reprehenderit irure ut pariatur Lorem",
              "nisi sint sunt in consectetur",
              "in voluptate veniam ea velit",
              "magna dolor consequat nisi fugiat",
              "anim dolore Ut nostrud"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1943-03-10T21:09:54.0Z",
            "updated_at": "1928-04-14T03:41:49.0Z"
          },
          {
            "id": "346e63c5-d5da-af13-5d20-5a7645802e47",
            "membership_type_id": "2ebbcf80-5c49-2362-8553-a105f368aba4",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "et aute ut",
              "nostrud",
              "Lorem Duis velit",
              "velit",
              "mollit deserunt aute magna"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1934-08-20T22:43:19.0Z",
            "updated_at": "1921-08-23T08:18:54.0Z"
          },
          {
            "id": "9e8bf492-86b7-8e47-d070-9f8feabe0a2d",
            "membership_type_id": "1137d7ce-c397-fbbc-e492-dcb0aafb3df0",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "pariatur",
              "et"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1955-01-23T10:53:10.0Z",
            "updated_at": "1949-07-07T02:38:05.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1907-12-17T15:19:40.0Z",
        "updated_at": "1911-04-16T06:41:36.0Z",
        "deleted_at": "1893-12-01T20:56:53.0Z"
      },
      "rate": {
        "id": "4b944fb1-7b5c-7de0-9129-c5854d2b2a00",
        "membership_type_id": "4a8483cb-bdea-e9a5-55dc-9b1574a2658b",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "consectetur",
          "nostrud incididunt",
          "nulla amet eu proident",
          "in est sed commodo"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1944-05-17T07:48:12.0Z",
        "updated_at": "1942-05-29T22:22:29.0Z"
      },
      "status": "upcoming",
      "source": "app",
      "payment_method": {
        "id": "non nostrud amet",
        "type": "direct_debit",
        "last_4": "ullamco",
        "card_brand": "amex"
      },
      "start_date": "1903-08-21T14:02:35.0Z",
      "end_date": "1909-09-01T17:52:37.0Z",
      "created_at": "1952-04-19T03:05:23.0Z",
      "external_ref": "officia ex ut nulla labore",
      "next_charge": {
        "id": "6c191e20-c199-b0db-bc47-aa4fae805151",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1924-06-28",
        "billing_period_to": "1922-08-28"
      }
    },
    {
      "site_id": "73b7375b-cb9c-d986-692f-c6c47fa509c0",
      "payment_method": {
        "type": "direct_debit",
        "last_4": "aute",
        "status": "revoked",
        "card_brand": "amex"
      },
      "end_date": "1936-08-03T09:52:17.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": "1c053647-77ea-242c-a7af-c4a1785fb939",
    "site_id": "358e1914-79a7-9c24-d5de-7dbe0eb1beb2",
    "customer": {
      "id": "9dc48807-bfba-e2d8-b235-c13787b2b2b7",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1894-10-22",
      "brand_id": "590a52d2-2748-20df-a11c-9abb648f3fbb",
      "site_id": "2e243e4c-3fe9-e710-f993-a51bab611440",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "836bd417-43d6-98f7-85fd-8e93ba49e876",
          "name": "VIP",
          "color": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1956-04-18T21:42:18.0Z",
      "created_at": "1929-06-02T13:56:30.0Z",
      "updated_at": "1968-07-08T15:33:27.0Z",
      "deleted_at": "1922-06-10T03:56:36.0Z",
      "last_active_at": "1899-01-01T04:24:46.0Z",
      "email_verified_at": "1954-01-12T18:25:28.0Z",
      "last_check_in": {
        "checked_in_at": "1969-04-22T19:16:51.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "54db1f1a-6167-b106-ca82-6d8898562342",
        "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": "sit"
    },
    "members": [
      {
        "customer_id": "8f666af5-61d5-941a-a96b-c8bf4be1826b",
        "membership_number": "1234567890",
        "is_lead": false
      },
      {
        "customer_id": "ada86201-03ed-4279-ccc3-dd75b3e9b89c",
        "membership_number": "1234567890",
        "is_lead": true
      }
    ],
    "type": {
      "id": "0b92b30e-1363-0f51-bc8e-53142c14c2f1",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "incididunt consequat cillum nisi",
      "brand_id": "7ec081b2-8908-fd68-b805-68286159bc07",
      "offline_payments": true,
      "disable_confirmation_email": false,
      "private": true,
      "visibility": "private",
      "minimum_start_date": "1941-12-19T02:25:08.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "98562e6d-eeb1-a3a2-260a-2d943bd378e2",
          "membership_type_id": "47aede44-7d85-d1c8-8c5c-f3cc65a1047d",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "labore",
            "occaecat et est ut dolor"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1914-05-09T08:59:56.0Z",
          "updated_at": "1920-06-07T11:21:20.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1923-02-07T22:24:52.0Z",
      "updated_at": "1967-09-17T18:01:37.0Z",
      "deleted_at": "1912-07-06T03:52:43.0Z"
    },
    "rate": {
      "id": "8c55c563-a9b0-b995-9cea-11636962f96d",
      "membership_type_id": "065b5d23-880a-4669-b400-9cc08fddfb60",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "magna nostrud labore ipsum dolore"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1913-11-19T10:43:54.0Z",
      "updated_at": "1928-09-27T02:35:41.0Z"
    },
    "status": "needs_dd_mandate",
    "source": "app",
    "payment_method": {
      "id": "ut",
      "type": "card",
      "last_4": "Lorem mollit laborum velit",
      "card_brand": "amex"
    },
    "start_date": "1898-06-21T16:19:41.0Z",
    "end_date": "1967-02-22T02:30:07.0Z",
    "created_at": "1928-12-18T12:30:17.0Z",
    "basket_id": "697a3840738b9f011d000056",
    "external_ref": "laboris dolor et",
    "next_billing_date": "1951-05-13T08:32:09.0Z",
    "next_charge": {
      "id": "eb33a91e-db09-c760-65bd-81fef33150dc",
      "amount": 3995,
      "currency": "GBP",
      "status": "awaiting_approval",
      "billing_period_from": "1964-05-25",
      "billing_period_to": "1937-10-20"
    },
    "attention_reason": "payment_disputed"
  }
}
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": "b0ccdc73-f218-6d26-ea76-4f81b2b276e2",
    "membership": {
      "id": "a68838be-d5f9-6a32-b33b-fe8219487353",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "62c9ad24-ce42-3bf1-bcee-fcc9dadcdaab",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "last_4": 4001,
      "processor_type": "Cash"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "nostrud eiusmod nisi",
    "can_download_receipt": true,
    "amount_refunded": -42143095,
    "refunded": false,
    "refunds": [],
    "site_id": "79c648d2-3f42-15a2-f8e4-590a1093bd40",
    "billing_period_from": "1895-09-13",
    "billing_period_to": "1961-03-17",
    "processing_at": "1905-06-14T08:47:19.0Z",
    "created_at": "1940-12-03T02:23:03.0Z",
    "updated_at": "1902-12-03T07:52:15.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": "84fbd8bb-d4fd-5c37-48cc-e33f875d42f3",
    "membership": {
      "id": "acd3e1ee-8b4c-f423-d639-8fc96cb4777b",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "dc25cdfc-9b8d-4edb-08c1-c7944b87ba3c",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {},
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "esse dolore fugiat dolor irure",
    "can_download_receipt": true,
    "amount_refunded": -17107600,
    "refunded": false,
    "refunds": [
      {
        "id": "aa4eb3fa-ffde-e469-594f-f31118bf4d58",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "54ad78df-b30e-7fad-1edf-3520c193805f",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1901-04-29T07:57:30.0Z",
        "updated_at": "1917-06-20T17:44:28.0Z"
      },
      {
        "id": "ee265657-f853-7558-d8c7-321506686d33",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "491dd908-458a-9334-e42c-3ad17c09e77a",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1969-03-15T09:01:45.0Z",
        "updated_at": "1968-07-28T03:04:20.0Z"
      },
      {
        "id": "b3b3742a-e22a-c625-33a3-1a7066666440",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "refunded_by": {
          "id": "c02d5d1f-4f87-5e64-0def-ce518b1b6f8f",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1967-04-02T13:49:45.0Z",
        "updated_at": "1969-09-22T22:31:44.0Z"
      },
      {
        "id": "bb274f3c-7817-a9a5-523b-657336f6c9b4",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "87138256-4211-01ee-50e2-5f6215aa6503",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1905-05-29T13:26:26.0Z",
        "updated_at": "1931-01-09T19:48:47.0Z"
      },
      {
        "id": "5070cd64-52c0-a4d3-278e-afd4ec176bee",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1916-11-05T09:22:45.0Z",
        "updated_at": "1947-04-22T09:22:55.0Z"
      }
    ],
    "site_id": "62d3a3b7-7894-cbaa-2c8b-7b144562d54e",
    "billing_period_from": "1932-01-22",
    "billing_period_to": "1912-09-07",
    "processing_at": "1939-04-03T09:01:22.0Z",
    "created_at": "1966-11-21T03:11:28.0Z",
    "updated_at": "1917-01-27T01:15:36.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": "3bebcf8e-106c-959e-01e9-1690c377b2cb",
    "membership": {
      "id": "9504d2b3-d577-2274-e350-6085815ad8be",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "28263794-8c7b-9585-97d7-b420d28d615f",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "processor_type": "Cash",
      "processor_type_id": "697a3840738b9f011d000057"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "consequat",
    "can_download_receipt": false,
    "amount_refunded": 60133802,
    "refunded": false,
    "refunds": [],
    "site_id": "c6cddf41-f61c-97d2-2aa2-0ae0ca81e546",
    "billing_period_from": "1931-07-05",
    "billing_period_to": "1898-05-27",
    "processing_at": "1954-09-14T14:14:12.0Z",
    "created_at": "1925-10-22T01:50:25.0Z",
    "updated_at": "1957-12-25T14:38:43.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": "697a3840738b9f011d000058",
    "organisation_id": "458d1b44-9a0d-4fe9-abf2-bf125bbc3c1f",
    "site_id": "0b1884d8-8b5d-5fd0-88b6-af9a73fddb68",
    "customer_id": "2d95cad3-68c7-2d27-680a-92a6edb5f011",
    "membership_id": "32c2f40f-e82d-0207-7b5e-d15838b62218",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "proident Lorem",
    "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": {
    "adipisicing_ce": [
      "consectetur",
      "aliquip exercitation"
    ]
  },
  "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": "de4eddc1-3cdf-5624-218e-b26c3adcd35c",
    "organisation_id": "78e14009-50e8-99a5-2524-a9bbfd30e782"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}