Developers/Guides

Billing and payments

Every organisation has a billing mode set by PostBuddy: PREPAID (the default), TRIAL or INVOICE. The mode decides what happens when an item becomes READY:

  • PREPAID: the unit price of the item is reserved on the balance. Without enough available balance the item stays HELD with the warning code insufficient_balance and the Owners and Admins are notified. At the production cutoff the reservation becomes a charge; cancelling before the cutoff releases it.
  • TRIAL: the same flow against a free allowance (a number of items and an end date). An exhausted or expired trial behaves as PREPAID with a zero balance.
  • INVOICE: no balance. The item is reserved against the credit limit; when the outstanding amount plus the reserved amount would exceed the limit the item stays HELD with credit_limit_reached. Charges are invoiced monthly.

Test items never touch the ledger.

Summary

GET /v1/billing/summary returns the figures in cents:

FieldMeaning
balanceCentsPrepaid balance from top-ups, refunds and adjustments minus charges
reservedCentsReserved for READY items (prepaid) or scheduled, uncharged items (invoice)
availableCentsbalanceCents minus reservedCents
outstandingCentsCharged and not yet paid (invoice organisations)
creditLimitCents, creditHeadroomCentsThe credit limit and what is left of it (INVOICE)
trialitemsRemaining, expiresAt and active (TRIAL)
lowBalanceThresholdCentsThe low balance notification threshold from the organisation settings

Ledger

GET /v1/billing/ledger lists the append-only ledger newest first with a cursor. Each entry carries type (TOP_UP, RESERVATION, RELEASE, CHARGE, REFUND, ADJUSTMENT, SUBSCRIPTION_FEE, INVOICE_PAYMENT), the semantic amountCents and what the entry did to the figures (balanceDeltaCents, reservedDeltaCents, outstandingDeltaCents). Item entries reference the item (referenceType item, referenceId), payments reference the payment. Filter with type (comma separated), from, to and referenceId:

HTTP
GET /v1/billing/ledger?type=CHARGE,REFUND&from=2026-10-01T00:00:00Z&limit=100

GET /v1/billing/ledger/lines gives the same ledger as the portal's Billing shows it, newest first with a cursor. The entries of the cards of one Postflow or Postbatch come as one line of kind group: per production run and type for charges and refunds, per day and type for reservations and releases, with entries (the number of cards) and the sums of the amount and the three deltas. Every other entry (a top-up, an adjustment, a fee, a card of no Postflow or Postbatch) is a line of kind entry with the entry itself. An entry names its group in groupId; list the cards of a line with groupId:

HTTP
GET /v1/billing/ledger/lines?type=CHARGE,REFUND&limit=25
GET /v1/billing/ledger?groupId=lgr_5f1c0a9d3b7e42c8a6d1e0f2b4&limit=100

A group that gets a new entry while you page moves to the front and can come by again on a later page; its id is stable.

Top-ups and payments

Prepaid and trial organisations request a top-up with POST /v1/billing/top-ups:

JSON
{ "amountCents": 25000 }

amountCents is what goes onto the balance (prices are without VAT). The payment is that amount plus VAT at the rate of the billing profile (21 percent in the Netherlands, none under reverse charge or outside the EU): the payment's amountCents is the gross to pay and netCents the amount for the balance. The response holds the pending payment and the instructions of the payment provider. Under the manual provider these are bank transfer instructions with a reference to quote on the transfer:

JSON
{
  "payment": {
    "id": "pay_01JA7K3M9QX2T5V8W0Y4Z6B1C3",
    "kind": "TOP_UP",
    "provider": "manual",
    "status": "PENDING",
    "amountCents": 30250,
    "netCents": 25000,
    "currency": "EUR",
    "method": null,
    "reference": "PB-7K3M9QX2",
    "externalReference": null,
    "paidAt": null,
    "invoiceId": null,
    "ledgerEntryId": null,
    "notes": null,
    "requestedByType": "API_KEY",
    "channel": "MANUAL",
    "trigger": "REQUEST",
    "attempt": 1,
    "failureCode": null,
    "failureMessage": null,
    "refundedCents": 0,
    "unappliedCents": 0,
    "completedAt": null,
    "cancelledAt": null,
    "cancelReason": null,
    "expiresAt": "2026-10-29T09:30:00.000Z",
    "failedAt": null,
    "createdAt": "2026-10-15T09:30:00.000Z"
  },
  "instructions": {
    "method": "BANK_TRANSFER",
    "beneficiary": "PostBuddy B.V.",
    "iban": "NL91ABNA0417164300",
    "bic": "ABNANL2A",
    "amountCents": 30250,
    "currency": "EUR",
    "reference": "PB-7K3M9QX2",
    "note": "Quote the reference on the transfer; the balance is updated once the payment is registered."
  },
  "redirectUrl": null
}

