Skip to main content
curl --request GET 'https://api.mayar.id/credit/v1/credit/customer/balance?productId=810328a4-6eeb-4680-8f05-8d578da46c40&membershipTierId=261acae0-d6ae-4d8c-adf5-6fb8c2361514&memberId=PQVS4KGY' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data ''
{
    "statusCode": 200,
    "message": "success",
    "data": {
      "customerBalance": 50990,
      "customerBalanceMembership": 0,
      "customerBalanceAddon": 50990,
      "customerEmail": "[email protected]",
      "customerName": "john doe",
      "customerMobile": "08777777777",
      "customerId": "8ffb340d-07a8-44fd-9fac-12a3a10d28fe",
      "status": "active",
      "nextPayment": "2025-11-20T09:10:57.994Z",
      "expiredAt": "2025-11-20T09:10:57.994Z",
      "memberId": "PUYSW40N",
      "membershipTierId": "137f0fa9-8aa5-4fec-947e-6ef223590861",
      "membershipTier": {
          "id": "137f0fa9-8aa5-4fec-947e-6ef223590861",
          "name": "paket 3"
      }
    }
}
Endpoint:
https://api.mayar.id/credit/v1/credit/customer/balance?productId={productId}&membershipTierId={membershipTierId}&memberId={memberId}

Authorization

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

Query Parameters

productId
string
required
The unique identifier of the product associated with the credit balance.
membershipTierId
string
required
The unique identifier of the membership tier associated with the credit balance.
memberId
string
The unique identifier of the member whose credit balance is being queried.
customerId
string
The unique identifier of the customer whose credit balance is being queried balance.
At least one of customerId or memberId must be provided.

Response

Successful Response
statusCode
integer
required
Indicates the status of the activation process.
message
string
required
Additional messages related to the activation process.
customerBalance
float
required
Number of total credit balance.
customerBalanceMembership
float
required
Number of total credit balance with MEMBERSHIP type.
customerBalanceAddon
float
required
Number of total credit balance with ADD_ON type.
customerEmail
string
required
Email address of the customer.
customerName
string
required
Full name of the customer.
customerMobile
string
required
Mobile phone number of the customer.
customerId
string
required
Unique identifier of the customer (UUID).
status
string
required
Current status of the customer (e.g. active).
nextPayment
string
required
ISO 8601 timestamp (UTC) of the customer’s next payment.
expiredAt
string
required
ISO 8601 timestamp (UTC) of the customer’s membership expiration.
memberId
string
required
Membership code associated with the customer.
membershipTierId
string
required
ID of the customer’s membership tier.
membershipTier
object
required
Details of the customer’s membership tier.
membershipTier.id
string
required
ID of the membership tier.
membershipTier.name
string
required
Name of the membership tier.