Integrate to PayEx Billing Invoice API
Changelog
| Version | Date | Description | Created by |
|---|---|---|---|
| 1.0 | 2025-05-20 | Created document | Anders Göthberg |
| 1.1 | API in production | Anders Göthberg |
Introduction
Link to the general step-by-step implementations guide that guides you through setting up a REST API integration towards PayEx Ledger Invoice Service can be found here
Billing Invoice API presents presents at the lowest level all incoming charges that generated an invoice regardless of presentation in PDF. This can be used for presentation on the company's various applications such as "my pages" or customer service users in the company's own CRM.
Invoice API

Route description
Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
The below route is an example of a route towards resource3Id, to operate on this resource you must also include the ids of its parent resources in the route.
lf-api.payex.com/billing/{subdomain}/v1/{ownerNo}/resource1/{resource1Id}/resource2/{resource2Id}/resource3/{resource3Id}
| Route segment | Description |
|---|---|
| subdomain | In this part of the API it will be "billing" |
| ownerNo | The ledger identifier/number at PayEx |
| resource1Id | Identifier of resource1 (invoices) |
| resource2Id | identifier of resource2, subresource to resource1 (recurring products or subscriptions) |
| resource3Id | identifier of resource3, subresource to resource2 (recurring products) |
Routes that occurs in examples of this documentation will use the following identifiers
| Resource | Identifier |
|---|---|
| ownerNo | The ledger identifier/number at PayEx |
| customerNo | Customer number |
| invoiceNo | Invoice number |
| subscriptionNo | Subscription number (identifier for subscription) |
| recurring-products | Recurring products on customer or subscription level |
Swaggerfil!!!
Problem types
| Problem type (code) | Http status | Description |
|---|---|---|
| validation | 400 | occurs if any of the inputvalidation fails, it is described in the problem which parameter that failed the validation |
| customer-not-found | 404 | Customer not found in PayEx Billing |
| invoice-not-found | 404 | Invoice number not found in Usage |
| subscription-not-found | 404 | Subscription not found on selected customer |