curl --request POST 'https://api.mayar.id/credit/v1/credit/membership/customer/regist' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
    "membershipTierId": "9bbbfa01-1bf8-4e4d-8470-cdf7066b6ea2",
    "membershipMonthlyPeriod": 1, // mandatory must 1, 3, 6, 12
    "trialCredit": 100, //optional
    "customerInfo": {
        "name" : "memberTambahan",
        "email" : "tambahan@gg.com",
        "mobile" : "08777777799"
    }
}'
{
    "statusCode": 200,
    "message": "success",
    "membershipCustomer": {
        "id": "68ca1a1c-7ed8-47f3-a5c2-c5ff314dd750",
        "userId": "35776524-8ea9-46ac-b2dd-89efc496593f",
        "paymentLinkId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
        "createdAt": 1756088397669,
        "nextPayment": 1758766797571,
        "isLifetimePeriod": null,
        "paymentLink": {
            "id": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
            "name": "produk baru 2",
            "description": "<p class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27;>xcxcxccx</p>\n"
        }
    }
}
curl --request POST 'https://api.mayar.id/credit/v1/credit/membership/customer/regist' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
    "membershipTierId": "9bbbfa01-1bf8-4e4d-8470-cdf7066b6ea2",
    "membershipMonthlyPeriod": 1, // mandatory must 1, 3, 6, 12
    "trialCredit": 100, //optional
    "customerInfo": {
        "name" : "memberTambahan",
        "email" : "tambahan@gg.com",
        "mobile" : "08777777799"
    }
}'
{
    "statusCode": 200,
    "message": "success",
    "membershipCustomer": {
        "id": "68ca1a1c-7ed8-47f3-a5c2-c5ff314dd750",
        "userId": "35776524-8ea9-46ac-b2dd-89efc496593f",
        "paymentLinkId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
        "createdAt": 1756088397669,
        "nextPayment": 1758766797571,
        "isLifetimePeriod": null,
        "paymentLink": {
            "id": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
            "name": "produk baru 2",
            "description": "<p class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27;>xcxcxccx</p>\n"
        }
    }
}
Endpoint:
https://api.mayar.id/credit/v1/credit/membership/customer/regist

Authorization

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

Request Body

productId
string
required
The unique identifier of the product associated with the credit.
membershipTierId
string
required
The unique identifier of the membership tier to assign to the customer.
membershipMonthlyPeriod
integer
required
The membership period in months. Must be one of 1, 3, 6, or 12.
trialCredit
integer
The trial credit amount to grant upon registration.
customerInfo
array of object
required
Object containing customer details.

customerInfo Structure (Array Of Object)

name
string
required
Full name of the customer.
email
string
required
Email address of the customer.
mobile
string
required
Mobile phone number of the customer.

Response

Successful Response

Main Structure (Root)

statusCode
integer
required
Status code form API.
messages
string
required
Status message that describes the status code.
membershipCustomer
array of object
Contains details of the newly registered or updated membership customer.

membershipCustomer Structure (Array Of Object)

id
string<uuid>
required
Unique identifier of the membership customer record.
userId
string
required
Unique identifier of the user associated with this membership.
Unique identifier of the payment link associated with this membership.
createdAt
integer
required
Timestamp (in milliseconds) indicating when the membership was created.
nextPayment
integer
required
Timestamp (in milliseconds) of the next scheduled payment.
isLifetimePeriod
boolean | null
ndicates whether the membership has a lifetime period; null if not set.
Details of the payment link.
id
string
required
Unique identifier of the payment link.
name
string
required
Name of the payment link or product.
description
string
required
Description of the payment link or product in HTML format.