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/customer/add-credit' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data '{
    "customerId": "9de4b4b4-525c-4ee0-ac9c-b29c3e10fe55",
    "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
    "amount": 100
}'
{
    "statusCode": 200,
    "message": "success",
    "data": {
      "customerId": "faa4ee60-cf45-4043-b964-303890713bb9",
      "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6",
      "amount": 100,
      "customerBalance": 911090
    }
}
Endpoint:
https://api.mayar.id/credit/v1/credit/customer/add-credit

Authorization

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

Request Body

customerId
string
required
The unique identifier of the member whose credit will be spent.
productId
string
required
The unique identifier of the product associated with the credit.
amount
integer
required
The amount of credit to deduct (positive integer).

Response

Successful Response
statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
customerId
string
The unique identifier of the customer to whom the credit be added.
productId
string
The unique identifier of the product associated with the credit added.
amount
string
The amount of credit to add (positive integer).
customerBalance
string
The amount of credit balance after adding credit.