# Get Invoice



## Get Invoice

<mark style="color:blue;">`GET`</mark>` ``/payments/invoices/{invoice_reference}`

#### **Resource URL**

{% tabs %}
{% tab title="Test" %}
[https://api.sandbox.irembopay.com/payments/invoices/{invoice\_reference}](https://api.sandbox.irembopay.com/payments/invoices/%7Binvoice_reference%7D)
{% endtab %}

{% tab title="Production" %}
[https://api.irembopay.com/payments/invoices/{invoice\_reference}](https://api.irembopay.com/payments/invoices/%7Binvoice_reference%7D)
{% endtab %}
{% endtabs %}

#### **Headers**

| Name                | Value              |
| ------------------- | ------------------ |
| Content-Type        | `application/json` |
| irembopay-secretKey | secretKey          |
| X-API-Version       | 2                  |



**Body**

<table><thead><tr><th width="176">Name</th><th>Type</th><th width="114">Description</th><th width="362"></th></tr></thead><tbody><tr><td>invoice_reference</td><td>String</td><td>Yes</td><td>Invoice number of the payment request or the unique transaction identifier provided by the merchant when creating the invoice.</td></tr></tbody></table>



### Response body payload <a href="#response-body-payload" id="response-body-payload"></a>

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

<table><thead><tr><th width="168">Name</th><th>Type</th><th>Mandatory?</th><th width="318">Comments</th></tr></thead><tbody><tr><td>invoiceNumber</td><td>String</td><td>Yes</td><td>Identifier of the invoice that the end-user will use to do the payment</td></tr><tr><td>transactionId</td><td>String</td><td>Yes</td><td>Transaction Identifier provided during the creation of the invoice.</td></tr><tr><td>paymentAccountIdentifier</td><td>String</td><td>Yes</td><td>Identifier of the Payment Account where the money will be deposited</td></tr><tr><td>paymentItems</td><td>Array</td><td>Yes</td><td>Products for which this invoice has been created</td></tr><tr><td>paymentStatus</td><td>String</td><td>Yes</td><td>Payment status of the invoice:<br><code>NEW</code>: invoice created and not paid yet.<br><code>PAID</code>: paid invoice.</td></tr><tr><td>amount</td><td>double</td><td>Yes</td><td>Amount of the invoice. Calculation method : Sum of (Product unit amount x quantity)</td></tr><tr><td>currency</td><td>String</td><td>Yes</td><td>Currency of the invoice which is the same as the currency of the payment account identifier. Possible values: "RWF", "EUR", "GBP", "USD".</td></tr><tr><td>type</td><td>String</td><td>Yes</td><td><code>SINGLE</code> or <code>BATCH</code></td></tr><tr><td>createdAt</td><td>String</td><td>Yes</td><td>In <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">Internet date and time format</a>.<br>eg.<code>2022-11-27T16:24:51.000+02:00</code></td></tr><tr><td>updatedAt</td><td>String</td><td>No</td><td>In <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">Internet date and time format</a>.<br>eg.<code>2022-11-27T16:24:51.000+02:00</code></td></tr><tr><td>paidAt</td><td>String</td><td>No</td><td>In <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">Internet date and time format</a>.<br>eg.<code>2022-11-27T16:24:51.000+02:00</code></td></tr><tr><td>expiryAt</td><td>String</td><td>No</td><td>In <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">Internet date and time format</a>.<br>eg.<code>2022-11-27T16:24:51.000+02:00</code></td></tr><tr><td>childInvoices</td><td>Array</td><td>No</td><td>If this invoice is a batch invoice, this is an array of invoice numbers which are included in the batch.</td></tr><tr><td>customer</td><td>Object</td><td>No</td><td>An optional customer object who will be notified about this invoice.</td></tr><tr><td>description</td><td>String</td><td>No</td><td>Optional description provided at invoice creation</td></tr><tr><td>paymentReference</td><td>String</td><td>No</td><td>Reference provided after the payment.</td></tr><tr><td>paymentMethod</td><td>String</td><td>No</td><td>Possible values : <code>MTN_MOMO</code>, <code>AIRTEL_MONEY</code>, <code>EQUITY</code>, <code>BK</code>, <code>ONLINE_CARD</code></td></tr><tr><td>language</td><td>String</td><td>No</td><td>Language provided during the creation of the invoice.<br>Possible values: <code>FR</code>, <code>EN</code>, <code>RW</code></td></tr><tr><td>batchNumber</td><td>String</td><td>No</td><td>Batch invoice number (only for invoice with type: <code>BATCH</code>)</td></tr><tr><td>paymentLinkUrl</td><td>String</td><td>Yes</td><td>A URL that directs the merchants' end-user to a checkout page where they can make a payment</td></tr></tbody></table>





***



***

### Error codes <a href="#error-codes" id="error-codes"></a>

| HTTP code	 | Error code	         | Description                                            |
| ---------- | ------------------- | ------------------------------------------------------ |
| 404        | INVOICE\_NOT\_FOUND | An invoice provided does not exist under the merchant. |



***





## Fetch invoice details

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

OpenAPI:

```json
{"openapi":"3.0.0","info":{"title":"IremboPay API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.irembopay.com"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"irembopay-secretKey"}}},"paths":{"/payments/invoices/{invoice_reference}":{"get":{"summary":"Fetch invoice details","description":"This endpoint retrieves the details of a specific invoice based on the provided invoice reference.","parameters":[{"name":"invoice_reference","in":"path","required":true,"description":"Invoice number or unique transaction identifier provided by the merchant when creating the invoice.","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice fetched successfully","content":{"application/json":{}}},"401":{"description":"Unauthorized","content":{"application/json":{}}},"404":{"description":"Invoice not found","content":{"application/json":{}}}}}}}}
```









