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": "016199db-925d-3198-d4cd-9e479aafaad3",
      "attention_reason": "setup_unpaid",
      "basket_id": "6a0b3ea4eae7660162000097",
      "customer": {
        "id": "4cd736d1-4e58-d77f-c98d-58165f0ec686",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1954-09-16",
        "brand_id": "4a6dd0e9-10c2-1b9b-5ec3-0a01ecaf64b3",
        "site_id": "de2c1311-2164-a47a-ed26-5213e688a06a",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "321ce25a-41c2-59db-cac0-1d62bb8e203b",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "cc94ef1b-4dca-23ce-8b83-520f7f972349",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "6a8ac041-b4ea-ca12-ac3a-2a4007383801",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "cd3cb7a2-5f97-c292-dd36-e35c9929699f",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1920-04-15T23:58:15.0Z",
        "created_at": "1947-10-18T04:52:12.0Z",
        "updated_at": "1909-07-18T14:02:42.0Z",
        "deleted_at": "1894-08-30T15:16:22.0Z",
        "last_active_at": "1903-11-14T02:57:05.0Z",
        "email_verified_at": "1964-06-28T23:43:39.0Z",
        "last_check_in": {
          "checked_in_at": "1929-02-23T12:52:58.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "9203e8c6-5ca1-82c5-8b90-a52901ff0999",
          "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 laboris ut"
      },
      "end_date": "1966-04-19T06:38:11.0Z",
      "external_ref": "Duis est ullamco sit",
      "members": [
        {
          "customer_id": "0043e0c8-2e69-760a-137c-3fb3898a067c",
          "is_lead": false,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1923-08-13T13:06:28.0Z",
      "next_charge": {
        "id": "829afdae-2aad-0656-bb05-eeaeab1d3693",
        "amount": 3995,
        "currency": "GBP",
        "status": "failed",
        "billing_period_from": "1918-08-11",
        "billing_period_to": "1963-02-24"
      },
      "payment_method": {
        "last_4": "qui do nulla reprehenderit dolore",
        "status": "revoked"
      },
      "rate": {
        "id": "02707a6a-886d-45bb-f9da-22db33e510a6",
        "membership_type_id": "61699c21-f429-fe0e-a253-2b0829cb4461",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "magna Lorem deserunt occaecat ut",
          "ut nulla",
          "Ut ipsum nisi irure",
          "elit in tempor",
          "tempor nisi Duis enim"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1908-03-07T11:40:31.0Z",
        "updated_at": "1911-11-21T01:37:13.0Z"
      },
      "site_id": "78f46a3c-32a1-ded2-1384-11405d03f154",
      "source": "import",
      "start_date": "1948-11-26T13:58:17.0Z",
      "status": "needs_dd_mandate",
      "status_updated_at": "1899-12-23T18:02:33.0Z",
      "type": {
        "id": "f129e549-afb9-ba44-db32-d9caccc210f9",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "magna consequat quis occaecat",
        "brand_id": "f8f2f0e5-77de-cba5-05e3-371cae5b54b8",
        "offline_payments": false,
        "disable_confirmation_email": false,
        "private": false,
        "visibility": "link_only",
        "minimum_start_date": "1895-06-08T22:28:30.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "f4494450-c968-4dec-05ac-9872607d2977",
            "membership_type_id": "3f2bdff3-a906-ab57-3109-c98c2a2611bd",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "in",
              "anim voluptate veniam eu enim",
              "velit Lorem"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1895-06-14T09:58:12.0Z",
            "updated_at": "1896-02-14T22:50:46.0Z"
          },
          {
            "id": "f2c9f9c6-2ac3-0a50-321f-53641b69f716",
            "membership_type_id": "85b8d362-4951-91ce-5aed-52db73ba59f3",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1915-05-26T21:59:08.0Z",
            "updated_at": "1901-10-26T12:21:46.0Z"
          },
          {
            "id": "910bbdc0-2d24-41fc-208e-00471391160a",
            "membership_type_id": "18f38aca-d9b9-e125-d214-cb73fb39b340",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolore anim",
              "mollit pariatur proident labore",
              "ex incididunt",
              "reprehenderit ad magna anim",
              "fugiat"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1927-06-27T18:07:35.0Z",
            "updated_at": "1912-03-09T05:34:47.0Z"
          },
          {
            "id": "53aab776-1366-5af6-099d-8a4c40cc38b9",
            "membership_type_id": "70d36f06-7c8b-d0bf-50de-153e5ca97817",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "culpa",
              "in ut ex",
              "sint",
              "tempor irure minim ea laboris",
              "labore reprehenderit Excepteur"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1907-08-20T17:30:26.0Z",
            "updated_at": "1898-12-17T02:14:11.0Z"
          },
          {
            "id": "8c9cf6de-f75f-0ae1-4121-5a63004376ff",
            "membership_type_id": "2bcec281-71ab-d3d7-f3b2-c66ff91e3208",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "ut",
              "dolor in ad",
              "magna veniam mollit Ut"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1966-09-24T01:02:44.0Z",
            "updated_at": "1928-02-13T10:23:28.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1965-06-01T13:07:20.0Z",
        "updated_at": "1951-12-11T06:23:20.0Z",
        "deleted_at": "1944-05-13T10:59:40.0Z"
      },
      "payment_details_url": "voluptate nisi ullamco sunt",
      "created_at": "1928-06-06T14:55:27.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": "e9d29f98-5d16-ca57-1899-8d6e4ff43f76",
    "attention_reason": "payment_disputed",
    "basket_id": "6a0b3ea4eae7660162000098",
    "customer": {
      "id": "f92b32a0-28ae-d9a3-6226-f9ab2acfa166",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1905-03-22",
      "brand_id": "8a6e5bfa-aecf-f0f5-c1ed-664100d681bb",
      "site_id": "4ca368f9-3dec-1bd9-b795-55db7470392e",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "011df87a-83aa-eeef-5897-71210418431a",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "290dbc9d-ce2d-27a0-48c6-aa9c04887507",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1965-05-08T16:53:31.0Z",
      "created_at": "1918-11-30T01:59:55.0Z",
      "updated_at": "1901-01-11T01:57:05.0Z",
      "deleted_at": "1939-09-26T01:58:15.0Z",
      "last_active_at": "1905-12-29T22:15:18.0Z",
      "email_verified_at": "1928-09-16T23:58:07.0Z",
      "last_check_in": {
        "checked_in_at": "1911-07-07T23:11:32.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "9b06de9c-4390-5f66-7754-9a51f7e1be73",
        "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 commodo occaecat"
    },
    "end_date": "1912-09-03T01:25:11.0Z",
    "external_ref": "aliqua Lorem sunt",
    "members": [
      {
        "customer_id": "6d8eb508-465f-9e6d-bfb7-4527dbd41da9",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "d805e566-aacb-ca67-e583-888cd337b266",
        "is_lead": false,
        "membership_number": "1234567890"
      },
      {
        "customer_id": "511f9868-ceb1-01a3-a2d8-31a241769f48",
        "is_lead": true,
        "membership_number": "1234567890"
      }
    ],
    "membership_number": "1234567890",
    "next_billing_date": "1894-11-15T15:07:01.0Z",
    "next_charge": {
      "id": "d844f877-7245-3393-5718-d19d163502ba",
      "amount": 3995,
      "currency": "GBP",
      "status": "pending",
      "billing_period_from": "1948-04-23",
      "billing_period_to": "1916-08-06"
    },
    "payment_method": {
      "id": "in voluptate in et id",
      "type": "direct_debit",
      "last_4": "Ut",
      "status": "revoked",
      "card_brand": "amex"
    },
    "rate": {
      "id": "d0c3f622-0367-e4ec-e991-ec527ba5470f",
      "membership_type_id": "80dfbe45-2045-7656-f6ba-4ac6c22d24de",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "minim sit culpa aute magna"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1922-04-04T21:20:35.0Z",
      "updated_at": "1935-11-21T14:57:40.0Z"
    },
    "site_id": "3ace79fd-d186-491a-005b-c3cc9c88c435",
    "source": "app",
    "start_date": "1899-11-29T15:19:57.0Z",
    "status": "inactive",
    "status_updated_at": "1897-01-01T10:14:42.0Z",
    "type": {
      "id": "9b3a7515-c556-cce7-a4df-1cc76deaa7e8",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "ut minim anim",
      "brand_id": "ce1abcc3-43a6-8fe9-8f4a-c7bea8c4916e",
      "offline_payments": true,
      "disable_confirmation_email": true,
      "private": true,
      "minimum_start_date": "1892-12-30T14:52:06.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "f8ca61f6-6a44-9dbe-0e60-59313d153e4d",
          "membership_type_id": "3b4124ee-dbc0-e7cc-a985-a2a4f04a9878",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "laboris Lorem in",
            "commodo culpa",
            "sint eu dolor aliquip et",
            "aute adipisicing eu"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1969-11-21T03:17:13.0Z",
          "updated_at": "1924-07-20T15:55:04.0Z"
        },
        {
          "id": "b1febc01-2767-c529-8ec4-e98ce537594e",
          "membership_type_id": "858aecca-c247-a13c-6c77-77300674c7b2",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "reprehenderit veniam et",
            "amet nisi",
            "eu ipsum officia",
            "ullamco aliquip ad Lorem qui",
            "Ut"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1917-05-14T03:55:27.0Z",
          "updated_at": "1922-03-09T18:45:20.0Z"
        },
        {
          "id": "6541dc86-5588-e25f-825f-d139a79e02b7",
          "membership_type_id": "714b2b2a-a9e9-9bb3-e9e2-1a0b7cef4b58",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1924-07-16T16:35:21.0Z",
          "updated_at": "1947-03-21T08:55:20.0Z"
        },
        {
          "id": "69b5e40c-5efa-1084-0c89-0aebc94a305c",
          "membership_type_id": "4304a855-9df5-f188-2cae-be5b2db549a3",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "ut dolor mollit ex quis",
            "occaecat ad"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1923-06-25T11:36:58.0Z",
          "updated_at": "1928-12-26T09:16:05.0Z"
        },
        {
          "id": "1f4c39da-26ab-bf03-d29a-780b5518fe49",
          "membership_type_id": "d36c3935-4a2b-ed6c-3e5e-4fa4cbeff5c6",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "culpa voluptate dolor"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1939-04-03T02:07:08.0Z",
          "updated_at": "1924-04-07T10:41:35.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1918-10-04T14:35:35.0Z",
      "updated_at": "1908-09-07T09:20:07.0Z",
      "deleted_at": "1917-01-24T10:18:21.0Z"
    },
    "payment_details_url": "ex exercitation aute cillum proident",
    "created_at": "1937-06-20T10:02:11.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": "409ad942-46c9-3e5f-4b88-7461854166d1",
    "membership": {
      "id": "0aeb987e-1aee-d013-04f3-473a6f28a202",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "421b1683-16a4-fdf5-7657-0688f4b23b75",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "6a0b3ea5eae7660162000149"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "reprehenderit dolore adipisicing sunt proident",
    "can_download_receipt": false,
    "amount_refunded": -98649440,
    "refunded": true,
    "refunds": [
      {
        "id": "80b83307-048f-1681-c7fb-26143fad7221",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1930-07-23T01:53:21.0Z",
        "updated_at": "1924-10-04T05:29:44.0Z"
      },
      {
        "id": "55680fe2-d052-9a69-f78f-caff1ee507e1",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "5a19d328-9612-86ee-dec5-122589f457fe",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1929-08-21T08:29:52.0Z",
        "updated_at": "1935-05-21T08:01:23.0Z"
      },
      {
        "id": "c30125f5-0603-30b4-ff0e-9d4fd568db84",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "3402e431-e67e-223b-1b3e-3a027a402297",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1961-08-12T06:30:17.0Z",
        "updated_at": "1927-04-16T18:56:37.0Z"
      }
    ],
    "site_id": "257b002d-9661-56ce-c7c3-1c1a9a3d0e20",
    "billing_period_from": "1917-02-18",
    "billing_period_to": "1917-07-15",
    "processing_at": "1943-06-07T10:58:51.0Z",
    "created_at": "1895-09-20T05:13:10.0Z",
    "updated_at": "1903-08-25T02:58:38.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": "4a11eca8-65e8-80fb-7b79-6df77cfea9d6",
    "membership": {
      "id": "cdf959b0-0916-b7ae-ac24-01ff1273e43f",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "c3f780f4-a139-a599-b6d1-4576ee1ddc26"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "nisi sed",
    "can_download_receipt": true,
    "amount_refunded": 30176437,
    "refunded": false,
    "refunds": [],
    "site_id": "ded7a89f-9c50-f8cf-c462-b05df70b7ed4",
    "billing_period_from": "1945-04-30",
    "billing_period_to": "1911-06-17",
    "processing_at": "1958-02-25T09:55:36.0Z",
    "created_at": "1921-11-21T17:04:26.0Z",
    "updated_at": "1939-08-15T10:59:11.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": "f5449561-8361-622c-202f-6a8d8cdbaf9d",
    "membership": {
      "id": "4de667b4-732e-7c1b-79ce-d3a7914d6b46",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "df35954c-68f3-3cd1-2a1d-3cf1671db735",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "processor_type": "Cash"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "consequat sint in",
    "can_download_receipt": false,
    "amount_refunded": -10249863,
    "refunded": true,
    "refunds": [
      {
        "id": "8afd6365-65ef-0890-443a-a1fe573f9906",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "5ad90903-fbcf-fe8a-0d16-958f4696bda1",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1957-05-14T20:24:49.0Z",
        "updated_at": "1954-10-12T09:19:55.0Z"
      },
      {
        "id": "8ce94b8c-ff79-d248-7143-baa6b9efc73b",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "b5b447b1-dfce-9086-a31f-8ba6732b3562",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1925-01-11T20:57:02.0Z",
        "updated_at": "1936-07-05T21:44:17.0Z"
      },
      {
        "id": "6e94b404-53f0-19a1-2864-de1e2f2c634b",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "d66f6074-8707-adb4-b9de-2c962daefa7c",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1922-09-01T07:46:57.0Z",
        "updated_at": "1955-10-19T03:59:02.0Z"
      },
      {
        "id": "3ebbec50-66fc-f604-7f84-83e7d76b4e43",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "20488029-8626-0658-447b-627ef2475752",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1951-01-12T19:08:32.0Z",
        "updated_at": "1916-04-15T03:39:38.0Z"
      },
      {
        "id": "807d4dad-5646-364d-e94d-cc93cd50d439",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "648d71eb-7a8e-35d1-0195-20043fad47a1",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1946-10-31T18:52:47.0Z",
        "updated_at": "1910-01-28T07:14:23.0Z"
      }
    ],
    "site_id": "c7f07251-41f1-ea35-4bc6-bf7d405bb18c",
    "billing_period_from": "1960-10-10",
    "billing_period_to": "1940-12-28",
    "processing_at": "1900-04-22T13:39:55.0Z",
    "created_at": "1969-09-05T12:44:43.0Z",
    "updated_at": "1917-11-02T01:24:15.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": "6a0b3ea5eae766016200014a",
    "organisation_id": "abbf637b-4e3f-9e01-fc1e-3656e853b619",
    "site_id": "e468e0bf-a0ab-f636-a730-3b332b46ca66",
    "customer_id": "bb61a52f-e55a-9a3c-5050-d195edff9369",
    "membership_id": "347fa300-2459-fd20-cfdb-30397ab1644c",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "consectetur dolor ullamco",
    "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": {
    "do_c7_": [
      "cillum veniam in",
      "sit exercitation",
      "minim fugiat Lorem eu qui"
    ]
  },
  "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": "1da99f34-4347-07de-1e4c-c83b246203cc",
    "organisation_id": "0f80dcf8-77ba-112e-aa77-e95c893efd34"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}