Integrate to PayEx Billing Usage API
Changelog
| Version | Date | Description | Created by |
|---|---|---|---|
| 1.0 | 2024-06-10 | Created document | Anders Göthberg |
| 1.1 | 2024-10-04 | 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 Invoice Service can be found here
Billing Usage API presents calls to customers' billed and unbilled usage calls. 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.
Usage 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 or customers) |
| resource2Id | identifier of resource2, subresource to resource1 (subscriptions) |
| resource3Id | identifier of resource3, subresource to resource2 |
Routes that occurs in examples of this documentation will use the following identifiers
| Resource | Identifier |
|---|---|
| ownerNo | The ledger identifier/number at PayEx |
| invoiceNo | Invoice number |
| customerNo | Customer number |
| subscriptionNo | Subscription number (mobile or fixed telephone number or other identifier) |
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 |
| invoice-not-found | 404 | Invoice number not found in Usage |
| customer-not-found | 404 | Customer not found in Usage for unbilled usage. |
| invoice-has-no-usage | 404 | Invoice has no usage |
| subscription-not found | 404 | Subscription not found on selected invoice (billed) or customer (unbilled) |