Skip to main content

Invoice update

Endpoint
EndpointMethod
Authentication
/invoice/cancelPOSTyes
Authentication
Type
Token source
Server
Bearer{{USAPI}}/authUSAPI
Body request
{
  "platform": "ONMARKET",
  "invoice_id": "OM0003d0CS00009",
  "invoice_onmarket": "INV/ONM/20240124-002B0001",
  "buyer_username": "usernew1"
}
Properties
Properties ofData typeRequiredDescription
platform
stringyes

ONINDONESIA services.
Possible values:

  • ONDELIVERY means the source of the transaction comes from ondelivery.
  • ONTICKET means the source of the transaction comes from onticket.
  • ONMARKET means the source of the transaction comes from onmarket.
invoice_id
stringyesinvoice ID generated by USAPI
invoice_onmarket
stringno1

Invoice ID generated by ONMARKET

 

1if status of the invoice is PAID, it will be refunded to buyer's balance from each store. So invoice_onmarket is required.

buyer_username

stringno1

Username from buyer

 

1if status of the invoice is PAID, it will be refunded to buyer's balance. So buyer's username is required.

Result example

200 OK (Invoice status is PAID)

{
  "message": "REFUND IN PROCESS"
}

200 OK (Invoice status is PENDING)

{
  "message": "INVOICE CANCELED"
}
Error example

400 Bad request

{
    "message": "REFUND ALREADY IN PROCESS"
}
{
    "message": "TRANSACTION IS ALREADY CANCELED"
}
{
    "message": "EXPIRED INVOICE"
}

500 Internal server error

{
    "message": "INTERNAL SERVER ERROR"
}