When PostBuddy has switched the organisation to online payment, the answer carries redirectUrl (the payment provider's hosted page for iDEAL or Wero, Bancontact or a card) instead of instructions, and the balance is credited when the provider confirms the payment. When the provider cannot open the page, the answer is 502 payment_provider_error and nothing is requested; try again later or pay by bank transfer. Otherwise the balance is credited when PostBuddy registers the payment as received (with the requested amount when the gross arrived as asked, else with the part without VAT of what arrived); the organisation is notified (payment.received) and the ledger shows a TOP_UP entry referencing the payment. GET /v1/billing/payments lists requests and registered payments; POST /v1/billing/payments/{id}/cancel withdraws a pending request (an online one is closed at the provider as well, so its page can no longer be paid). A transfer request carries expiresAt: unpaid after 14 days it is cancelled by itself and the organisation is notified (payment.request_expired). A hosted payment page stops working after an hour. A cancelled payment says why in cancelReason (CUSTOMER, ADMIN, EXPIRED, CHECKOUT_CANCELLED, CHECKOUT_EXPIRED). Invoice payments are registered the same way against the outstanding amount.

Low balance

Owners set lowBalanceThresholdCents in the organisation settings. When the available balance drops below it, the Owners and Admins receive one balance.low notification; it is sent again after the balance went back above the threshold and crosses it once more. Items blocked for funds raise balance.insufficient at once.

Prices and quotes are covered in the OpenAPI reference (POST /v1/quotes, GET /v1/billing/prices). A price can differ per channel: a rule for POSTFLOW, POSTBATCH or SAMPLE wins over a rule for ANY channel. A quote takes channel (by default POSTFLOW with the rolling30d basis and POSTBATCH otherwise) and answers the channel it priced; GET /v1/billing/prices lists the channel of every row. Prices can also differ per plan: where your plan has its own price for a product, that price applies (with source: "plan" in GET /v1/billing/prices, which also names the plan), and the general price elsewhere. A pricing agreement comes on top of the plan's price. The plan in force when an item is priced sets its price.

Plans and entitlements

Your organisation runs on a plan assigned by PostBuddy: a monthly fee and a set of entitlements (the number of Postflows, a monthly item allowance with a hard or soft cap, the enabled products, storage, fonts, import rows, webhook endpoints and the features postflows, postbatches, qrTracking, samples, apiAccess and runSchedule). GET /v1/organisation/plan returns the plan, the effective entitlements and your usage against them, so an integration can show "3 of 5 Postflows used" before a limit is hit. At the point of use the API answers 403 with a stable code: postflow_limit_reached (creating a Postflow), product_not_entitled (a template, item or Postbatch for a product outside the plan), feature_not_entitled (a live key without apiAccess, a new Postflow or item without postflows, a new or approved Postbatch without postbatches) and allowance_exceeded (the monthly item allowance under a hard cap, the webhook endpoint, font or storage limit, an import with more rows than the plan allows). A soft allowance lets the extra items through at the list price. Test mode is never limited.

Invoices

GET /v1/billing/invoices lists your invoices and credit notes; GET /v1/billing/invoices/{id} adds the lines and the parties, and GET /v1/billing/invoices/{id}/pdf answers a signed download link valid for ten minutes. A prepaid top-up produces its invoice when PostBuddy registers the payment (paid at issue; the VAT is split out of the amount you paid). Invoice billing produces one invoice per calendar month with the usage per product, finish, destination and run, the subscription fee and any adjustments, due after your payment term. Credit notes reference the invoice they credit. Invoices are immutable once issued. GET /v1/billing/statements/{YYYY-MM} returns the usage statement of a month for any billing mode (?format=csv for a CSV body). The event invoice.issued fires for every invoice and credit note.