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": "bcaf8bed-af54-ee51-da0a-87d8780360a1",
      "attention_reason": "mandate_revoked",
      "basket_id": "6a02cdcedbf9c601460000c9",
      "customer": {
        "id": "ad1f2a10-8d3c-e3e4-ec3f-9cd78307ab98",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1903-06-18",
        "brand_id": "1f155bee-b9e7-b021-90d7-330d11100b13",
        "site_id": "bb7a27c7-82d8-7b02-7c95-a3094c3746fb",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "f131cf16-425e-4d2b-1799-807274a48985",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "4d29c688-7477-6857-b225-0ab62b18a9c9",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1903-08-13T11:39:49.0Z",
        "created_at": "1952-01-22T20:44:01.0Z",
        "updated_at": "1905-07-14T01:43:51.0Z",
        "deleted_at": "1956-04-22T16:41:17.0Z",
        "last_active_at": "1917-09-17T14:32:14.0Z",
        "email_verified_at": "1910-05-03T16:55:43.0Z",
        "last_check_in": {
          "checked_in_at": "1955-01-31T07:56:39.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "fd2333cb-39d2-45e0-be11-8ca42ef40c81",
          "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": "in"
      },
      "end_date": "1934-03-04T14:22:38.0Z",
      "external_ref": "nostrud tempor ex laborum",
      "members": [
        {
          "customer_id": "eca78ea0-108c-ba67-9165-4b819338b560",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "50a6e205-17d3-39fa-bb0a-325e6947a9ea",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1946-05-08T04:07:50.0Z",
      "next_charge": {
        "id": "5480d4ee-291a-ca23-41a8-8a813b232cb7",
        "amount": 3995,
        "currency": "GBP",
        "status": "succeeded",
        "billing_period_from": "1930-10-14",
        "billing_period_to": "1907-11-11"
      },
      "payment_method": {
        "id": "nisi esse",
        "type": "direct_debit",
        "last_4": "Ut dolore consectetur esse in",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "ef2b410d-518b-8fe5-55ce-d7d390a47898",
        "membership_type_id": "422983b0-555b-4b00-8afd-c2683e0bec2b",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "adipisicing in aliqua in",
          "dolore labore cupidatat qui mollit"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1911-06-06T01:30:39.0Z",
        "updated_at": "1963-06-08T15:08:42.0Z"
      },
      "site_id": "45c56dd9-81c5-ebb0-240e-783914842bd0",
      "source": "import",
      "start_date": "1915-10-01T06:49:02.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1958-06-13T11:13:01.0Z",
      "type": {
        "id": "d64ac114-0089-5050-2451-757c7696de86",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "culpa dolor",
        "brand_id": "099bb7cf-aa1d-b1b6-99b5-9320f7c84b92",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1941-06-10T04:46:16.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "52860332-7aea-5957-ee9a-7cd3d45a96ac",
            "membership_type_id": "d17286d2-9f8b-aa26-6d97-6f217f95c222",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "aliquip",
              "sit labore in"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1890-10-17T07:29:24.0Z",
            "updated_at": "1924-06-02T18:38:20.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1928-02-28T07:41:08.0Z",
        "updated_at": "1911-08-06T22:30:05.0Z",
        "deleted_at": "1896-05-08T21:10:07.0Z"
      },
      "payment_details_url": "do ullamco aute officia fugiat",
      "created_at": "1907-12-26T19:53:13.0Z"
    },
    {
      "id": "8be4c4bd-b0f1-1da7-aec7-e03a185fcdc8",
      "attention_reason": "mandate_revoked",
      "basket_id": "6a02cdcedbf9c601460000ca",
      "end_date": "1945-01-02T01:37:54.0Z",
      "external_ref": "mollit deserunt minim reprehenderit",
      "members": [
        {
          "customer_id": "4b61ee79-1887-3ffd-c5b2-4d6a48d28987",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "0ebfec01-913a-1af1-083d-6abc27c1df33",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1952-08-13T19:01:50.0Z",
      "payment_method": {
        "type": "direct_debit"
      },
      "rate": {
        "id": "34cc83fc-31fa-a59d-e986-118c8747733f",
        "membership_type_id": "d11d9a2a-369a-70f7-e91a-a5207fa34216",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "esse Duis sint minim tempor",
          "mollit aliqua anim deserunt Lorem",
          "Duis"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1890-09-09T09:32:57.0Z",
        "updated_at": "1893-10-03T17:47:55.0Z"
      },
      "site_id": "08ec69a7-9e00-48b0-be6f-d3f57f8ea52d",
      "source": "app",
      "start_date": "1942-07-06T23:30:53.0Z",
      "status": "active",
      "status_updated_at": "1927-07-05T12:21:09.0Z",
      "type": {
        "id": "8e62e137-5ef0-656b-57f1-b99b07bcc4c6",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "culpa",
        "brand_id": "95ddc81a-85e8-8797-306e-8bd7350d3ff8",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "private",
        "minimum_start_date": "1932-11-06T18:01:52.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "0b2d091a-e73b-0189-9ab3-a05fbc79ea27",
            "membership_type_id": "7bdad4ad-9a68-1ccf-1b82-ba6a50649020",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "mollit minim Duis officia in",
              "nulla culpa in tempor"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1953-08-21T11:47:53.0Z",
            "updated_at": "1967-06-09T22:25:20.0Z"
          },
          {
            "id": "c1a60750-d40d-b4aa-d8c5-f687a716b94b",
            "membership_type_id": "e6cf58f2-c884-5048-0aec-a44b6d3d06dd",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolore",
              "cillum"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1892-10-06T10:53:23.0Z",
            "updated_at": "1903-04-08T03:08:15.0Z"
          },
          {
            "id": "77b04814-846a-912e-9bba-b034d7458731",
            "membership_type_id": "248144a3-2314-5d4c-e4a7-98e25dc49761",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "Excepteur nisi minim in consectetur",
              "Excepteur",
              "ullamco proident eiusmod Lorem",
              "officia cillum minim fugiat Lorem",
              "sint enim in"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1937-09-26T16:35:56.0Z",
            "updated_at": "1967-08-14T17:38:32.0Z"
          },
          {
            "id": "83806a72-341d-54f6-de8d-0fc0a728a2ad",
            "membership_type_id": "c6dce6f9-b909-de7f-003f-fe02fca7ca41",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "irure"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1946-01-19T05:45:35.0Z",
            "updated_at": "1914-12-28T02:46:43.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1911-12-11T12:16:34.0Z",
        "updated_at": "1957-03-09T11:18:22.0Z",
        "deleted_at": "1933-08-04T18:10:21.0Z"
      },
      "payment_details_url": "consectetur eu pariatur sint sunt",
      "created_at": "1960-07-06T15:43:50.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": "4f7a3ee4-8b8c-c1d5-8a1d-495563d7b3aa",
    "attention_reason": "setup_unpaid",
    "basket_id": "6a02cdcedbf9c601460000cb",
    "customer": {
      "id": "adae5395-32d9-0441-843c-eaa180427f08",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1964-01-04",
      "brand_id": "ac40d315-0ff6-b3ec-cc5a-557c7b4e15ef",
      "site_id": "de25d505-67b2-092a-e0ca-5c0248fe3acb",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "74ed60e4-efc3-ad79-353f-9613f751875b",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "0bfcd8b4-616a-2ab2-9b8b-ab9d3f0d379a",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "45f622cc-3226-f2d1-37d1-dfb0ff6d37dc",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "3a86b882-2fd5-9d2a-11ca-7dbb4bd49b15",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1918-09-07T06:02:19.0Z",
      "created_at": "1969-07-24T03:18:36.0Z",
      "updated_at": "1952-11-10T15:09:07.0Z",
      "deleted_at": "1912-02-25T20:29:36.0Z",
      "last_active_at": "1912-03-24T05:56:43.0Z",
      "email_verified_at": "1940-05-04T18:42:03.0Z",
      "last_check_in": {
        "checked_in_at": "1897-11-19T17:57:08.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "35335dff-4818-e2fc-1894-c7451bfa424f",
        "file_name": "super-cool-photo.jpg",
        "mime_type": "image/jpeg",
        "original_url": "https://example.com/media/super-cool-photo.jpg",
        "size": 84256,
        "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
      },
      "external_ref": "est qui sunt"
    },
    "end_date": "1953-09-09T11:35:18.0Z",
    "external_ref": "sint nostrud nisi",
    "members": [],
    "membership_number": "1234567890",
    "next_billing_date": "1891-03-24T14:20:39.0Z",
    "next_charge": {
      "id": "bddd199e-a409-632c-d3a5-d2208349fe0e",
      "amount": 3995,
      "currency": "GBP",
      "status": "failed",
      "billing_period_from": "1909-05-20",
      "billing_period_to": "1954-07-16"
    },
    "payment_method": {
      "id": "ut ex nisi qui",
      "type": "direct_debit",
      "last_4": "Duis dolor",
      "status": "revoked",
      "card_brand": "amex"
    },
    "rate": {
      "id": "8959223d-70a9-a8e3-2b0e-4c5aee3dc3ac",
      "membership_type_id": "dad4f098-9911-3805-4235-0ccf351ef738",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "dolore amet aute eu"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1930-08-24T14:17:04.0Z",
      "updated_at": "1907-02-26T18:26:18.0Z"
    },
    "site_id": "ae82cece-622e-d721-8f58-f4f3d76c0cb3",
    "source": "self_signup",
    "start_date": "1917-05-15T19:24:33.0Z",
    "status": "reserved",
    "status_updated_at": "1904-10-25T14:02:21.0Z",
    "type": {
      "id": "779856fe-e178-4844-49f2-82d7a4de774e",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "sed",
      "brand_id": "65a9ba2e-9978-9bc8-5f8b-cb3a3e9bd733",
      "offline_payments": true,
      "disable_confirmation_email": false,
      "private": false,
      "visibility": "public",
      "minimum_start_date": "1907-04-14T06:31:42.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "e1711f40-344e-2c1f-96c6-b0714f35aa5d",
          "membership_type_id": "03c7ec4b-635f-96a9-30fe-23feda755631",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "tempor"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1966-03-07T04:49:51.0Z",
          "updated_at": "1904-12-10T05:37:15.0Z"
        },
        {
          "id": "cc14e195-f9f9-0788-1bd1-bb863ccdd438",
          "membership_type_id": "d932d034-1500-5289-5967-23b8b245bf7a",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "ea cillum anim nulla",
            "ex ullamco",
            "esse",
            "eu veniam nulla laboris do"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1919-04-04T04:18:59.0Z",
          "updated_at": "1930-07-23T23:29:32.0Z"
        },
        {
          "id": "09b3f9da-e65a-074e-158d-2890c14bba16",
          "membership_type_id": "8c835f1a-c003-7436-f176-7b64b1ce2058",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "ea amet",
            "ea voluptate",
            "pariatur"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1951-01-24T06:42:46.0Z",
          "updated_at": "1932-05-31T12:32:19.0Z"
        },
        {
          "id": "4a4153c8-b8fe-97c9-d341-c2108fa6f353",
          "membership_type_id": "c4a5566f-98f7-0a97-ae3d-ff467edda31e",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "labore sit sint sunt",
            "tempor id mollit ipsum eiusmod"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1924-04-16T12:05:38.0Z",
          "updated_at": "1895-02-02T10:21:39.0Z"
        },
        {
          "id": "d1cb978a-6059-a5d6-946d-326e96cf2492",
          "membership_type_id": "d1cbb63c-a478-509e-c2d4-a175248b5341",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1922-02-28T20:20:35.0Z",
          "updated_at": "1969-09-23T01:01:18.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1912-10-01T20:39:01.0Z",
      "updated_at": "1967-05-17T21:15:44.0Z",
      "deleted_at": "1915-01-11T13:36:54.0Z"
    },
    "payment_details_url": "cillum magna veniam mollit eu",
    "created_at": "1944-08-18T10:11:22.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": "7bd69eb9-8e2d-19b0-6741-3cf42b4b8433",
    "membership": {
      "id": "ea20f5f8-1329-c512-f485-3af53080983e",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "f4c22a10-a844-f5e6-c76e-0ecd0945050e",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "last_4": 4001
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "elit esse aute exercitation eu",
    "can_download_receipt": false,
    "amount_refunded": -81766256,
    "refunded": true,
    "refunds": [
      {
        "id": "90a8e5bc-57b6-ad0d-14c2-4a88e7b8b8a4",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "1037b730-e2dc-2c89-fcc9-72b65b6195f9",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1929-06-06T21:27:51.0Z",
        "updated_at": "1903-07-01T14:01:06.0Z"
      },
      {
        "id": "06694891-4071-f1da-3c4f-6c6bf7fb796b",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "c6d9d6f3-09fb-cf92-1d91-9daa11502789",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1923-08-03T20:35:39.0Z",
        "updated_at": "1954-03-25T01:29:12.0Z"
      }
    ],
    "site_id": "0e6036f6-351c-ee1d-a5b5-77e080191f86",
    "billing_period_from": "1910-12-03",
    "billing_period_to": "1945-11-21",
    "processing_at": "1918-04-12T16:09:45.0Z",
    "created_at": "1905-04-26T18:35:22.0Z",
    "updated_at": "1966-11-13T16:29:48.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": "2b65d5d5-e25b-9b41-7a95-58f221e9dc8f",
    "membership": {
      "id": "f6afbb10-93ee-a527-2b5b-49032158bb0c",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "5cba03e1-f55e-e93d-85ab-bac53bdaf4ad"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "anim aliqua ex sint",
    "can_download_receipt": false,
    "amount_refunded": 6740671,
    "refunded": false,
    "refunds": [
      {
        "id": "de6519b7-ad0b-30b7-34d4-a3eaa5c5d6cf",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "57bfc9d9-bfee-64e0-1f90-1672713cc3fa",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1935-08-16T05:22:56.0Z",
        "updated_at": "1939-12-18T01:42:06.0Z"
      }
    ],
    "site_id": "3c820f26-8c08-3830-0d31-5b141dec88f2",
    "billing_period_from": "1904-10-11",
    "billing_period_to": "1915-08-26",
    "processing_at": "1942-05-20T18:33:07.0Z",
    "created_at": "1902-12-22T07:59:54.0Z",
    "updated_at": "1930-04-20T21:08:17.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": "d1f905fa-d526-1081-2a59-6a399fb7b5fd",
    "membership": {
      "id": "3204785b-fe87-2efd-2058-912ee157f836",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "72f54c84-055d-e9ac-293c-daf0fe2e6b57"
    },
    "processor": "adyen",
    "processor_data": {
      "processor_type": "Cash",
      "processor_type_id": "6a02cdcedbf9c601460000cc"
    },
    "amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "Lorem minim proident eu",
    "can_download_receipt": true,
    "amount_refunded": -3043320,
    "refunded": true,
    "refunds": [],
    "site_id": "1d73a1cd-7a36-865a-619a-778b1f9a64e7",
    "billing_period_from": "1893-11-01",
    "billing_period_to": "1907-11-13",
    "processing_at": "1908-09-23T01:41:59.0Z",
    "created_at": "1961-10-24T15:20:35.0Z",
    "updated_at": "1914-02-17T06:32:16.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": "6a02cdcfdbf9c6014600037c",
    "organisation_id": "3c5e067a-06db-8ebe-1f9a-a23542dc0ab1",
    "site_id": "0551418d-2818-a1e2-22db-35a2a7506325",
    "customer_id": "63415bdd-4a05-ba9c-6bda-3f9d019dbaaf",
    "membership_id": "a6bbf525-20fe-ee72-4bc1-aabf9808137b",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "dolore consequat sunt",
    "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": {
    "deserunt690": [
      "deserunt",
      "irure labore",
      "dolor mollit dolore incididunt",
      "deserunt elit reprehenderit"
    ]
  },
  "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": "09b38b66-10b2-4c5e-c7d0-76d510ff9624",
    "organisation_id": "ca3cca4d-2008-4a9b-e31d-428259a82482"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}