Update Invoice

Update an invoice

PUT /payments/invoices/{invoiceNumber}

Resource URL:

https://api.sandbox.irembopay.com/payments/invoices/{invoice_reference}

Headers

Name
Value

Content-Type

application/json

irembopay-secretKey

secretKey

X-API-Version

2

Request path parameters

Name
Type
Mandatory?
Comment

invoiceNumber

string

Yes

Invoice number of the invoice to update.

Request body

Data representation: JSON

Name
Type
Mandatory?
Comments

expiryAt

String

No

New expiration date of the invoice, in Internet date and time format eg.2022-11-27T16:24:51.000+02:00

paymentItems

Array

No

paymentItems object. Check the “Create invoice” API for more details.

Response body payload

For this endpoint, the "data" payload in the response will have the fields below:

Name
Type
Mandatory?
Comments

invoiceNumber

String

Yes

Identifier of the invoice that the end-user will use to do the payment.

transactionId

String

Yes

Transaction Identifier provided during the creation of the invoice.

paymentAccountIdentifier

String

Yes

Identifier of the Payment Account where the money will be deposited.

paymentItems

Array

Yes

Products for which this invoice has been created.

paymentStatus

String

Yes

Payment status of the invoice: NEW: invoice created and not paid yet. PAID: paid invoice.

amount

double

Yes

Amount of the invoice. Calculation method : Sum of (Product unit amount x quantity)

currency

String

Yes

Currency of the invoice which is the same as the currency of the payment account identifier. Possible values: RWF, EUR, GBP, USD.

type

String

Yes

SINGLE or BATCH

createdAt

String

Yes

In Internet date and time format. eg.2022-11-27T16:24:51.000+02:00

updatedAt

String

No

In Internet date and time format. eg.2022-11-27T16:24:51.000+02:00

expiryAt

String

No

In Internet date and time format. eg.2022-11-27T16:24:51.000+02:00

customer

Object

No

An optional customer object who will be notified about this invoice.

description

String

No

Optional description provided at invoice creation.

childInvoices

Array

No

If this invoice is a batch invoice, this is an array of invoice numbers which are included in the batch.

batchNumber

String

No

Batch invoice number (only for invoice with type: BATCH)

paymentLinkUrl

String

Yes

A URL that directs the merchants' end-user to a checkout page where they can make a payment


Error codes


Update Invoice

put
Path parameters
invoiceNumberstringRequired

Invoice number of the invoice to update.

Body
expiryAtstring · date-timeRequired

The expiry date of the invoice

Responses
200
Invoice updated successfully
application/json
put
{
  "expiryAt": "2019-08-24T14:15:22Z",
  "paymentItems": [
    {
      "unitAmount": 2000,
      "quantity": 1,
      "code": "PI-3e5fe23f2d"
    }
  ]
}
{
  "message": "Invoice updated successfully",
  "success": true,
  "data": {
    "invoiceNumber": "880509422769",
    "expiryAt": "2024-09-30T14:15:22Z",
    "paymentItems": [
      {
        "unitAmount": 2000,
        "quantity": 1,
        "code": "PC-aaf751b73f"
      }
    ]
  }
}

Last updated