Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mayar.id/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST 'https://api.mayar.id/credit/v1/credit/credit-usage/customer/regist' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "productId": "43eadce2-bc52-4e38-a832-93fb835f2a69",
    "trialCredit": 300, //optional
    "customerInfo": {
        "name" : "john doe",
        "email" : "johndoe@gmail.com",
        "mobile" : "08777777777"
    }
}'
{
    "statusCode": 200,
    "message": "success",
    "data": {
      "customerId": "bcf56452-ec21-4791-aca2-7a41b033e9d2",
      "paymentLinkId": "43eadce2-bc52-4e38-a832-93fb835f2a69"
    }
}
Endpoint:
https://api.mayar.id/credit/v1/credit/credit-usage/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.
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
Indicates the HTTP status of the request (e.g. 200 for success).
message
string
A descriptive message about the outcome of the request.
customerId
string
Unique identifier of the related customer record.
Unique identifier of the credit usage product aka productId.