Invoices
Read invoices, understand their kinds, lines and status, get them paid, and correct them with credit notes.
An invoice is what a customer owes for a period or an event. Payrudder raises them. You read them (GET /v1/invoices, GET /v1/invoices/{id}), send the customer to pay them, and hear about them by webhook.
An issued invoice is never edited. A correction is a credit note and, where needed, a new invoice.
Kinds
kind is one of:
| Kind | What it is |
|---|---|
REGULAR | a billing period's usage and, for a subscription billed in arrears, its fee |
FEE | a fixed fee invoiced in advance for one period, or what a plan change moved |
CORRECTION | a correction of a closed period |
LINK | made from an ad-hoc payment link |
Lines
Each line has a kind:
| Line | What it is |
|---|---|
BASE_FEE | the fixed fee, with the service period it covers (service_from, service_to) |
USAGE | a meter's quantity for the period, priced by the package version the subscription was on |
LATE_USAGE | usage that arrived after the period's cutoff and is billed on the next open invoice (Usage metering) |
CREDIT | credit balance used to pay the invoice (Credits and balances) |
CORRECTION | a correction of earlier usage |
DISCOUNT | a coupon's discount |
TAX | tax at the account's rate for the customer's country |
ITEM | one item of a shop's order (a payment link with items), net of VAT; its rate is tax_rate_bps, and the order's TAX lines are one per rate (E-commerce checkout) |
Amounts are integers in the currency's minor unit, as strings (total_minor).
The total is never negative. Lines that come to less than zero (late-usage corrections larger than everything else on the invoice) leave the invoice at 0, and the rest becomes credit balance (credit_surplus_minor).
Status
status is one of:
| Status | Webhook |
|---|---|
draft | |
open | invoice.finalized when it gets its number |
paid | invoice.paid |
uncollectible | invoice.uncollectible |
void | invoice.voided |
A number is given when the invoice is finalized: INV-2026-000123 is the year, then a sequence without gaps for each year. A sandbox account's numbers are prefixed SBX-. See Webhooks for the payloads.
An invoice whose payment is declined is retried on a schedule before it is given up: Failed payments and retries.
Getting paid
POST /v1/invoices/{id}/links makes it: valid 90 days unless you say otherwise, at most 365. The token is shown once. DELETE /v1/invoices/{id}/links stops every link.
The page shows the invoice and its PDF, in the customer's language, and offers the payment methods the account has. See Accept payments.
GET /v1/invoices/{id}/pdf returns a presigned link valid for five minutes.
GET /v1/customers/{external_id}/payments lists a customer's invoices with the payments on them (the rows the customer sees on their own page). GET /v1/payments lists the account's charges and refunds, never summed across currencies.
GET /v1/customers/{external_id}/upcoming-invoice is an estimate of the next regular invoice, with no number, that moves with every event until the period closes.
Credit notes
A credit note (CN-2026-000007) corrects a paid invoice. Its amount goes either:
- to the customer's credit balance, which pays their next invoices, or
- back to the card through the provider that took the payment.
The notes of an invoice never add up to more than the invoice. Issue one with POST /v1/invoices/{id}/credit-notes (to the credit balance, or refund_to_card through the provider that took the payment) and read them with GET /v1/credit-notes and GET /v1/credit-notes/{id}, with disposition and, for a refund, refund_state.
Tax is added by the account's configured rates and nothing else; Payrudder is not a tax engine (Tax and e-invoices).