Customer API

List Memberships

Retrieve the authenticated customer's memberships and available public plans

Returns the authenticated customer's membership records and the organization's active public customer plans. The response contains display-safe information only; payment-provider identifiers and internal billing metadata are not exposed.

For failed-payment recovery, shareable payment-method links, and billing-address changes, see Membership Payments.

When the organization has HubSpot connected, the list also includes the customer's HubSpot subscriptions as read-only memberships (isExternal: true). They have no Tiquo plan, and their price, currency and billing period appear only when HubSpot provides them. Their payments, cards, billing addresses and cancellation are managed in HubSpot: the Membership Payments endpoints answer 409 with code external_membership for these IDs.

Endpoint

GET /memberships

Authentication

Requires a valid JWT access token.

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...

Example request

curl "https://edge.tiquo.app/api/client/v1/memberships" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."

Response

{
  "success": true,
  "data": {
    "memberships": [
      {
        "id": "membership_123",
        "planId": "plan_gold",
        "name": "Gold Member",
        "description": "Priority booking and guest passes",
        "type": "paid",
        "price": 2500,
        "currency": "GBP",
        "billingPeriod": "monthly",
        "status": "active",
        "paymentStatus": "paid",
        "startDate": 1749988800000,
        "renewalDate": 1784116800000,
        "features": ["Priority booking", "Guest passes"],
        "color": "#d4af37",
        "icon": "G",
        "isCurrent": true,
        "source": "tiquo",
        "isExternal": false
      },
      {
        "id": "ext_hubspot_456789",
        "name": "Club Membership",
        "type": "paid",
        "price": 7500,
        "currency": "GBP",
        "billingPeriod": "semi_annually",
        "status": "active",
        "paymentStatus": "past_due",
        "startDate": 1710072000000,
        "renewalDate": 1793534400000,
        "features": [],
        "isCurrent": true,
        "source": "hubspot",
        "isExternal": true
      }
    ],
    "availablePlans": [
      {
        "id": "plan_gold",
        "name": "Gold",
        "description": "Priority booking and guest passes",
        "slug": "gold",
        "type": "paid",
        "price": 2500,
        "currency": "GBP",
        "billingPeriod": "monthly",
        "features": ["Priority booking", "Guest passes"],
        "color": "#d4af37",
        "icon": "G",
        "isPopular": true,
        "isCurrent": true,
        "signupUrl": "https://book.tiquo.app/embed/membership/plan_gold"
      }
    ]
  }
}

Prices are integer minor units. For example, 2500 with currency GBP represents £25.00.

Membership object

FieldTypeDescription
idstringCustomer membership ID. Connected-system membership IDs start with ext_.
planIdstringMembership plan ID. Not set for connected-system memberships.
namestringMembership plan name
descriptionstring or nullPublic plan description
typestringfree or paid
priceintegerMembership price in minor currency units. May be absent for connected-system memberships.
currencystringISO currency code. May be absent for connected-system memberships.
billingPeriodstringBilling interval such as monthly, yearly, or one_time. Connected systems may also use semi_annually, biennially or triennially, or omit it.
statusstringactive, inactive, paused, expired, cancelled, or suspended. Connected-system memberships also use scheduled for one that starts on startDate.
paymentStatusstringpaid, pending, failed, trialing, or cancelled. Connected-system memberships use past_due for an unpaid invoice and otherwise omit it.
startDateintegerStart timestamp in milliseconds
endDateinteger or nullEnd timestamp in milliseconds
renewalDateinteger or nullNext renewal timestamp in milliseconds
trialEndDateinteger or nullTrial end timestamp in milliseconds
featuresstring[]Public membership features
colorstring or nullDisplay color configured on the plan
iconstring or nullDisplay icon configured on the plan
isCurrentbooleanWhether the membership is in force (status is active). A HubSpot subscription with an unpaid invoice stays current until HubSpot marks it cancelled.
sourcestringtiquo, or the connected system that holds the membership, such as hubspot
isExternalbooleantrue for a read-only membership held in a connected system

Available plan object

availablePlans contains active, public plans that apply to customers. Company-only and private plans are excluded.

FieldTypeDescription
idstringMembership plan ID
namestringPlan name
descriptionstring or nullPublic plan description
slugstringURL-friendly plan slug
typestringfree or paid
priceintegerDefault price in minor currency units
currencystringISO currency code
billingPeriodstringDefault billing interval
featuresstring[]Public plan features
colorstring or nullDisplay color
iconstring or nullDisplay icon
isPopularbooleanWhether the plan is marked as popular
isCurrentbooleanWhether the customer currently holds this plan
signupUrlstringMembership signup embed URL

JavaScript

const response = await fetch(
  'https://edge.tiquo.app/api/client/v1/memberships',
  {
    headers: {
      Authorization: `Bearer ${accessToken}`,
    },
  }
);

const result = await response.json();

if (result.success) {
  console.log(result.data.memberships);
  console.log(result.data.availablePlans);
}

With the DOM Package 1.14.0 or later, call tiquo.getMemberships(). With the Hosted Package, use window.Tiquo.getMemberships() or the data-tiquo-memberships and data-tiquo-membership-plans collection attributes. See Memberships from HubSpot for the Hosted Package attributes that mark and filter them. IDP access tokens work with this endpoint too; see OAuth / OIDC.

Errors

StatusDescription
401Missing, invalid, or expired access token
500Internal server error

Sur cette page