Get invoice

Invoices API v2
GEThttps://api.mollie.com/v2/invoices/*id*

Retrieve details of an invoice, using the invoice’s identifier.

If you want to retrieve the details of an invoice by its invoice number, use the list endpoint with the reference parameter.

Parameters

Replace id in the endpoint URL by the invoice ID, for example inv_FrvewDA3Pr.

Response

200 application/json

resourcestring
Indicates the response contains an invoice object. Will always contain invoice for this endpoint.
idstring
The invoice’s unique identifier, for example inv_FrvewDA3Pr.
referencestring
The reference number of the invoice. An example value would be: 2018.10000.
vatNumberstring
The VAT number to which the invoice was issued to (if applicable).
statusstring

Status of the invoice.

Possible values:

  • open The invoice is not paid yet.
  • paid The invoice is paid.
  • overdue Payment of the invoice is overdue.
issuedAtstring
The invoice date in YYYY-MM-DD format.
paidAtstring
The date on which the invoice was paid, in YYYY-MM-DD format. Only for paid invoices.
dueAtstring
The date on which the invoice is due, in YYYY-MM-DD format. Only for due invoices.
netAmountamount object

Total amount of the invoice excluding VAT, e.g. {"currency":"EUR", "value":"100.00"}.

Show child parameters

currencystring
The ISO 4217 currency code.
valuestring
A string containing the exact amount of the invoice excluding VAT in the given currency.
vatAmountamount object

VAT amount of the invoice. Only for merchants registered in the Netherlands. For EU merchants, VAT will be shifted to recipient (see article 44 and 196 EU VAT Directive 2006/112). For merchants outside the EU, no VAT will be charged.

Show child parameters

currencystring
The ISO 4217 currency code.
valuestring
A string containing the exact VAT amount in the given currency.
grossAmountamount object

Total amount of the invoice including VAT.

Show child parameters

currencystring
The ISO 4217 currency code.
valuestring
A string containing the exact total amount of the invoice including VAT in the given currency.
linesarray

The collection of products which make up the invoice.

Show child parameters

periodstring
The administrative period in YYYY-MM on which the line should be booked.
descriptionstring
Description of the product.
countinteger
Number of products invoiced (usually number of payments).
vatPercentagedecimal
VAT percentage rate that applies to this product.
amountamount object

Amount excluding VAT.

Show child parameters

currencystring
The ISO 4217 currency code.
valuestring
A string containing the exact amount of this line excluding VAT in the given currency.
_linksobject

Useful URLs to related resources.

Show child parameters

selfURL object
The API resource URL of the invoice itself.
pdfURL object
The URL to the PDF version of the invoice. The URL will expire after 60 minutes.
documentationURL object
The URL to the invoice retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET "https://api.mollie.com/v2/invoices/inv_xBEbP9rvAq" \
-H "Authorization: Bearer access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ"
1
2
3
4
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setAccessToken("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ");
$invoice = $mollie->invoices->get("inv_xBEbP9rvAq");
1
2
3
4
5
6
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_access_token("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ")

invoice = mollie_client.invoices.get("inv_xBEbP9rvAq")
1
2
3
4
5
6
7
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ'
end

invoice = Mollie::Invoice.get('inv_xBEbP9rvAq')
1
2
3
4
We don't have a Node.js code example for this API call yet.

If you have some time to spare, feel free to share suggestions on our Discord:
https://discord.gg/VaTVkXB4aQ

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
HTTP/1.1 200 OK
Content-Type: application/json

{
    "resource": "invoice",
    "id": "inv_xBEbP9rvAq",
    "reference": "2016.10000",
    "vatNumber": "NL001234567B01",
    "status": "open",
    "issuedAt": "2016-08-31",
    "dueAt": "2016-09-14",
    "netAmount": {
        "value": "45.00",
        "currency": "EUR"
    },
    "vatAmount": {
        "value": "9.45",
        "currency": "EUR"
    },
    "grossAmount": {
        "value": "54.45",
        "currency": "EUR"
    },
    "lines":[
        {
            "period": "2016-09",
            "description": "iDEAL transactiekosten",
            "count": 100,
            "vatPercentage": 21,
            "amount": {
                "value": "45.00",
                "currency": "EUR"
            }
        }
    ],
    "_links": {
        "self": {
             "href": "https://api.mollie.com/v2/invoices/inv_xBEbP9rvAq",
             "type": "application/hal+json"
        },
        "pdf": {
             "href": "https://www.mollie.com/merchant/download/invoice/xBEbP9rvAq/2ab44d60b35b1d06090bba955fa2c602",
             "type": "application/pdf",
             "expiresAt": "2018-11-09T14:10:36+00:00"
        }
    }
}