Invoices
Monthly invoicing with VAT, lifecycle states, and dunning.
PlatformXe generates monthly invoices for paid plans. All amounts are in Nigerian Naira (NGN) with 7.5% VAT applied; the API returns them in kobo (see Viewing invoices).
Invoice lifecycle
| State | Description |
|---|---|
DRAFT | Invoice generated, not yet finalized |
PENDING | Finalized and awaiting payment |
PAID | Payment received and confirmed |
OVERDUE | Past due date, dunning active |
CANCELLED | Manually cancelled |
DRAFT → PENDING → PAID
→ OVERDUE → PAID (after retry)
→ CANCELLED
Viewing invoices
Invoices are accessible from the Tenant Portal billing page and through the API. The API returns your own organisation's invoices only, DRAFT ones included.
| Scope | billing:read (GET only). It is not one of the scopes a self-registered or portal sign-up key starts with: a key holds it when its scope list names it or holds *, or when it has no scope list (an older key with no scopes) |
| Key | An organisation key. A platform key with no organisation is refused (403 FORBIDDEN) |
| Rate limit | The default tier (1,000 requests/hr per API key) |
Money is in kobo. subtotal, tax and total (and a line item's unitPrice and total) are integer strings in kobo, the minor unit of the naira: "10642500" is ₦106,425.00. tax is the 7.5% VAT. pdfUrl is always null today: invoice PDFs are not produced yet.
List invoices
GET /api/v1/billing/invoices
| Query | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 20 | Invoices per page, 1 to 100 |
status | all | One of DRAFT, PENDING, PAID, OVERDUE, CANCELLED; anything else is 400 VALIDATION_ERROR |
Invoices are listed newest first.
curl "https://api.platformxe.com/api/v1/billing/invoices?status=PAID&limit=10" \
-H "x-api-key: pxk_live_your_api_key_here"
const { invoices, pagination } = await px.billing.listInvoices({ status: 'PAID', limit: 10 });
{
"success": true,
"data": {
"invoices": [
{
"id": "inv_ck9q2w3e4r5t6y7u8i9o0p1a",
"status": "PAID",
"currency": "NGN",
"periodStart": "2026-10-01T00:00:00.000Z",
"periodEnd": "2026-10-31T23:59:59.999Z",
"subtotal": "9900000",
"tax": "742500",
"total": "10642500",
"paidAt": "2026-11-02T08:15:00.000Z",
"paidVia": "FLUTTERWAVE",
"pdfUrl": null,
"createdAt": "2026-11-01T00:05:00.000Z",
"updatedAt": "2026-11-02T08:15:00.000Z"
}
],
"pagination": { "page": 1, "limit": 10, "total": 1, "totalPages": 1 }
}
}
| Field | Type | Description |
|---|---|---|
id | string | Invoice id |
status | string | DRAFT, PENDING, PAID, OVERDUE or CANCELLED |
currency | string | NGN |
periodStart / periodEnd | string | The billed period (ISO 8601) |
subtotal / tax / total | string | Kobo; tax is the 7.5% VAT |
paidAt | string | null | When it was paid |
paidVia | string | null | How it was paid |
pdfUrl | string | null | Always null today |
createdAt / updatedAt | string | ISO 8601 |
Get one invoice
GET /api/v1/billing/invoices/{id}
Returns the invoice and its line items. An unknown id and another organisation's invoice are both 404 NOT_FOUND, so the answer never tells you whether an id exists elsewhere.
curl https://api.platformxe.com/api/v1/billing/invoices/inv_ck9q2w3e4r5t6y7u8i9o0p1a \
-H "x-api-key: pxk_live_your_api_key_here"
const { invoice, lineItems } = await px.billing.getInvoice('inv_ck9q2w3e4r5t6y7u8i9o0p1a');
{
"success": true,
"data": {
"invoice": { "id": "inv_ck9q2w3e4r5t6y7u8i9o0p1a", "status": "PAID", "subtotal": "250000", "tax": "18750", "total": "268750", "...": "the other fields as in the list" },
"lineItems": [
{ "id": "li_ck9a8s7d6f5g4h3j2k1l0z9x", "service": "storage", "description": "Storage above the included allowance", "quantity": 1, "unitPrice": "250000", "total": "250000" }
]
}
}
Line items
Each invoice carries one line per billed item, such as metered usage above your plan's allowance or an add-on:
| Field | Type | Description |
|---|---|---|
id | string | Line item id |
service | string | The billed service (for example storage or addon) |
description | string | What the line is for |
quantity | number | Units billed |
unitPrice | string | Kobo per unit |
total | string | Kobo for the line |
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Unknown status (list) |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | The key lacks billing:read; its organisation is inactive; or it is a platform key with no organisation |
| 404 | NOT_FOUND | Get: unknown id, or another organisation's invoice |
| 429 | RATE_LIMITED | Over the key's budget; wait for Retry-After |
| 500 | INTERNAL_ERROR | Anything else (a fixed message) |
See also the SDK reference: Billing.
Dunning
When an invoice becomes overdue, PlatformXe automatically retries payment:
- Day 1: Invoice marked overdue, first retry attempted
- Day 3: Second retry
- Day 7: Third retry, warning notification sent
- Day 14: Final retry, service degradation warning
After 14 days of failed payment, API access may be restricted to read-only. Resolve outstanding invoices from the Tenant Portal billing page to restore full access.
Events
Subscribe to billing events for payment tracking:
billing.invoice.created— new invoice generatedbilling.invoice.paid— payment confirmedbilling.invoice.overdue— payment past due