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": "2c881a4f-65d4-9c1b-b24a-3d45d6bb79ff",
"site_id": "dcf75d5a-628b-8147-b2a6-a8f69ebd858e",
"membership_number": "1234567890",
"customer": {
"id": "67d28e2b-3f89-043f-55df-918021a3ba7b",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1939-12-23",
"brand_id": "da1a6c3c-5b3e-e10b-7578-cfc71aba4a38",
"site_id": "c839e32f-b20b-2c44-dac1-030949bd8aa7",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "8a9870cd-7360-ac6b-0e08-d7e64e2490c4",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "35bc05d7-85a4-145e-4b05-1add8366d689",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1915-10-22T04:22:02.0Z",
"created_at": "1949-06-27T05:20:10.0Z",
"updated_at": "1963-03-03T12:30:07.0Z",
"deleted_at": "1941-11-07T07:53:27.0Z",
"last_active_at": "1918-12-15T13:42:02.0Z",
"email_verified_at": "1936-01-18T19:53:24.0Z",
"last_check_in": {
"checked_in_at": "1904-03-16T04:44:22.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "5b1075d5-160f-8510-25a3-eb5c23698ea5",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "aute reprehenderit velit esse sed"
},
"members": [
{
"customer_id": "2ae55bc3-2406-b169-0a21-d52a7a844dde",
"membership_number": "1234567890"
},
{
"membership_number": "1234567890",
"is_lead": false
}
],
"rate": {
"id": "12579ae9-62ab-d53d-b249-c3495e118931",
"currency": "GBP",
"price": 5000,
"private": true,
"updated_at": "1967-01-20T10:36:10.0Z"
},
"status": "reserved",
"start_date": "1898-11-12T20:39:20.0Z",
"basket_id": "680b77dfa20e430134000055",
"attention_reason": "mandate_revoked"
},
{
"id": "a6a5848c-9ffe-7d5a-d137-56500b0a975c",
"site_id": "3474196c-1630-b7c8-a868-5e1d694e951b",
"membership_number": "1234567890",
"customer": {
"id": "b2f23564-90aa-fb04-d74b-f7d3a832a97b",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1961-05-24",
"brand_id": "e889029a-b71f-ad1e-d2f0-84ca0a4c8151",
"site_id": "16447264-1f03-e870-155a-d87c10a45aab",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "71f2f277-accf-7b00-eea3-2163424b8b23",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1899-06-28T01:56:31.0Z",
"created_at": "1894-04-04T05:20:13.0Z",
"updated_at": "1945-12-08T06:16:29.0Z",
"deleted_at": "1893-11-18T12:13:43.0Z",
"last_active_at": "1901-04-12T10:35:06.0Z",
"email_verified_at": "1963-02-18T01:33:41.0Z",
"last_check_in": {
"checked_in_at": "1943-06-02T04:28:30.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "2a8a0789-8ba9-9e48-e96a-263b46127d59",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "nulla sunt ullamco do"
},
"members": [
{
"customer_id": "d6eaa4b4-0c7a-2860-1c0b-2241fa9b9383",
"membership_number": "1234567890",
"is_lead": true
}
],
"type": {
"id": "60bd1586-5616-a189-3edb-bf146bac1ad5",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "reprehenderit dolore sit",
"brand_id": "b17a0066-40ae-14c4-1b94-498868262561",
"offline_payments": false,
"disable_confirmation_email": true,
"private": false,
"visibility": "link_only",
"minimum_start_date": "1915-02-25T09:56:30.0Z",
"min_members": 2,
"max_members": 4,
"rates": [
{
"id": "d3e5feac-2539-592a-4c3a-6ad53e868842",
"membership_type_id": "de38464d-2f00-f54c-c5a9-597ac65cd11b",
"name": "Standard rate",
"tax": 1250,
"default_duration": "P1Y"
},
{
"id": "7ef6c57b-82d1-0358-a9a7-cf2a37f86953",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"aliquip consectetur cillum dolore",
"quis",
"sed sint",
"Lorem occaecat"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1969-12-17T14:16:25.0Z"
}
],
"revenue_schedule": "FREQ=WEEKLY",
"created_at": "1928-12-15T11:33:25.0Z",
"updated_at": "1926-03-26T07:37:41.0Z",
"deleted_at": "1897-01-12T18:04:01.0Z"
},
"rate": {
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"default_duration": "P1Y",
"updated_at": "1923-10-08T22:50:30.0Z"
},
"source": "app",
"payment_method": {
"type": "card",
"last_4": "deserunt Duis"
},
"start_date": "1951-09-25T16:16:59.0Z",
"created_at": "1893-09-07T21:37:06.0Z",
"external_ref": "tempor sit velit",
"next_billing_date": "1948-09-28T15:43:11.0Z",
"next_charge": {
"id": "aaf1fe8c-6f4b-e3f5-fb99-619063b2cd92",
"amount": 3995,
"currency": "GBP",
"status": "pending",
"billing_period_from": "1919-10-16",
"billing_period_to": "1967-08-20"
},
"attention_reason": "payment_outstanding"
}
],
"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": "8eaa64ec-ccd4-e4e4-646a-7d2f32802b46",
"site_id": "a92c6e29-f3ff-b55b-8d6c-33c763fdeb77",
"membership_number": "1234567890",
"customer": {
"id": "7510255f-9e11-3e75-6bf7-3d8aa2277775",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1957-09-05",
"brand_id": "8e886013-b852-592a-4f90-574c26854407",
"site_id": "b61eea28-60f3-44d7-be38-674d98349ad9",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "854a15fb-70ca-fcf0-e22e-16f2697f2473",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "d29d8b99-4dc3-013e-5056-80ce183d0b01",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "ae968da1-f96c-44a1-d639-f8f36b3a70e3",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1967-01-15T15:01:27.0Z",
"created_at": "1934-01-09T23:20:30.0Z",
"updated_at": "1894-05-04T07:49:27.0Z",
"deleted_at": "1894-07-23T01:44:47.0Z",
"last_active_at": "1968-11-12T07:11:37.0Z",
"email_verified_at": "1912-07-23T03:54:57.0Z",
"last_check_in": {
"checked_in_at": "1946-07-08T19:16:18.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "7922dcf6-2d63-a701-de50-e45b5cee91c8",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "exercitation Excepteur Lorem laborum"
},
"members": [
{
"customer_id": "1228d637-a8fa-3451-f535-b627c6633c3e",
"is_lead": false
},
{
"customer_id": "d88a1a07-43a1-dafa-806e-fd4633b7e9c0",
"membership_number": "1234567890",
"is_lead": true
},
{
"is_lead": false
},
{
"customer_id": "6f25c996-8d5f-50a0-082f-7b40bc692a44",
"membership_number": "1234567890",
"is_lead": false
},
{
"membership_number": "1234567890",
"is_lead": false
}
],
"type": {
"id": "6a71574b-c6ef-f71a-ae97-9ad6a234379e",
"name": "Gold tier",
"description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
"terms": "aliquip",
"brand_id": "f8053db1-272f-501c-b2d0-993e539315ff",
"offline_payments": false,
"disable_confirmation_email": false,
"private": true,
"visibility": "public",
"minimum_start_date": "1897-11-30T06:09:01.0Z",
"min_members": 2,
"max_members": 4,
"rates": [
{
"id": "ed4cd791-62ca-3c60-01b7-743071b724a0",
"membership_type_id": "54f249a4-52d1-8c48-15a6-eca85da2d33a",
"name": "Standard rate",
"updated_at": "1903-07-15T15:24:06.0Z"
},
{
"id": "3a08f1e8-9454-833d-404e-cc4fb46e4035",
"membership_type_id": "e711765c-08d0-caba-fc37-1006d6225d71",
"name": "Standard rate",
"tax": 1250
},
{
"id": "258a6fe2-610a-d51f-3ce4-592623afb492",
"membership_type_id": "addeb478-c53d-d539-2ba3-0025cefa268e",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"ipsum eu sint consequat laboris",
"sit veniam",
"sit",
"laborum incididunt officia"
],
"default_duration": "P1Y",
"private": true,
"created_at": "1955-04-20T21:20:57.0Z",
"updated_at": "1927-01-18T01:40:21.0Z"
},
{
"id": "1befd5c4-80e1-1fa0-1acf-7e7494d48e95",
"name": "Standard rate",
"joining_fee": 1000,
"tax": 1250,
"default_duration": "P1Y",
"created_at": "1951-01-14T12:48:05.0Z",
"updated_at": "1945-12-23T18:04:56.0Z"
},
{
"id": "2c8b3abd-0d0e-f97a-cc7a-6c594d3842ea",
"currency": "GBP",
"price": 5000,
"billing_frequency": "P1M",
"processors": [
"occaecat aliquip ad",
"aute"
],
"private": true
}
],
"revenue_schedule": "FREQ=WEEKLY",
"created_at": "1961-09-29T15:19:55.0Z",
"updated_at": "1904-08-29T22:50:45.0Z",
"deleted_at": "1899-10-07T01:22:49.0Z"
},
"rate": {
"id": "2f14fecc-9cd6-b7ae-c1d5-ec0e578c9570",
"membership_type_id": "542ea963-63ce-15b7-8eef-2f8d2659244a",
"name": "Standard rate",
"currency": "GBP",
"price": 5000,
"joining_fee": 1000,
"tax": 1250,
"billing_frequency": "P1M",
"processors": [
"id in",
"aliquip"
],
"default_duration": "P1Y"
},
"status": "needs_dd_mandate",
"source": "import",
"payment_method": {
"id": "aliquip Duis voluptate",
"type": "direct_debit"
},
"start_date": "1950-07-15T12:14:14.0Z",
"end_date": "1957-10-24T16:02:41.0Z",
"created_at": "1925-03-26T17:21:01.0Z",
"basket_id": "680b77dfa20e430134000056",
"external_ref": "irure fugiat id est",
"next_billing_date": "1935-06-02T12:32:57.0Z",
"next_charge": {
"id": "319e96ea-e8de-e3a2-e0bd-0532179c144c",
"amount": 3995,
"currency": "GBP",
"status": "succeeded",
"billing_period_from": "1922-04-30",
"billing_period_to": "1924-03-12"
},
"attention_reason": "mandate_revoked"
}
}
{
"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": "fe0d52f7-33ae-7ff3-a58b-cd94380926fd",
"membership": {
"id": "e1588c35-f450-e9a7-3e01-691e02708a05",
"membership_number": "00000014",
"type_name": "Gold Membership",
"customer_id": "fca71c01-e2d0-5008-ef9c-30364424e49c"
},
"processor": "adyen",
"processor_data": {
"processor_type": "Cash"
},
"amount": 3995,
"original_amount": 3995,
"currency": "gbp",
"tax": 1000,
"status": "succeeded",
"can_download_receipt": true,
"amount_refunded": "do officia elit",
"refunded": "quis id deserunt",
"refunds": [],
"site_id": "bec1ec9e-c883-60fd-1976-09c319878db3",
"billing_period_from": "1918-12-02",
"billing_period_to": "1952-01-16",
"created_at": "1902-07-30T20:27:42.0Z",
"updated_at": "1950-04-25T19:01:25.0Z"
}
}
{
"message": "The requested resource could not be found"
}