curl --request POST 'https://api.mayar.id/hl/v1/invoice/create' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
        "name": "Azumii",
        "email": "azumiikecee@gmail.com",
        "amount": 170000,
        "mobile": "08996136751",
        "redirectUrl": "https://web.mayar.id/",
        "description": "Testing ReqPayment",
        "expiredAt": "2025-12-29T09:41:09.401Z"
    }
'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "e890d24a-cfc0-4915-83d2-3166b9ffba9e",
        "transaction_id": "040d5adb-1496-45de-8435-5cab16526a8c",
        "transactionId": "040d5adb-1496-45de-8435-5cab16526a8c",
        "link": "https://andiak.myr.id/invoices/ohsjrd3wko"
    }
}
curl --request POST 'https://api.mayar.id/hl/v1/invoice/create' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
        "name": "Azumii",
        "email": "azumiikecee@gmail.com",
        "amount": 170000,
        "mobile": "08996136751",
        "redirectUrl": "https://web.mayar.id/",
        "description": "Testing ReqPayment",
        "expiredAt": "2025-12-29T09:41:09.401Z"
    }
'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "e890d24a-cfc0-4915-83d2-3166b9ffba9e",
        "transaction_id": "040d5adb-1496-45de-8435-5cab16526a8c",
        "transactionId": "040d5adb-1496-45de-8435-5cab16526a8c",
        "link": "https://andiak.myr.id/invoices/ohsjrd3wko"
    }
}
Endpoint:
https://api.mayar.id/hl/v1/payment/create

Authorization

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

Request Body

name
string
required
Customer Name
email
string
required
Customer email used to send proof of payment, or payment reminders
amount
integer
required
Nominal amount of payment
mobile
string
required
Customer telephone number
redirectURL
string
required
The destination URL where the customer will be redirected after a successful or completed transaction.
description
string
required
General description of the transaction or order.
expiredAt
string (format ISO 8601 date-time)
required
The transaction expiration date and time. This means that after this time, the payment link or order is no longer valid.

Response

Successful Response

Main Structure (Root)

statusCode
integer
required
Status code form API.
messages
string
required
Status message that describes the status code.
data
array of object
The main data returned (request payment details).

data Structure (Array Of Object)

id
string<uuid>
required
Unique request payment ID.
transactionId
string<uuid>
required
Unique transaction ID associated with this request payment.
The URL that users/clients can access to open request payment.