# Get invoice Retrieve a single invoice by its ID. If you want to retrieve the details of an invoice by its invoice number, call the [List invoices](list-invoices) endpoint with the `reference` parameter. > 🔑 Access with > > [Organization access token with **invoices.read**](/reference/authentication) > > [OAuth access with **invoices.read**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Business operations", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com/v2" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/invoices/{invoiceId}": { "parameters": [ { "name": "invoiceId", "description": "Provide the ID of the related invoice.", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^inv_.+$", "example": "inv_aHbjjdrUdm" } } ], "get": { "summary": "Get invoice", "x-speakeasy-name-override": "get", "tags": [ "Invoices API" ], "operationId": "get-invoice", "security": [ { "organizationAccessToken": [ "invoices.read" ] }, { "oAuth": [ "invoices.read" ] } ], "description": "Retrieve a single invoice by its ID.\n\nIf you want to retrieve the details of an invoice by its invoice number, call the [List invoices](list-invoices) endpoint with the `reference` parameter.\n\n> 🔑 Access with\n>\n> [Organization access token with **invoices.read**](/reference/authentication)\n>\n> [OAuth access with **invoices.read**](/reference/authentication)", "responses": { "200": { "description": "The invoice object.", "content": { "application/hal+json": { "schema": { "type": "object", "required": [ "resource", "id", "reference", "vatNumber", "status", "issuedAt", "netAmount", "vatAmount", "grossAmount", "lines", "_links" ], "properties": { "resource": { "type": "string", "description": "Indicates that the response contains an invoice object. Will always contain the string `invoice` for this endpoint.", "readOnly": true, "default": "invoice" }, "id": { "allOf": [ { "type": "string", "pattern": "^inv_.+$", "example": "inv_aHbjjdrUdm" } ], "readOnly": true }, "reference": { "type": "string", "description": "The reference number of the invoice. An example value would be: `2024.10000`.", "readOnly": true, "example": "2024.10000" }, "vatNumber": { "type": [ "string", "null" ], "description": "The VAT number to which the invoice was issued to, if applicable.", "readOnly": true, "example": "NL123456789B01" }, "status": { "allOf": [ { "type": "string", "description": "Status of the invoice.\n\nPossible values: `open` `paid` `overdue`", "x-enumDescriptions": { "open": "The invoice is not paid yet.", "paid": "The invoice is paid.", "overdue": "Payment of the invoice is overdue." }, "example": "open" } ], "readOnly": true }, "netAmount": { "allOf": [ { "type": "object", "description": "In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } } ], "description": "Total amount of the invoice, excluding VAT.", "readOnly": true }, "vatAmount": { "allOf": [ { "type": "object", "description": "In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } } ], "description": "VAT amount of the invoice. Only applicable to merchants registered in the Netherlands. For EU merchants, VAT will be shifted to the recipient (as per article 44 and 196 in the EU VAT Directive 2006/112). For merchants outside the EU, no VAT will be charged.", "readOnly": true }, "grossAmount": { "allOf": [ { "type": "object", "description": "In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } } ], "description": "Total amount of the invoice, including VAT.", "readOnly": true }, "lines": { "type": "array", "description": "The collection of products which make up the invoice.", "items": { "type": "object", "required": [ "period", "description", "count", "vatPercentage", "amount" ], "properties": { "period": { "type": "string", "description": "The administrative period in `YYYY-MM` on which the line should be booked.", "example": "2024-01" }, "description": { "type": "string", "description": "Description of the product.", "example": "Product #1" }, "count": { "type": "integer", "description": "Number of products invoiced. For example, the number of payments.", "example": 3 }, "vatPercentage": { "type": "integer", "description": "VAT percentage rate that applies to this product.", "example": 21 }, "amount": { "description": "Line item amount excluding VAT.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } } } }, "readOnly": true }, "issuedAt": { "type": "string", "description": "The invoice date in `YYYY-MM-DD` format.", "readOnly": true, "example": "2024-01-15" }, "paidAt": { "type": [ "string", "null" ], "description": "The date on which the invoice was paid, if applicable, in `YYYY-MM-DD` format.", "readOnly": true, "example": "2024-01-20" }, "dueAt": { "type": [ "string", "null" ], "description": "The date on which the invoice is due, if applicable, in `YYYY-MM-DD` format.", "readOnly": true, "example": "2024-01-30" }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "properties": { "self": { "description": "URL to the current invoice resource.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "pdf": { "description": "URL to a downloadable PDF of the invoice.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "documentation": { "description": "URL to the API documentation.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } }, "examples": { "get-invoice-200-1": { "summary": "The invoice object", "value": { "resource": "invoice", "id": "inv_xBEbP9rvAq", "reference": "2023.10000", "vatNumber": "NL001234567B01", "status": "open", "netAmount": { "currency": "EUR", "value": "45.00" }, "vatAmount": { "currency": "EUR", "value": "9.45" }, "grossAmount": { "currency": "EUR", "value": "54.45" }, "lines": [ { "period": "2023-09", "description": "iDEAL payment fees", "count": 100, "vatPercentage": 21, "amount": { "currency": "EUR", "value": "45.00" } } ], "issuedAt": "2023-09-01", "dueAt": "2023-09-14", "_links": { "self": { "href": "...", "type": "application/hal+json" }, "pdf": { "href": "https://www.mollie.com/merchant/download/invoice/xBEbP9rvAq/2ab44d60b35b1d06090bba955fa2c602", "type": "application/pdf" }, "documentation": { "href": "...", "type": "text/html" } } } } } } } }, "404": { "description": "No entity with this ID exists.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X GET https://api.mollie.com/v2/invoices/inv_xBEbP9rvAq \\\n -H \"Authorization: Bearer access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\"" }, { "language": "php", "code": "setAccessToken(\"access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\");\n\n$invoice = $mollie->send(new GetInvoiceRequest(\"inv_xBEbP9rvAq\"));", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "/*\nWe don't have a Node.js code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "from mollie.api.client import Client\n\nmollie_client = Client()\nmollie_client.set_access_token(\"access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\")\n\ninvoice = mollie_client.invoices.get(\"inv_xBEbP9rvAq\")", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "require 'mollie-api-ruby'\n\nMollie::Client.configure do |config|\n config.api_key = 'access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ'\nend\n\ninvoice = Mollie::invoice.get('inv_xBEbP9rvAq')", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```