Skip to main content

Edit Invoice

Updates an existing invoice. Only invoices with PENDING status can be edited.

When to Use

Use this endpoint when:

  • Correcting invoice details (amount, description, expiry) before payment
note

At the moment, editing an invoice requires passing in all fields. Partial updates will be supported in the future.

caution

Every field marked required must be included in each edit request, even when you are changing only one field. Missing fields return a 422 Unprocessable Entity with a VALIDATION_ERROR.

How to Use

Endpoint
PATCH/api/v3/invoice/{id}
  1. Provide the invoice id in the URL path
  2. Send the full set of invoice fields (changed and unchanged)
  3. Read the updated item in the response

Path Parameters

idSTRINGrequired

Invoice ID

Example: 1779260530271049335

Request Parameters

referenceIdSTRINGrequired

Merchant-defined reference ID

Example: my-order-001

storeIdSTRINGrequired

Store ID

Example: 1608714483132458121

payerEmailSTRINGrequired

Email address of the payer

Example: [email protected]

payerNameSTRING

Name of the payer

Example: John Doe

emailSubjectSTRINGrequired

Subject line for the invoice email

Example: Your Invoice #001

shouldSendEmailBOOLEAN

Send email notification to the payer

Example: false

expiryDateTimeSTRINGrequired

Invoice expiry date time (ISO 8601)

Example: 2026-05-21T08:02:00.000Z

amountNUMBERrequired

Invoice amount in cents (e.g. 100 = RM 1.00)

Example: 120

currencySTRINGrequired

Currency code

Example: MYR

descriptionSTRINGrequired

Invoice description

Example: Order #001

redirectUrlSTRING

URL to redirect the payer after payment

Example: https://example.com/success

remarksSTRING

Additional remarks

Response Parameters

itemOBJECT

Updated invoice object. See [Get Invoices](./get-invoices) for the full field list.

codeSTRING

Result code ("SUCCESS" on success).