E-invoicing
Update payment status
Set the payment status of an invoice to PENDING, PAID or REJECTED.
Update the payment status of an existing invoice to PENDING, PAID, or REJECTED.
Request
Headers
application/json or */*application/json or */*Path Parameters
Query Parameters
PENDING, PAID, REJECTEDPayment Status Values:
- PENDING - Invoice awaiting payment
- PAID - Invoice fully paid
- REJECTED - Payment declined or rejected
Response
Success (200)
The full success response is in the Response panel.
"00" = successErrors
404 - Invoice Not Found
{
"responseCode": "404",
"responseMessage": "Invoice not found with IRN: INV999-INVALID"
}→ Verify invoiceIrn exists and belongs to businessId
400 - Invalid Status
{
"responseCode": "400",
"responseMessage": "Invalid status value"
}→ Use only PENDING, PAID, or REJECTED
403 - Unauthorized
{
"responseCode": "403",
"responseMessage": "Unauthorized: Business ID doesn't match invoice owner"
}→ Ensure correct businessId matches invoice owner
422 - Invalid Transition
{
"responseCode": "422",
"responseMessage": "Status change not permitted"
}→ Check current invoice status and business rules
Example Requests
Mark as Paid:
curl -X POST "{baseUrl}/{stage}/external/businesses/b4009129-ece8-45fc-9584-976fcbe35f8d/invoices/update-payment/INV237-1070ECE8-20250826?invoiceStatus=PAID" \
--header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
"Mark as Pending:
curl -X POST "{baseUrl}/{stage}/external/businesses/b4009129-ece8-45fc-9584-976fcbe35f8d/invoices/update-payment/INV237-1070ECE8-20250826?invoiceStatus=PENDING" \
--header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
"Mark as Rejected:
curl -X POST "{baseUrl}/{stage}/external/businesses/b4009129-ece8-45fc-9584-976fcbe35f8d/invoices/update-payment/INV237-1070ECE8-20250826?invoiceStatus=REJECTED" \
--header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
"Status Transitions
Typical Flow:
PENDING → PAID (payment received)
PENDING → REJECTED (payment declined)
REJECTED → PENDING (retry payment)Note: Changing PAID back to PENDING may require special permissions
Common Issues
"Invoice not found" → Verify IRN format and business ownership
"Status change not permitted" → Cannot change PAID invoices back to PENDING without authorization
Status not updating → Check invoice is not cancelled or in final state
Best Practices
- Log updates - Maintain audit trail of status changes
- Verify first - Check invoice exists before updating
- Handle errors - Implement proper error handling for failed updates
- Reconcile regularly - Match payment status with actual payment records
Security Notes
- Validate business ownership before status updates
- Maintain audit logs of who updated status and when
- Implement rate limiting to prevent abuse