Skip to main content
curl --request GET 'https://api.mayar.id/hl/v2/memberships/tiers?productId=7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f&limit=10' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
{
    "statusCode": 200,
    "messages": "success",
    "data": [
        {
            "id": "9b2d4f6a-8c1e-4a3b-bd5c-6e7f8a9b0c1d",
            "createdAt": "2026-01-15T15:07:33.868Z",
            "description": "<p>Access to all premium content and monthly live sessions.</p>\n",
            "finishMembershipAt": null,
            "gracePeriodInDays": 0,
            "isSoldOut": false,
            "isTrialAvailable": true,
            "limit": null,
            "name": "Paket 1",
            "notes": "Access to all premium content and monthly live sessions.",
            "paymentAtStart": true,
            "paymentLinkId": "7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
            "position": null,
            "redirectUrl": "",
            "status": "ACTIVE",
            "trialCredit": null,
            "trialPeriodInDays": 0,
            "updatedAt": "2026-01-15T15:07:33.868Z",
            "upfrontFee": null,
            "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413"
        }
    ],
    "hasMore": false,
    "nextStartingAfter": "1768489653868"
}
Endpoint:
https://api.mayar.id/hl/v2/memberships/tiers?productId=(productId)

Authorization

Authorization
string
required
Example:Authorization | Bearer Paste-Your-API-Key-Here

Query Parameters

productId
string
required
The unique identifier of the membership product whose tiers you want to list. If missing or malformed the endpoint responds 400 "Invalid query parameters".
limit
integer
default:"10"
Number of items to return per page. Defaults to 10, with a maximum of 50.
startingAfter
string
Cursor for forward pagination. Pass the nextStartingAfter value from the previous response (a Unix timestamp in milliseconds, as a string) to fetch the next page.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
array of object
List of membership tiers for the product.
hasMore
boolean
Information on whether there is additional data to be retrieved (true/false).
nextStartingAfter
string | null
Cursor to pass as startingAfter to fetch the next page. null when there is no further data.

data Structure (Array Of Object)

id
string<uuid>
Unique identifier of the membership tier.
createdAt
string
ISO 8601 timestamp (UTC) of when the tier was created.
description
string
HTML description of the tier.
finishMembershipAt
string | null
Date the membership finishes, or null when the tier has no fixed end.
gracePeriodInDays
integer
Number of grace-period days after the next payment date.
isSoldOut
boolean
Whether the tier has reached its member limit.
isTrialAvailable
boolean
Whether a trial is available for the tier.
limit
integer | null
Maximum number of members allowed on the tier, or null when unlimited.
name
string
Name of the membership tier.
notes
string | null
Free-text notes for the tier.
paymentAtStart
boolean
Whether payment is collected at the start of the period.
The product (payment link) ID the tier belongs to.
position
integer | null
Display position of the tier.
redirectUrl
string
Redirect URL configured for the tier.
status
string
Current status of the tier (for example ACTIVE).
trialCredit
number | null
Trial credit granted, or null when not applicable.
trialPeriodInDays
integer
Number of trial days for the tier.
updatedAt
string
ISO 8601 timestamp (UTC) of the last update.
upfrontFee
number | null
Upfront fee for joining the tier, or null when none.
userId
string<uuid>
The user ID of the owner of the product.

Errors

400 Invalid query parameters
object
Returned with messages: "Invalid query parameters" when productId is missing or the query parameters fail validation.