E-Commerce & tokenized transactionsInvoice Management

Update Invoice

API Explorer
https://api.ipospays.tech/invoice-service/v1/invoices/{invoiceNumber}
PUT

Use this API to update an open (DRAFT or PENDING) invoice. Send at least one of customer_id, amount or invoice_url; store_id/tpn only select the store.

  • A new invoice_url must be PDF, PNG or JPG/JPEG (detected from the file content, not the extension). DOC, DOCX, XLSX, XML and other types are rejected.

  • Not allowed once the invoice is SUCCESS, or while it has an active payment link.

  • Once a payment (transaction) is linked to an invoice, amount and customer_id can no longer change

Path Parameters

invoiceNumber*string

Invoice number returned by Create Invoice

Length5 <= length <= 100

Header Parameters

token*string

Authentication token generated using the API Key and Secret Key of the merchant account. Required for all API requests.

Request Body

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com" \  -H "token: your-access-token-here" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "",    "amount": 3000,    "invoice_url": ""  }'

{
  "data": {
    "invoice_number": "26108183628R5ajhCRJqc",
    "customer_id": "OGS1AN68JFR6H54",
    "amount": 3000,
    "status": "DRAFT",
    "store_id": "05cbaac8502f",
    "tpn": "247525547632",
    "invoice_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    "payment_link_status": "NONE"
  },
  "message": "Invoice updated successfully",
  "response_code": "SUCCESS",
  "status_code": 200,
  "request_id": "TEST-20261008183720-5FU7ZV",
  "timestamp": "2026-10-08T13:07:20.827Z"
}

{
  "data": null,
  "message": "The request contains invalid input parameters.",
  "response_code": "BAD_REQUEST",
  "status_code": 400,
  "request_id": "TEST-20261009131224-QDJIZL",
  "timestamp": "2026-10-09T07:42:24.390Z",
  "errors": [
    {
      "field": "body",
      "messages": [
        "At least one of customer_id, amount, invoice_url is required"
      ]
    }
  ]
}

{
  "data": null,
  "message": "Missing authentication token. Please include a valid API token in your request.",
  "response_code": "TOKEN_MISSING",
  "status_code": 401,
  "request_id": "TEST-20261022075139-MDH33Q",
  "timestamp": "2026-10-22T07:51:39.718Z"
}

{
  "data": null,
  "message": "Customer not found",
  "response_code": "NOT_FOUND",
  "status_code": 404,
  "request_id": "TEST-20261022132145-TKW98S",
  "timestamp": "2026-10-22T07:51:45.890Z"
}

{
  "data": null,
  "message": "Invoice has an active payment link. Cancel the link in the portal before updating the invoice",
  "response_code": "PRECONDITION_FAILED",
  "status_code": 409,
  "request_id": "TEST-20261008183741-SWT0F4",
  "timestamp": "2026-10-08T13:07:41.196Z"
}

{
  "data": null,
  "message": "Store ID and TPN must be from the same store.",
  "response_code": "PRECONDITION_FAILED",
  "status_code": 412,
  "request_id": "TEST-20261008190441-EP9V5D",
  "timestamp": "2026-10-08T13:34:41.200Z"
}
{
  "data": null,
  "message": "The request contains invalid input parameters.",
  "response_code": "BAD_REQUEST",
  "status_code": 413,
  "request_id": "TEST-20261022132130-BO8EAK",
  "timestamp": "2026-10-22T07:51:30.064Z",
  "errors": [
    {
      "field": "file",
      "messages": [
        "file is too large (maximum 5 MB)"
      ]
    }
  ]
}
{
  "data": null,
  "message": "Unsupported content type",
  "response_code": "BAD_REQUEST",
  "status_code": 415,
  "request_id": "<generated per request>",
  "timestamp": "<ISO 8601 time>",
  "errors": [
    {
      "field": "body",
      "messages": [
        "Content-Type must be application/json"
      ]
    }
  ]
}

{
  "data": null,
  "message": "Too many uploads are being processed, please retry shortly",
  "response_code": "RATE_LIMITED",
  "status_code": 429,
  "request_id": "<generated per request>",
  "timestamp": "<ISO 8601 time>"
}

{
  "data": null,
  "message": "An error occurred while processing your request. Please try again later.",
  "response_code": "INTERNAL_ERROR",
  "status_code": 500,
  "request_id": "<generated per request>",
  "timestamp": "<ISO 8601 time>"
}

{
  "data": null,
  "message": "File upload is not available right now",
  "response_code": "SERVICE_UNAVAILABLE",
  "status_code": 503,
  "request_id": "<generated per request>",
  "timestamp": "<ISO 8601 time>"
}