Get Invoice

Get Invoice

GET /payments/invoices/{invoice_reference}

Resource URL

Headers

Name
Value

Content-Type

application/json

irembopay-secretKey

secretKey

X-API-Version

2

Body

Name
Type
Description

invoice_reference

String

Yes

Invoice number of the payment request or the unique transaction identifier provided by the merchant when creating the invoice.

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

paidAt

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

childInvoices

Array

No

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

customer

Object

No

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

description

String

No

Optional description provided at invoice creation

paymentReference

String

No

Reference provided after the payment.

paymentMethod

String

No

Possible values : MTN_MOMO, AIRTEL_MONEY, EQUITY, BK, ONLINE_CARD

language

String

No

Language provided during the creation of the invoice. Possible values: FR, EN, RW

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

HTTP code
Error code
Description

404

INVOICE_NOT_FOUND

An invoice provided does not exist under the merchant.


Fetch invoice details

get

This endpoint retrieves the details of a specific invoice based on the provided invoice reference.

Authorizations
Path parameters
invoice_referencestringRequired

Invoice number or unique transaction identifier provided by the merchant when creating the invoice.

Responses
200
Invoice fetched successfully
application/json
get
GET /payments/invoices/{invoice_reference} HTTP/1.1
Host: api.sandbox.irembopay.com
irembopay-secretKey: YOUR_API_KEY
Accept: */*
{
  "message": "Invoice fetched successfully",
  "success": true,
  "data": {
    "amount": 100,
    "invoiceNumber": "870419646180",
    "transactionId": "TST-1005",
    "language": "EN",
    "createdAt": "2023-04-19T11:58:02.895+02",
    "updatedAt": "2023-04-19T11:58:02.895+02",
    "expiryAt": "2024-09-30T01:00:00.000+02",
    "paidAt": "2024-09-30T01:00:00.000+02",
    "paymentAccountIdentifier": "RCA-RWF",
    "paymentItems": [
      {
        "unitAmount": 2000,
        "quantity": 1,
        "code": "PI-3e5fe23f2d"
      }
    ],
    "description": "Invoice description",
    "type": "BATCH",
    "paymentStatus": "PAID",
    "paymentReference": "v93cbrT23GijUwxIz5IG1UapTWKtFB",
    "paymentMethod": "ONLINE_CARD",
    "currency": "RWF",
    "batchNumber": "870419646180",
    "childInvoices": [
      "880419591102",
      "880419591103"
    ],
    "customer": {
      "email": "example@gmail.com",
      "phoneNumber": "0780000001",
      "name": "Jixle Manzi"
    },
    "paymentLinkUrl": "<checkoutUrl>/880419591102"
  }
}

Last updated