Skip to main content
curl --request GET 'https://api.mayar.id/hl/v2/memberships/members/MBR8X2QK?productId=7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
        "createdAt": "2026-01-15T15:29:59.659Z",
        "customerId": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
        "expiredAt": "2026-02-15T15:29:59.430Z",
        "isAlreadyUsedTrial": true,
        "isInTrial": false,
        "isLifetimePeriod": null,
        "isTodayReminderSent": true,
        "memberId": "MBR8X2QK",
        "membershipTierId": "9b2d4f6a-8c1e-4a3b-bd5c-6e7f8a9b0c1d",
        "monthlyPaymentPeriod": null,
        "nextPayment": "2026-02-15T15:29:59.430Z",
        "nextPaymentEmailSent": true,
        "paymentLinkId": "7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
        "status": "inactive",
        "updatedAt": "2026-02-15T17:30:03.531Z",
        "paymentLink": {
            "id": "7c9d2e1f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
            "name": "Premium Membership",
            "status": "active",
            "membershipInfo": {
                "id": "d3e4f5a6-b7c8-4d9e-0a1b-2c3d4e5f6a7b",
                "type": "SAAS"
            }
        },
        "customer": {
            "id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
            "email": "budi.santoso@example.com",
            "name": "Budi Santoso",
            "mobile": "081234567890"
        },
        "membershipTier": {
            "id": "9b2d4f6a-8c1e-4a3b-bd5c-6e7f8a9b0c1d",
            "name": "Paket 1",
            "status": "ACTIVE"
        }
    }
}
Endpoint:
https://api.mayar.id/hl/v2/memberships/members/(memberId)?productId=(productId)

Authorization

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

Path Parameters

memberId
string
required
The public membership code of the member to retrieve.Example:MBR8X2QK

Query Parameters

productId
string
required
The unique identifier of the membership product the member belongs to. If missing or malformed the endpoint responds 400 "Invalid query parameters".

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
object
The membership member record, including nested paymentLink, customer, and membershipTier objects.

data Structure (Object)

id
string<uuid>
Unique identifier of the membership-customer record.
createdAt
string
ISO 8601 timestamp (UTC) of when the member was created.
customerId
string<uuid>
Unique identifier of the customer.
expiredAt
string | null
ISO 8601 timestamp (UTC) of when the membership expires.
isAlreadyUsedTrial
boolean
Whether the member has already used the trial.
isInTrial
boolean
Whether the member is currently in a trial period.
isLifetimePeriod
boolean | null
Whether the member is on a lifetime period.
isTodayReminderSent
boolean
Whether today’s payment reminder has been sent.
memberId
string
Public membership code of the member.
membershipTierId
string<uuid>
Unique identifier of the member’s tier.
monthlyPaymentPeriod
integer | null
The member’s monthly payment period, or null when not set.
nextPayment
string
ISO 8601 timestamp (UTC) of the member’s next scheduled payment.
nextPaymentEmailSent
boolean
Whether the next-payment email has been sent.
Unique identifier of the product (payment link) the member belongs to.
status
string
Current status of the member (for example active, inactive).
updatedAt
string
ISO 8601 timestamp (UTC) of the last update.
The related product (payment link) summary: id, name, status, and a nested membershipInfo object (id, type).
customer
object
The related customer summary: id, email, name, mobile.
membershipTier
object
The related tier summary: id, name, status.

Errors

400 Invalid path parameter
object
Returned with messages: "Invalid path parameter" when memberId is missing or malformed.
400 Invalid query parameters
object
Returned with messages: "Invalid query parameters" when productId is missing or the query parameters fail validation.
404 Member not found
object
Returned with messages: "Member dengan ID {memberId} tidak ditemukan." when no member matches the given memberId.