Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/payments/6f8c19ff-5b97-4792-aa89-d2a12797b356/update' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
        "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
        "amount": 150000,
        "description": "Penagihan yang sudah diedit",
        "expiredAt": "2026-07-19T16:43:23.000Z"
    }'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
        "link": "https://testingmayar.myr.id/pl/rqp9x2k7m3a"
    }
}
Endpoint:
https://api.mayar.id/hl/v2/payments/{uuId}/update
The payment request to update is selected by the id field in the request body, not by the {uuId} segment in the URL path. The path segment is cosmetic and is ignored by the API — always send the target payment request id in the body.

Authorization

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

Request Body

id
string<uuid>
required
A unique identifier obtained when creating a single payment request. This selects the payment request to update (the {uuId} URL segment is ignored).Example:6f8c19ff-5b97-4792-aa89-d2a12797b356
amount
integer
required
Nominal amount of payment.
email
string
Customer email used to send proof of payment or payment reminders.
mobile
string
Customer telephone number.
description
string
General description of the transaction or order.
notes
string
Additional notes for the payment request.
expiredAt
string (format ISO 8601 date-time)
The transaction expiration date and time. After this time, the payment link is no longer valid.
paymentMethod
string
Restrict the payment request to a specific payment method.
cashtag
string
Cashtag associated with the payment request.
extraData
object
Additional custom data attached to the payment request.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
object
The updated payment request data.

data Structure (Object)

id
string<uuid>
Unique request payment ID.
The URL that customers can access to open the payment request.

Errors

401 Unauthorized
object
Returned when the API key is missing or invalid: { "statusCode": 401, "messages": "Unauthorized" }.
404 Not Found
object
Returned when no payment request matches the provided id: { "statusCode": 404, "messages": "Payment not found" }.
409 Conflict
object
Returned when the payment request has already been paid and can no longer be edited: { "statusCode": 409, "messages": "Transaction already paid. Cannot edit payment request." }.