A Membership represents a membership belonging to one or more Customers.
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_dateThe date which the membership ends
An external reference for this membership.
membership_numberThe 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.
next_billing_dateThe date which the membership will next be billed
next_chargeA 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.
payment_methodDetails 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
""listMembershipsThis endpoint lists the Memberships which are associated to the provided site.
The Memberships were successfully retrieved
{
"data": [],
"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"
}
}getMembershipUse this endpoint to retrieve a Membership by its ID.
membershipIdThe ID of the membership
{
"data": {
"id": "db6e923e-8084-4108-1fb0-24ba17047873",
"attention_reason": "payment_failed",
"basket_id": "69972f6a7eaf0a01420000af",
"customer": {
"id": "67d34ae4-a38d-39de-178d-87677481f614",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1927-08-30",
"brand_id": "90e7ccfd-7c15-d7da-a6a2-e05732eb3564",
"site_id": "69b9a9fa-aee5-39b3-f9f2-57af9f989a50",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "1255dfba-f4c5-77f4-5139-af192d3515d4",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1930-04-05T12:38:05.0Z",
"created_at": "1922-09-05T12:50:32.0Z",
"updated_at": "1905-10-24T13:33:01.0Z",
"deleted_at": "1924-10-15T23:04:32.0Z",
"last_active_at": "1903-04-20T17:59:35.0Z",
"email_verified_at": "1940-10-02T04:31:50.0Z",
"last_check_in": {
"checked_in_at": "1932-08-03T22:35:24.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "fe4d0186-3ded-39ae-75be-314e354eab5a",
"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": "esse minim occaecat"
},
"end_date": "1954-03-26T11:35:57.0Z",
"external_ref": "ut est aliqua sint",
"members": [
{
"customer_id": "d68c11f1-bacf-9ce9-c0df-70446ab50a69",
"is_lead": true,
"membership_number": "1234567890"
},
{
"customer_id": "26098605-220b-671b-2b0e-9cd2528de10b",
"is_lead": true,
"membership_number": "1234567890"
}
],
"membership_number": "1234567890",
"next_billing_date": "1933-05-17T18:27:36.0Z",
"next_charge": {
"id": "748b7e1a-f9a3-453c-bb08-081cda4ef03b",
"amount": 3995,
"currency": "GBP",
"status": "processing",
"billing_period_from": "1940-08-05",
"billing_period_to": "1939-08-05"
},
"payment_method": {
"id": "ad nostrud aliquip",
"type": "card",
"last_4": "sunt dolore ad",
"status": "revoked",
"card_brand": "amex"
},
"rate": {
"id": "4e7b0e00-cf1e-bcc2-8a13-0d0cd1ed4794",
"membership_type_id": "327989c5-07d6-f549-35c4-59d6840da2fd",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [
"nisi amet"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1957-07-16T22:40:54.0Z",
"updated_at": "1940-03-08T20:21:42.0Z"
},
"site_id": "72076fd8-9c89-05d6-90a8-718462901c1a",
"source": "self_signup",
"start_date": "1939-02-11T06:40:51.0Z",
"status": "inactive",
"status_updated_at": "1958-04-17T02:46:13.0Z",
"type": {
"id": "16a78ffb-90a9-6f20-1f4b-1f4b243d2041",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "elit do sunt ex laboris",
"brand_id": "2443e460-d415-a83b-7e4a-788fef2c5db7",
"offline_payments": false,
"disable_confirmation_email": true,
"private": false,
"visibility": "private",
"minimum_start_date": "1922-06-27T05:25:46.0Z",
"min_members": 2,
"max_members": 4,
"rates": [
{
"id": "4cd465dd-3a61-5d83-b611-461f4ea0fda9",
"membership_type_id": "a1d8a8d1-5871-a36a-591b-50ebcf3fbc76",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [
"veniam",
"consectetur fugiat dolor Duis",
"qui",
"enim voluptate",
"ex ipsum aliquip Excepteur velit"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1960-07-16T05:34:33.0Z",
"updated_at": "1912-09-25T10:27:16.0Z"
},
{
"id": "42b3a1a3-f13a-a007-9439-72c8cb8114de",
"membership_type_id": "05a07bb7-8bbf-270d-c0ce-3574c71ffb53",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [
"aliquip dolor",
"reprehenderit aliquip do enim pariatur",
"labore dolor",
"tempor anim ut",
"elit nulla commodo adipisicing sit"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1965-04-01T16:20:22.0Z",
"updated_at": "1921-02-20T11:35:28.0Z"
},
{
"id": "958bb295-ce32-7518-93cb-43b2a262ca50",
"membership_type_id": "df8977e6-97f4-f8d3-cf65-0c3f4fd11cf1",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [],
"default_duration": "P1Y",
"private": true,
"created_at": "1910-03-24T12:20:10.0Z",
"updated_at": "1922-11-27T23:14:20.0Z"
},
{
"id": "1db542a1-a7db-72ef-0700-97dfdb6aa082",
"membership_type_id": "5d343e49-c1d6-040f-e87b-b8028d018ccd",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [
"dolor occaecat ad tempor",
"do sint ex in adipisicing",
"consectetur nulla deserunt"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1969-07-14T20:02:01.0Z",
"updated_at": "1891-03-12T06:48:11.0Z"
},
{
"id": "00ad01af-c75e-94a8-956d-de4c3686116c",
"membership_type_id": "c884fcd7-fec9-fa56-47fd-db36d4eb8804",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"billing_frequency": "P1M",
"processors": [
"in deserunt adipisicing",
"non velit mollit exercitation enim",
"tempor ut"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1902-02-03T07:27:48.0Z",
"updated_at": "1953-02-25T18:49:58.0Z"
}
],
"revenue_schedule": "FREQ=WEEKLY",
"created_at": "1920-02-19T19:58:35.0Z",
"updated_at": "1936-11-22T20:12:04.0Z",
"deleted_at": "1947-01-06T16:30:09.0Z"
},
"payment_details_url": "esse aliquip Duis",
"created_at": "1931-09-12T15:56:18.0Z"
}
}{
"message": "The requested resource could not be found"
}actionAddMembershipChargePaymentThis endpoint allows a manual (off-Trybe) payment to be recorded against a membership charge.
chargeIdThe ID of the charge
payment_type_idThe ID of the custom payment type this payment should be recorded as
amountThe amount of the payment
{
"data": {
"id": "8a83f3d1-7cff-9d18-88e9-4b8da182ce6e",
"membership": {
"id": "7ce29bb3-5d7d-ca06-82f2-88f086322766",
"membership_number": "00000014",
"type_name": "Gold Membership",
"customer_id": "c19d7d7b-80aa-2834-6d4f-2316b65d3a26",
"customer_name": "Jane Jones"
},
"processor": "adyen",
"processor_data": {
"cardholder_name": "Mrs J Jones",
"last_4": 4001,
"processor_type": "Cash"
},
"amount": 3995,
"original_amount": 3995,
"currency": "gbp",
"tax": 1000,
"status": "succeeded",
"description": "sed dolore in",
"can_download_receipt": false,
"amount_refunded": -10773931,
"refunded": false,
"refunds": [],
"site_id": "cd2278b5-5255-0ab7-4401-c3562a183c05",
"billing_period_from": "1926-04-10",
"billing_period_to": "1925-08-01",
"processing_at": "1951-11-09T03:18:29.0Z",
"created_at": "1891-03-08T10:18:07.0Z",
"updated_at": "1941-06-14T17:54:14.0Z"
}
}{
"message": "The requested resource could not be found"
}actionProcessMembershipChargeThis endpoint allows a membership charge to be processed manually.
chargeIdThe ID of the charge
{
"data": {
"id": "238fca05-ba96-228d-c96d-cddcf7298c12",
"membership": {
"id": "0e7ab354-a8c9-09e1-8bc8-2e2eac637e94",
"membership_number": "00000014",
"type_name": "Gold Membership",
"customer_id": "4dd50ebc-2a78-2767-0792-ea5685113c2a",
"customer_name": "Jane Jones"
},
"processor": "adyen",
"processor_data": {
"processor_type": "Cash"
},
"amount": 3995,
"original_amount": 3995,
"currency": "gbp",
"tax": 1000,
"status": "succeeded",
"description": "eiusmod ullamco Ut et",
"can_download_receipt": true,
"amount_refunded": -50397219,
"refunded": true,
"refunds": [
{
"id": "48de3e72-8134-a366-d089-cb057b342c7f",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "a41e6756-3c61-dd41-226e-811eba9ef422",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1950-09-30T08:05:28.0Z",
"updated_at": "1938-10-29T11:48:33.0Z"
},
{
"id": "1bd59bc6-d928-3310-a8ff-e0ee128eaea8",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "898b5aae-78c1-f959-ebb1-a249beeda401",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1956-09-15T03:45:31.0Z",
"updated_at": "1957-09-05T14:39:01.0Z"
},
{
"id": "a019848e-daed-caaa-728a-582088ad97c9",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "3c7b3843-5c80-4721-2623-2dd5e8014066",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1928-07-24T06:45:41.0Z",
"updated_at": "1931-01-24T19:32:57.0Z"
},
{
"id": "e53f25f0-6691-10c5-a90e-4a945dd67621",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "af1404a3-ba1e-f890-619d-247926ff2ca3",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1958-05-19T01:29:32.0Z",
"updated_at": "1913-06-08T10:35:46.0Z"
},
{
"id": "d9859ab4-de6b-97fb-65bf-685eefed4bf6",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "28ae68d7-ba9c-cf3d-1b0c-7d8a37e20ce5",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1915-06-09T13:33:44.0Z",
"updated_at": "1937-10-20T14:42:32.0Z"
}
],
"site_id": "4565c4ee-671f-e44f-bbb3-719464582f40",
"billing_period_from": "1904-03-08",
"billing_period_to": "1912-04-29",
"processing_at": "1898-05-13T09:43:53.0Z",
"created_at": "1968-12-02T14:32:45.0Z",
"updated_at": "1894-01-21T07:55:13.0Z"
}
}{
"message": "The requested resource could not be found"
}actionRetryMembershipChargeThis endpoint allows a membership charge to be retried manually.
chargeIdThe ID of the charge
{
"data": {
"id": "d5b74f54-53a6-cc4f-fc1e-25a8ae2b80aa",
"membership": {
"id": "5164f0c3-379a-9c28-950f-bb4b4d6c54ec",
"membership_number": "00000014",
"type_name": "Gold Membership",
"customer_id": "6c4e07e8-0e37-fe2f-a154-e846022ce21a",
"customer_name": "Jane Jones"
},
"processor": "adyen",
"processor_data": {
"cardholder_name": "Mrs J Jones",
"last_4": 4001,
"processor_type": "Cash",
"processor_type_id": "69972f6a7eaf0a01420000b0"
},
"amount": 3995,
"original_amount": 3995,
"currency": "gbp",
"tax": 1000,
"status": "succeeded",
"description": "cupidatat",
"can_download_receipt": true,
"amount_refunded": 2233698,
"refunded": false,
"refunds": [
{
"id": "c59f05a4-dc34-2ebd-bb9a-99ced0729d11",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "319f710e-8007-cb32-0a04-cf11bea8921c",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1938-08-27T03:12:22.0Z",
"updated_at": "1906-10-09T03:51:02.0Z"
},
{
"id": "d1f851d0-0f74-6053-6383-e06625305dbb",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "8348deef-bcba-3acb-b1c1-b365b9c1c335",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1911-01-10T07:54:23.0Z",
"updated_at": "1901-06-11T07:37:49.0Z"
},
{
"id": "b82d9524-26ef-8efb-5a85-5f92227ffab4",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"refunded_by": {
"id": "2e1f7b5f-2592-fd39-0b1c-d582f6d1c527",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1934-12-10T12:19:40.0Z",
"updated_at": "1958-04-02T17:36:39.0Z"
},
{
"id": "46484bf2-ba54-e9af-0322-18ff7ace9853",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "523d2925-0fa5-cc15-0cbd-8a64dbf7bd54",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1939-07-01T06:34:15.0Z",
"updated_at": "1892-02-06T11:57:32.0Z"
}
],
"site_id": "ed9f9df9-bccd-8d73-864e-04f147d900ee",
"billing_period_from": "1953-11-25",
"billing_period_to": "1952-11-19",
"processing_at": "1907-11-09T05:08:15.0Z",
"created_at": "1908-02-12T15:17:50.0Z",
"updated_at": "1905-11-20T23:55:16.0Z"
}
}{
"message": "The requested resource could not be found"
}createMembershipSmsThis endpoint sends an SMS message to a membership's lead member. Currently supports sending billing details request messages.
membershipIdThe ID of the membership
message_typeThe 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.
{
"data": {
"id": "69972f6b7eaf0a01420000b1",
"organisation_id": "1ba201ed-0a07-6883-0e33-101de3a10c1c",
"site_id": "5beb3a9b-1a58-75ce-0a81-b3005502442d",
"customer_id": "3fc83cf3-7422-53bc-8ae5-4ecf4af88f83",
"membership_id": "4e494668-72bf-1b67-810c-b303862c57c7",
"from": "Trybe",
"to": "+447123456789",
"message": "quis",
"message_type": "billing_details_request",
"message_delivered": true,
"created_at": "2024-02-02T12:01:01.0Z",
"sent_at": "2024-02-02T12:01:01.0Z"
}
}{
"message": "The requested resource could not be found"
}{
"errors": {
"pariatur_b": [],
"occaecatda": [
"ea esse proident",
"dolor cillum sunt dolor"
]
},
"message": "The request didn't pass validation"
}createMembershipSmsPreviewThis endpoint previews an SMS message for a membership.
membershipIdThe ID of the membership
message_typeThe 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.
{
"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": "18e2d7b4-bb4d-5d37-d1b8-f37f6ed65e43",
"organisation_id": "d0a035d4-402c-5532-2145-414906ef1863"
}
}{
"message": "The requested resource could not be found"
}