A Membership
represents a membership belonging to one or more Customer
s.
The ID of the membership
The ID of the site this membership belongs to
membership_number
The unique membership number of the lead member. This is always a 10 digit numeric string.
Since this field only relates to the lead member, this is now deprecated.
Instead, find the membership for the relevant customer in the members
array.
Possible values are active
, needs_dd_mandate
, needs_attention
, reserved
, inactive
, expired
and upcoming
Where the membership was created
Possible values are self_signup
, app
, import
and unknown
Details about the payment method attached to this membership. This payment method is used to take payment on the monthly billing period. If a payment method hasn't been set up, this will be null.
The date which the membership starts
The date which the membership ends
The datetime which the membership was created
The basket ID which was used to purchase this membership, if applicable.
An external reference for this membership.
The date which the membership will next be billed
next_charge
A summary of the next charge that's due for this membership.
This property is only populated when the membership was retrieved using the `getCustomerMemberships endpoint.
A string describing what kind of action needs to take place
Possible values are no_mandate
, setup_unpaid
, mandate_revoked
, payment_failed
, payment_disputed
, payment_outstanding
and site_id
""
listMemberships
This endpoint lists the Membership
s which are associated to the provided site.
The Membership
s were successfully retrieved
{
"data": [
{
"id": "a637301a-da4e-12ac-f611-25bfc2380a63",
"site_id": "39746193-728e-d179-c380-47f07095886d",
"membership_number": "1234567890",
"customer": {
"id": "a540291d-e815-05af-459c-bf20fe437150",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1942-02-26",
"brand_id": "a8b301d8-ecc8-27f4-6358-889bee5b1666",
"site_id": "587c00da-0b69-e1ac-3753-d19993a7d113",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "f34cd22e-7784-c75b-a9cf-532699134251",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "a98ab276-f8ed-3af7-6097-2ad5fe7836ee",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "b582480e-90cf-d0c0-4953-589ea803a284",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "e4c490f7-5ede-e87c-55ad-e3c98fb117a3",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1896-04-06T19:20:07.0Z",
"created_at": "1930-12-15T05:57:19.0Z",
"updated_at": "1950-03-22T13:40:32.0Z",
"deleted_at": "1957-10-19T01:15:20.0Z",
"last_active_at": "1895-01-03T08:24:21.0Z",
"email_verified_at": "1920-07-12T13:02:01.0Z",
"last_check_in": {
"checked_in_at": "1900-02-20T17:51:10.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "2d239b26-86c8-6f51-adfd-5cb8fe64c59f",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "minim sit"
},
"type": {
"id": "5e9df7c1-89e2-1a2f-1a21-8074ac15d1f5",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "eu ut ea culpa",
"brand_id": "c40099a8-4c82-27e9-4497-980bee6aaed7",
"offline_payments": true,
"disable_confirmation_email": false,
"private": false,
"visibility": "public",
"minimum_start_date": "1941-02-03T05:35:16.0Z",
"min_members": 2,
"max_members": 4,
"rates": [
{
"id": "547c1530-7732-2179-f346-80eac043434c",
"price": 5000,
"default_duration": "P1Y",
"updated_at": "1966-08-21T15:19:12.0Z"
},
{
"id": "8b23c00d-c7f3-da73-970c-0eb3ba27957d",
"membership_type_id": "54077dc6-ebe4-7470-4e9d-4d05cf06c90d",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"fugiat id sit sint eu"
],
"private": true,
"created_at": "1955-10-07T20:01:06.0Z",
"updated_at": "1940-11-10T01:06:28.0Z"
},
{
"id": "dde71c6b-f68e-51d8-b08e-8f849af7849b",
"membership_type_id": "4f528a17-6a44-a074-c15f-bd88e1e869a6",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"created_at": "1915-12-29T09:20:52.0Z"
},
{
"id": "5bfa6086-01f4-680f-3edf-60b6e6a5626a",
"tax": 1250,
"billing_frequency": "P1M",
"private": true,
"updated_at": "1927-09-29T06:18:07.0Z"
},
{
"id": "92f3ab65-f82f-80a7-31dd-3adc131617c9",
"membership_type_id": "cec14882-b3cb-812d-eecf-c1385a843f73",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"processors": [],
"updated_at": "1950-11-12T09:53:34.0Z"
}
],
"revenue_schedule": "FREQ=WEEKLY",
"created_at": "1912-11-22T19:30:21.0Z",
"updated_at": "1955-09-15T19:35:49.0Z",
"deleted_at": "1899-07-10T17:52:12.0Z"
},
"rate": {
"id": "bd46e767-4dfe-55d7-9253-f560a1a9a9e8",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"processors": [
"commodo velit",
"aute",
"in veniam pariatur occaecat sint"
],
"default_duration": "P1Y"
},
"status": "expired",
"source": "unknown",
"payment_method": {
"id": "eu consequat sed aliquip",
"type": "direct_debit",
"last_4": "elit culpa Excepteur"
},
"start_date": "1960-04-21T03:45:08.0Z",
"end_date": "1919-01-21T03:01:41.0Z",
"created_at": "1894-06-07T01:50:06.0Z",
"basket_id": "6821b034aaa34b016100004b",
"external_ref": "fugiat voluptate",
"next_billing_date": "1923-03-04T12:42:43.0Z",
"next_charge": {
"id": "4dc10a5f-aace-9f43-ab8d-6bf7341128b3",
"amount": 3995,
"currency": "GBP",
"status": "processing",
"billing_period_from": "1903-02-25",
"billing_period_to": "1957-10-16"
},
"attention_reason": "no_mandate"
},
{
"id": "e10cf9f3-9619-48d4-e505-de4446de86a5",
"site_id": "57a12487-0c16-d9d6-848a-689c20bd31ba",
"membership_number": "1234567890",
"customer": {
"id": "88635ee2-8e31-b96e-089a-0bfe797f7028",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1968-09-22",
"brand_id": "59662942-e16d-d04c-de7f-d2f2319bc596",
"site_id": "8744a7a3-b736-541c-7077-9c7d1d60f81f",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "031ba36b-88d6-38ea-fb00-a857eb058228",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "d6edce68-d889-e4e5-f3a0-52779c81316d",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "2f3e6887-b99d-1dca-0a77-e7b78e0360fe",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "da34236b-b79a-d372-d9de-7447d3bb36f0",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "b6a73275-0a12-abaa-39cf-3a13901d033d",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1954-07-25T07:53:43.0Z",
"created_at": "1925-08-27T04:23:28.0Z",
"updated_at": "1947-04-04T10:05:44.0Z",
"deleted_at": "1909-03-01T19:57:53.0Z",
"last_active_at": "1951-11-09T13:48:17.0Z",
"email_verified_at": "1944-06-19T15:18:32.0Z",
"last_check_in": {
"checked_in_at": "1911-03-28T11:42:33.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "1bf6848e-8273-e73b-1792-2b525d0c271c",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "ad"
},
"members": [
{
"customer_id": "ad91f08c-0863-e425-476a-f143988c5633",
"membership_number": "1234567890",
"is_lead": false
},
{
"customer_id": "3c89feab-c712-6ca4-d137-5926f2217338",
"membership_number": "1234567890",
"is_lead": false
},
{
"customer_id": "16892dc1-eba8-17ba-3ee3-9b387037234e"
},
{
"customer_id": "d8b34fae-24c4-9d37-540b-ada0c04bffed",
"membership_number": "1234567890",
"is_lead": true
}
],
"type": {
"id": "c59d6689-9249-a8af-8ce8-253998705153",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "do Lorem dolor",
"brand_id": "fe265e33-0261-2a7b-f59f-613e861c394f",
"offline_payments": true,
"disable_confirmation_email": false,
"private": true,
"visibility": "public",
"minimum_start_date": "1944-11-30T11:12:28.0Z",
"min_members": 2,
"max_members": 4,
"rates": [
{
"id": "441882cd-aa34-6354-8db9-515fc31d34c2",
"membership_type_id": "35af0796-2b0b-522b-dd78-15d693f50720",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"fugiat anim",
"ipsum esse nulla anim officia",
"fugiat ad qui occaecat consectetur",
"amet irure",
"aliquip tempor nostrud"
],
"default_duration": "P1Y",
"private": true,
"updated_at": "1907-04-07T06:35:25.0Z"
},
{
"id": "fe7a5e68-a26f-3ad9-580d-b5e97176a1a5",
"membership_type_id": "937bc982-0e04-113e-5cdf-174612488ae1",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [],
"default_duration": "P1Y",
"updated_at": "1947-05-14T08:11:02.0Z"
},
{
"id": "29d08c13-9309-9a16-4a9e-e4fff20a6f1f",
"membership_type_id": "a49431a9-3b95-5e86-02e3-f3fadaaf4701",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"processors": [
"amet est deserunt"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1926-09-05T04:39:16.0Z",
"updated_at": "1964-05-22T07:58:32.0Z"
},
{
"membership_type_id": "5aefad97-b6fc-5e12-e275-645cd4bf951f",
"name": "Standard rate",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"veniam sint officia mollit",
"sint Excepteur non Ut",
"nisi"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1905-07-15T02:49:24.0Z",
"updated_at": "1913-03-25T21:08:04.0Z"
}
],
"revenue_schedule": "FREQ=WEEKLY",
"created_at": "1940-05-15T21:44:07.0Z",
"updated_at": "1892-03-09T22:01:23.0Z",
"deleted_at": "1967-10-13T19:13:01.0Z"
},
"source": "app",
"start_date": "1927-11-21T19:34:43.0Z",
"next_billing_date": "1926-10-15T06:39:16.0Z",
"next_charge": {
"id": "3bf0d16e-3f88-f2ca-4681-2f30a4c3efe5",
"amount": 3995,
"currency": "GBP",
"status": "failed",
"billing_period_from": "1914-06-15",
"billing_period_to": "1901-11-16"
}
}
],
"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
Use this endpoint to retrieve a Membership
by its ID.
membershipId
The ID of the membership
{
"data": {
"id": "8b941566-8411-e088-81bf-53ddbe682829",
"site_id": "5110815e-9161-3870-ae56-f93d5644149c",
"membership_number": "1234567890",
"customer": {
"id": "1d4373fb-6d9b-2e41-bed4-f67116c6341b",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1961-10-23",
"brand_id": "e1b51422-55a4-6772-9057-4a96682f92f2",
"site_id": "bc88768f-210c-d962-a40f-5959cd59f75b",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [],
"preferred_locale": "en",
"locked_at": "1909-08-15T13:24:06.0Z",
"created_at": "1960-09-13T17:42:02.0Z",
"updated_at": "1935-04-19T05:55:52.0Z",
"deleted_at": "1933-04-27T07:49:30.0Z",
"last_active_at": "1940-04-10T05:05:06.0Z",
"email_verified_at": "1905-01-16T06:16:31.0Z",
"last_check_in": {
"checked_in_at": "1936-09-04T13:58:11.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "acecee6f-af4b-6ef2-640e-e44ef007a4dc",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "sint dolore dolore qui aute"
},
"members": [
{
"customer_id": "73958237-e043-6c56-c02e-8c80778ae6d4",
"is_lead": true
},
{
"customer_id": "e9ae2d4b-148c-89cc-6334-7c58ceafd014"
},
{
"customer_id": "123fa48d-6790-65ff-0b52-c3158a209327",
"membership_number": "1234567890",
"is_lead": true
},
{
"customer_id": "0f1f556c-42ac-a145-9180-e16e157b8fdd",
"membership_number": "1234567890",
"is_lead": false
}
],
"rate": {
"id": "8872dcc8-cd4a-25ab-b544-f46bbb9490cc",
"membership_type_id": "0ec95eda-972a-747f-9bd6-8460ea6f3e9f",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250
},
"status": "needs_attention",
"source": "self_signup",
"payment_method": {
"id": "irure Duis",
"type": "direct_debit",
"last_4": "qui",
"status": "revoked",
"card_brand": "amex"
},
"start_date": "1920-04-21T12:54:54.0Z",
"created_at": "1965-09-15T04:04:56.0Z",
"basket_id": "6821b034aaa34b016100004c",
"external_ref": "ipsum labore",
"next_billing_date": "1946-12-04T21:25:39.0Z",
"next_charge": {
"id": "80cc8aab-6477-d8da-358d-ee3cd4e9b4c0",
"amount": 3995,
"currency": "GBP",
"status": "awaiting_approval",
"billing_period_from": "1946-11-02",
"billing_period_to": "1962-12-07"
},
"attention_reason": "payment_disputed"
}
}
{
"message": "The requested resource could not be found"
}
actionAddMembershipChargePayment
This endpoint allows a manual (off-Trybe) payment to be recorded against a membership charge.
membershipId
The ID of the membership
chargeId
The ID of the charge
payment_type_id
The ID of the custom payment type this payment should be recorded as
amount
The amount of the payment
{
"data": {
"id": "7a2f2c86-3dde-04c9-49e0-8a52afdb9d73",
"membership": {
"id": "11206af4-118f-2f34-00e2-f93971a43b68",
"membership_number": "00000014",
"type_name": "Gold Membership",
"customer_id": "ed5ee1c3-f2e7-7f9f-8b3f-b7ed317c78d8"
},
"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",
"can_download_receipt": true,
"amount_refunded": "et non",
"refunded": "ipsum quis in",
"refunds": [
{
"id": "f3118bf3-1e23-1fdc-ede6-a686d53b7818",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "80c0f701-8358-476e-db7a-642ffb132173",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1960-04-04T01:31:19.0Z",
"updated_at": "1966-04-21T19:25:05.0Z"
},
{
"id": "22dbb2c1-470c-cccf-b1dc-b0349df8ea40",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "09c9e2dd-55b3-1284-d9ad-38fde65984ba",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1936-12-14T22:04:45.0Z",
"updated_at": "1891-10-18T17:12:17.0Z"
},
{
"id": "9f423632-8bff-6ce0-4b18-408a47717f9b",
"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": "1960-01-28T17:03:19.0Z",
"updated_at": "1968-01-29T20:49:12.0Z"
},
{
"id": "25947c8e-9530-fb1f-bc05-a2dd64961ee2",
"status": "succeeded",
"amount": 995,
"currency": "gbp",
"notes": "Gesture of good will",
"failure_reason": "invalid_details",
"refunded_by": {
"id": "38e0c123-9e54-a660-b2af-cc8dd7299d47",
"full_name": "Jane Jenkins"
},
"processor_data": {
"processor": "adyen",
"processor_id": "re_64301e0b2df9d11814010ea6"
},
"created_at": "1894-09-29T17:12:27.0Z",
"updated_at": "1896-03-25T06:16:59.0Z"
}
],
"site_id": "cda622d1-c14f-f779-bb97-44f31100bb4f",
"billing_period_from": "1952-09-10",
"billing_period_to": "1912-08-20",
"created_at": "1893-02-16T08:36:39.0Z",
"updated_at": "1956-03-13T12:04:28.0Z"
}
}
{
"message": "The requested resource could not be found"
}