Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/installments/create' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "email": "budi.santoso@example.com",
    "mobile": "081234567890",
    "name": "Budi Santoso",
    "amount": 1500000,
    "installment": {
        "description": "Cicil Produk Kelas Online 3 Bulan",
        "interest": 0,
        "tenure": 3,
        "dueDate": 11
    }
}
'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "ba82c2dd-06c1-4b6c-bc59-a9c00801c842",
        "amount": 1500000,
        "interest": 0,
        "interestType": "FLAT",
        "period": "MONTHLY",
        "tenure": 3,
        "dueDate": 11,
        "totalInterest": 0,
        "totalAmount": 1500000,
        "description": "Cicil Produk Kelas Online 3 Bulan",
        "customer": {
            "email": "budi.santoso@example.com",
            "name": "Budi Santoso",
            "mobile": "081234567890"
        },
        "status": "unpaid",
        "invoices": [
            {
                "id": "9fe1b9c4-b5d5-4d45-bf1a-5c4849631725",
                "index": 1,
                "amount": 500000,
                "interestAmount": 0,
                "remainingAmount": 1000000,
                "dueDate": "2026-07-11T00:00:00.000Z",
                "status": "unpaid",
                "link": "mkcn4u72ki"
            },
            {
                "id": "977777d6-af25-464e-a8ca-e290b3007275",
                "index": 2,
                "amount": 500000,
                "interestAmount": 0,
                "remainingAmount": 500000,
                "dueDate": "2026-08-11T00:00:00.000Z",
                "status": "unpaid",
                "link": "0ll429zxvsue"
            },
            {
                "id": "1dde3426-f6a4-43d2-a1d9-2cd2fa05eb9a",
                "index": 3,
                "amount": 500000,
                "interestAmount": 0,
                "remainingAmount": 0,
                "dueDate": "2026-09-11T00:00:00.000Z",
                "status": "unpaid",
                "link": "h8fiobqkek"
            }
        ],
        "createdAt": "2026-06-19T17:20:09.521Z"
    }
}
Endpoint:
https://api.mayar.id/hl/v2/installments/create

Authorization

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

Request Body

email
string
required
Customer email used to send proof of payment, or payment reminders.
mobile
string
required
Customer telephone number.
name
string
required
Customer name.
amount
integer
required
Nominal amount of payment.
installment
object
required
Installment details.
description
string
required
General description of the transaction or order.
interest
number | integer
required
Installment interest (%).
tenure
number | integer
required
Installment tenor period in months (minimum 3, maximum 24).
dueDate
number | integer
required
Due date each month (minimum 1, maximum 28).

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
object
The created installment data.

data Structure (Object)

id
string<uuid>
Main installment ID.
amount
integer
Total installment amount.
interest
integer
Interest value.
interestType
string
Type of interest (example: "FLAT").
period
string
Installment period (example: "MONTHLY").
tenure
integer
Installment duration (in months).
dueDate
integer
Due date each month (example: 11).
totalInterest
integer
Total interest across all installments.
totalAmount
integer
Total amount payable across all installments.
description
string
Installment description.
customer
object
Customer details.
status
string
Installment status (example: "unpaid").
invoices
array of object
List of installment invoices.
createdAt
string (ISO 8601)
Creation time in ISO 8601 format.

customer Structure (Object)

email
string
Customer email address.
name
string
Customer name.
mobile
string
Customer phone number.

invoices Structure (Array Of Object)

id
string<uuid>
Invoice ID.
index
integer
Invoice order number.
amount
integer
Invoice amount.
interestAmount
integer
Interest amount for the invoice.
remainingAmount
integer
Remaining balance after this invoice.
dueDate
string (ISO 8601)
Invoice due date in ISO 8601 format.
status
string
Payment status (example: "unpaid").
Unique invoice link.

Errors

400 Validation Error
object
Returned with messages: "Validation Error" when the request body fails validation (e.g. missing or malformed email, mobile, name, amount, or installment fields).
409 already exist
object
Returned with messages: "already exist" when the installment payment link could not be created because it already exists.
500 Failed to create installment invoices
object
Returned with messages: "Failed to create installment invoices" when the installment invoices could not be generated.