Customer API

List Memberships

Retrieve the authenticated customer's memberships and available public plans

Returns the authenticated customer's membership records, the organization's active public customer plans, and the membership permissions the customer holds. 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"
      }
    ],
    "permissions": ["Guest passes", "Priority booking"]
  }
}

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[]Permission names on the membership plan. Empty for connected-system memberships.
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[]Permission names on the plan
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

Permissions

permissions lists the membership permission names the customer holds now, sorted by name, each once. These are the permissions ticked in the Permissions section of a membership plan; see Membership permissions.

A customer holds a plan's permissions while the membership is in force: their own membership, or one held by a company they belong to. A membership that has ended, has not started yet, or is unpaid past its grace period grants none. This is the same rule Tiquo applies to membership-gated services and prices. Connected-system memberships grant no Tiquo permissions.

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);
  console.log(result.data.permissions);
}

With the DOM Package 1.14.0 or later, call tiquo.getMemberships(); from 1.18.0, getPermissions() and hasPermission(name) read permissions for you. With the Hosted Package, use window.Tiquo.getMemberships(), getPermissions() and hasPermission(name) (script 1.5.0 or later), 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

En esta página