Customer - DRAFT API

Integrate to PayEx Billing Usage API 

Changelog

VersionDateDescriptionCreated by
1.02024-06-10

Created document

Anders Göthberg
1.12024-10-04API in productionAnders 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

1766408706217-976.png

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 segmentDescription
subdomainIn this part of the API it will be "billing"
ownerNoThe ledger identifier/number at PayEx
resource1IdIdentifier of resource1 (invoices or customers)
resource2Ididentifier of resource2, subresource to resource1 (subscriptions)
resource3Ididentifier of resource3, subresource to resource2

Routes that occurs in examples of this documentation will use the following identifiers

ResourceIdentifier
ownerNoThe ledger identifier/number at PayEx
invoiceNoInvoice number
customerNo

Customer number

subscriptionNoSubscription number (mobile or fixed telephone number or other identifier)

Problem types

Note, each problem typecode is preceded by "billing/usage/service" in this API, e.g. the error "validation" in the table below will appear as typecode "billing/usage/problems/validation".

Problem type (code)Http statusDescription
validation400occurs if any of the inputvalidation fails, it is described in the problem which parameter that failed the validation
invoice-not-found404

Invoice number not found in Usage

customer-not-found404Customer not found in Usage for unbilled usage.
invoice-has-no-usage404Invoice has no usage
subscription-not found404Subscription not found on selected invoice (billed) or customer (unbilled)
Created by Anders Göthberg on 2026/05/13 09:50