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": "95a25f9b-9bef-d6d3-0436-e3b96a906382",
      "attention_reason": "setup_unpaid",
      "basket_id": "69ceac238e8501017000019a",
      "customer": {
        "id": "3347154f-e5fb-cc22-840a-e1a4a4271722",
        "first_name": "Jane",
        "last_name": "Doe",
        "full_name": "Jane Doe",
        "phone": "+447900000000",
        "has_password": true,
        "dob": "1950-09-03",
        "brand_id": "a718a818-9700-c74c-a9b9-85ce3202bed4",
        "site_id": "e943dfc3-6446-4a10-8d03-fa0812ea0dff",
        "stripe_id": "cus_1234567890",
        "express_stripe_id": "cus_1234567890",
        "email": "janedoe@example.com",
        "labels": [
          {
            "id": "2665258b-ec45-b485-b348-02b43ce137a5",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "f2bb7603-e03a-a038-0bff-b4abdce7ecea",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "a5112ad2-f34c-b32e-6399-3002609fec22",
            "value": "VIP",
            "colour": "ff6634"
          },
          {
            "id": "39a2a514-bc02-2217-0ff7-d5d0ddee2262",
            "value": "VIP",
            "colour": "ff6634"
          }
        ],
        "preferred_locale": "en",
        "locked_at": "1922-04-20T11:25:59.0Z",
        "created_at": "1902-11-04T10:43:20.0Z",
        "updated_at": "1952-09-02T01:15:56.0Z",
        "deleted_at": "1948-08-07T19:11:39.0Z",
        "last_active_at": "1948-07-08T06:24:02.0Z",
        "email_verified_at": "1908-07-03T17:30:31.0Z",
        "last_check_in": {
          "checked_in_at": "1945-01-02T19:30:24.0Z",
          "method": "Scanned"
        },
        "avatar_id": "000000-000000-000000-000000",
        "avatar": {
          "id": "730dbbc7-ab93-6aca-0eb1-406a5d0b73b2",
          "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": "Lorem do"
      },
      "end_date": "1948-07-23T15:38:22.0Z",
      "external_ref": "eu nulla",
      "members": [
        {
          "customer_id": "cd46ac57-b488-a82e-8aca-453f93ef837b",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "3d955083-0cde-e875-fd40-fbea8fed6bd0",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "6a6722dc-661a-c09e-8505-4a61fe0aebf9",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "75c771f8-05f7-af7a-7427-c16c771ad5e3",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "8b47a11e-0959-703d-ed84-fd752fc19611",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1913-03-11T05:38:40.0Z",
      "next_charge": {
        "id": "c017c37f-91d0-8368-857e-6b1754b73e16",
        "amount": 3995,
        "currency": "GBP",
        "status": "pending",
        "billing_period_from": "1917-07-04",
        "billing_period_to": "1932-04-03"
      },
      "payment_method": {
        "id": "dolore adipisicing",
        "type": "card",
        "last_4": "est in ipsum Duis cillum",
        "status": "revoked",
        "card_brand": "amex"
      },
      "rate": {
        "id": "ccd22ec3-58d6-ee9a-8d48-62a345f6abc5",
        "membership_type_id": "726da878-fe36-6599-3f7e-49ce131311eb",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "enim anim eiusmod occaecat",
          "ipsum veniam cillum",
          "quis ut dolore"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1949-03-27T03:16:38.0Z",
        "updated_at": "1916-11-13T06:01:29.0Z"
      },
      "site_id": "13dd8b17-851f-a62b-6af0-5ad1d21d186b",
      "source": "self_signup",
      "start_date": "1923-01-07T03:17:02.0Z",
      "status": "active",
      "status_updated_at": "1922-11-08T19:36:32.0Z",
      "type": {
        "id": "61dfb486-a472-3f17-7c2e-fab6c61bda74",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "quis",
        "brand_id": "545826d1-069e-8425-2de8-ae02cbc9cad7",
        "offline_payments": false,
        "disable_confirmation_email": true,
        "private": true,
        "visibility": "link_only",
        "minimum_start_date": "1954-02-09T12:27:24.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1933-05-30T07:47:26.0Z",
        "updated_at": "1927-07-11T03:47:34.0Z",
        "deleted_at": "1912-05-24T15:42:26.0Z"
      },
      "payment_details_url": "ea qui ex elit officia",
      "created_at": "1929-04-11T14:03:53.0Z"
    },
    {
      "id": "53e2d7b6-30df-d35d-380d-ce75825bc602",
      "attention_reason": "payment_failed",
      "basket_id": "69ceac238e8501017000019b",
      "end_date": "1937-06-04T21:58:31.0Z",
      "external_ref": "ipsum elit sint",
      "members": [
        {
          "customer_id": "a4ee6a7d-466c-f95d-8c8d-52f658675a13",
          "is_lead": false,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "7df32d53-8cfa-89f1-e19f-4ea47d809ff9",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "c9a0afe7-33c6-f5e1-a89d-c6f0f9d40e4f",
          "is_lead": true,
          "membership_number": "1234567890"
        },
        {
          "customer_id": "630c8e6e-9814-ee52-23e0-b6960cd8dfd8",
          "is_lead": true,
          "membership_number": "1234567890"
        }
      ],
      "membership_number": "1234567890",
      "next_billing_date": "1924-09-02T05:01:35.0Z",
      "payment_method": {
        "id": "ullamco occaecat cupidatat adipisicing"
      },
      "rate": {
        "id": "dcb061fa-6873-0a13-696d-17b9e0ab82a1",
        "membership_type_id": "afc591ea-f32a-73b9-c4f2-8f4ff5c82647",
        "name": "Standard rate",
        "currency": "GBP",
        "price": 5000,
        "joining_fee": 1000,
        "billing_frequency": "P1M",
        "processors": [
          "cupidatat dolor officia veniam laborum",
          "dolor laboris Excepteur Ut enim"
        ],
        "default_duration": "P1Y",
        "private": true,
        "created_at": "1961-08-01T10:36:05.0Z",
        "updated_at": "1925-10-05T01:03:30.0Z"
      },
      "site_id": "5b3783ed-41ce-17f6-a612-945c0bc9fafa",
      "source": "self_signup",
      "start_date": "1915-07-25T06:48:09.0Z",
      "status": "active",
      "status_updated_at": "1923-11-11T23:52:46.0Z",
      "type": {
        "id": "36ad80fa-8f8c-6536-f65e-dc7153116eec",
        "name": "Gold tier",
        "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
        "terms": "velit cillum",
        "brand_id": "13170e5c-79da-632e-e5c3-0e2f9709e149",
        "offline_payments": true,
        "disable_confirmation_email": true,
        "private": false,
        "visibility": "public",
        "minimum_start_date": "1966-10-05T14:01:38.0Z",
        "min_members": 2,
        "max_members": 4,
        "rates": [
          {
            "id": "53eb6095-0200-73d5-6367-931b558f984f",
            "membership_type_id": "bc41a4ea-3459-5ecd-6fd5-a589909ad42b",
            "name": "Standard rate",
            "currency": "GBP",
            "price": 5000,
            "joining_fee": 1000,
            "billing_frequency": "P1M",
            "processors": [
              "dolor reprehenderit voluptate sunt cupidatat",
              "reprehenderit non",
              "ex magna nulla mollit"
            ],
            "default_duration": "P1Y",
            "private": true,
            "created_at": "1951-08-05T10:30:20.0Z",
            "updated_at": "1955-01-23T20:17:02.0Z"
          }
        ],
        "revenue_schedule": "FREQ=WEEKLY",
        "created_at": "1908-09-11T01:22:37.0Z",
        "updated_at": "1939-03-13T06:10:22.0Z",
        "deleted_at": "1968-05-12T14:48:32.0Z"
      },
      "created_at": "1896-09-04T20:42:58.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": "739d237d-9e86-0cb6-087b-214353e85d38",
    "attention_reason": "no_mandate",
    "basket_id": "69ceac238e8501017000019c",
    "customer": {
      "id": "8802fe93-923b-df3d-241d-ebfb4af2d139",
      "first_name": "Jane",
      "last_name": "Doe",
      "full_name": "Jane Doe",
      "phone": "+447900000000",
      "has_password": true,
      "dob": "1950-01-31",
      "brand_id": "c24c07d2-c7ea-75ef-e013-9959d0b9e7f5",
      "site_id": "5241dfb1-0031-f0ad-6116-e35fd43087cb",
      "stripe_id": "cus_1234567890",
      "express_stripe_id": "cus_1234567890",
      "email": "janedoe@example.com",
      "labels": [
        {
          "id": "b2004707-80b7-cd21-3fd0-fba5858b933a",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "05c48471-1d1b-956c-0c26-84efc3081d08",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "c0ac29c5-3662-7256-9f54-7ce4d38a34f4",
          "value": "VIP",
          "colour": "ff6634"
        },
        {
          "id": "e252e3a0-85ca-c858-d494-481bbd124161",
          "value": "VIP",
          "colour": "ff6634"
        }
      ],
      "preferred_locale": "en",
      "locked_at": "1948-01-15T16:54:59.0Z",
      "created_at": "1905-07-05T12:33:29.0Z",
      "updated_at": "1964-01-13T12:35:01.0Z",
      "deleted_at": "1925-09-17T04:36:04.0Z",
      "last_active_at": "1957-12-30T22:30:07.0Z",
      "email_verified_at": "1914-05-04T18:28:56.0Z",
      "last_check_in": {
        "checked_in_at": "1902-11-21T17:24:11.0Z",
        "method": "Scanned"
      },
      "avatar_id": "000000-000000-000000-000000",
      "avatar": {
        "id": "cff30712-d1bc-39b3-1a07-b2caa7947a35",
        "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": "1952-09-14T17:30:18.0Z",
    "external_ref": "sed cillum amet dolor",
    "members": [],
    "membership_number": "1234567890",
    "next_billing_date": "1917-05-13T01:32:13.0Z",
    "next_charge": {
      "id": "1d7d5685-b71d-2a4a-c3f9-3cab58de55c5",
      "amount": 3995,
      "currency": "GBP",
      "status": "processing",
      "billing_period_from": "1915-02-20",
      "billing_period_to": "1921-08-06"
    },
    "payment_method": {
      "id": "nisi quis sunt",
      "type": "card",
      "last_4": "ipsum labore",
      "status": "revoked",
      "card_brand": "amex"
    },
    "rate": {
      "id": "cfe83148-bd6c-4b97-0c13-959510824497",
      "membership_type_id": "fc54ac5e-5f47-c5d6-f2c5-dd4c5f29b7b8",
      "name": "Standard rate",
      "currency": "GBP",
      "price": 5000,
      "joining_fee": 1000,
      "billing_frequency": "P1M",
      "processors": [
        "cupidatat enim sed"
      ],
      "default_duration": "P1Y",
      "private": true,
      "created_at": "1909-10-30T19:32:25.0Z",
      "updated_at": "1955-12-08T22:46:31.0Z"
    },
    "site_id": "cd49abce-a43b-118e-783d-2673c1622317",
    "source": "unknown",
    "start_date": "1908-03-08T19:37:37.0Z",
    "status": "expired",
    "status_updated_at": "1904-11-17T08:25:51.0Z",
    "type": {
      "id": "5733d589-b89e-2b67-a07c-efcec3ba8b8c",
      "name": "Gold tier",
      "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
      "terms": "veniam",
      "brand_id": "24610756-26e6-a1f3-2a81-2c618a68292b",
      "offline_payments": false,
      "disable_confirmation_email": true,
      "private": true,
      "visibility": "public",
      "minimum_start_date": "1963-10-20T09:54:57.0Z",
      "min_members": 2,
      "max_members": 4,
      "rates": [
        {
          "id": "6e5daf59-2284-7c64-d7e6-a2fea237c15a",
          "membership_type_id": "497d394e-70da-da58-85a9-db102b34f002",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1892-04-11T01:04:26.0Z",
          "updated_at": "1940-09-12T01:08:21.0Z"
        },
        {
          "id": "b65859ca-8a07-1a76-e84a-ee0336cdbbe9",
          "membership_type_id": "a6558ca1-7921-f158-509a-f8d1298f2b7d",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [
            "consectetur Ut pariatur",
            "non sunt et eiusmod Duis",
            "sint consequat consectetur culpa",
            "ut nulla eiusmod"
          ],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1905-01-31T03:52:30.0Z",
          "updated_at": "1949-12-29T12:20:39.0Z"
        },
        {
          "id": "f89b8bd1-df68-04ae-64e1-b185d74becc9",
          "membership_type_id": "e5e4ead2-68a2-8ac6-c618-5363127b59ba",
          "name": "Standard rate",
          "currency": "GBP",
          "price": 5000,
          "joining_fee": 1000,
          "billing_frequency": "P1M",
          "processors": [],
          "default_duration": "P1Y",
          "private": true,
          "created_at": "1953-12-15T04:58:33.0Z",
          "updated_at": "1956-01-27T23:38:31.0Z"
        }
      ],
      "revenue_schedule": "FREQ=WEEKLY",
      "created_at": "1911-08-18T09:37:45.0Z",
      "updated_at": "1923-05-18T21:31:02.0Z",
      "deleted_at": "1964-05-23T01:39:14.0Z"
    },
    "payment_details_url": "non nostrud fugiat",
    "created_at": "1904-02-20T05:58:29.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": "24e355ef-860c-6b50-2d0a-bfc85e2efb94",
    "membership": {
      "id": "776baee8-6dc3-387c-3b68-9596655b4836",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "b09df1a7-d656-09bd-fd3d-e2427063af06",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "processor_type_id": "69ceac268e850101700008a7"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "non velit",
    "can_download_receipt": false,
    "amount_refunded": 89240819,
    "refunded": false,
    "refunds": [
      {
        "id": "2fe8b513-1909-564e-afa4-9599fa1ab78f",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1916-02-01T02:22:49.0Z",
        "updated_at": "1945-04-25T01:23:52.0Z"
      }
    ],
    "site_id": "044700ff-844b-531f-5cd5-f5fced89960d",
    "billing_period_from": "1944-11-18",
    "billing_period_to": "1949-01-07",
    "processing_at": "1941-12-19T08:29:39.0Z",
    "created_at": "1950-11-07T07:14:41.0Z",
    "updated_at": "1903-10-15T11:22:14.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": "df259030-36bb-3e1b-403f-6fa4c816acfb",
    "membership": {
      "id": "a267bd72-adf9-8311-5399-35a887eb8754",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "dc498a07-9133-343a-a397-016930606c24",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type_id": "69ceac238e8501017000019d"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "in",
    "can_download_receipt": false,
    "amount_refunded": -85902790,
    "refunded": false,
    "refunds": [
      {
        "id": "13db3974-f575-a1e2-6b0f-0469881deecf",
        "status": "succeeded",
        "amount": 995,
        "currency": "gbp",
        "notes": "Gesture of good will",
        "failure_reason": "invalid_details",
        "refunded_by": {
          "id": "70308ee4-3f6f-fb3b-16ef-26d6d84aea27",
          "full_name": "Jane Jenkins"
        },
        "processor_data": {
          "processor": "adyen",
          "processor_id": "re_64301e0b2df9d11814010ea6"
        },
        "created_at": "1940-08-21T07:50:48.0Z",
        "updated_at": "1910-01-09T16:12:34.0Z"
      }
    ],
    "site_id": "65f3d285-931a-a706-8751-091187d6d33b",
    "billing_period_from": "1890-06-23",
    "billing_period_to": "1949-03-16",
    "processing_at": "1914-07-20T23:57:50.0Z",
    "created_at": "1903-01-15T16:01:15.0Z",
    "updated_at": "1957-09-22T02:37:54.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": "882b20fd-73ec-2d44-97dc-5c67c8eeed7e",
    "membership": {
      "id": "8dd814f3-4f0b-337c-08b2-b386095ca304",
      "membership_number": "00000014",
      "type_name": "Gold Membership",
      "customer_id": "c2a6611b-939f-45c2-c2e0-a613c68ce5f6",
      "customer_name": "Jane Jones"
    },
    "processor": "adyen",
    "processor_data": {
      "cardholder_name": "Mrs J Jones",
      "last_4": 4001,
      "processor_type": "Cash",
      "processor_type_id": "69ceac238e8501017000019e"
    },
    "amount": 3995,
    "original_amount": 3995,
    "currency": "gbp",
    "tax": 1000,
    "status": "succeeded",
    "description": "voluptate minim sed",
    "can_download_receipt": true,
    "amount_refunded": -10335035,
    "refunded": true,
    "refunds": [],
    "site_id": "60b4f94c-1366-ff7e-7b58-42ec6fa115ee",
    "billing_period_from": "1956-08-15",
    "billing_period_to": "1898-03-03",
    "processing_at": "1894-12-05T01:23:52.0Z",
    "created_at": "1890-04-12T16:50:32.0Z",
    "updated_at": "1941-07-06T02:23:25.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": "69ceac268e850101700008a8",
    "organisation_id": "459242f5-4503-3659-8a4a-02efe57a1510",
    "site_id": "2ce47cfe-fe88-d382-28b6-e98ef724c961",
    "customer_id": "074a9924-5bac-fb9a-b427-b3ff16a59502",
    "membership_id": "c4c7f7a8-8cfb-7b62-27dc-bc6650aaf39b",
    "from": "Trybe",
    "to": "+447123456789",
    "message": "commodo ex amet ut dolor",
    "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": {
    "dolorea_": [
      "ut in exercitation quis",
      "laboris"
    ],
    "ine2b": [
      "deserunt quis",
      "amet Excepteur",
      "Duis",
      "mollit"
    ],
    "et8": [
      "ut culpa",
      "Lorem non",
      "dolor ea do"
    ]
  },
  "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": "a24499d2-4c2e-5b7e-fba5-ee2ce7aaf197",
    "organisation_id": "142ba2f4-874d-dc26-033e-76d256452c60"
  }
}
404
example response
{
  "message": "The requested resource could not be found"
}