The Kontorion Billing API provides a complete platform for subscription and usage-based billing. Manage customers, products, plans, and prices. Create and lifecycle subscriptions with add-ons, groups, and scheduled changes. Generate invoices automatically or manually. Track usage events and meter against committed use plans. Process payments through Stripe and GoCardless. Automate billing with recurring schedules, dunning policies, and promotion campaigns.
Base URL: https://api.kontorion.eu/v1
Authentication: All requests require an Authorization: Bearer ... header. See Authentication for details.
- External ID - your internal identifier for this customer, used for idempotent upserts
- Billing model - controls how charges are calculated (prepaid, postpaid, or hybrid)
- Customer type -
individualorcompany, affects tax treatment and invoice formatting - Metadata - arbitrary key-value pairs for your own bookkeeping
pending → trialing → active → past_due → canceled or expired. Each transition can trigger invoicing, proration, or dunning actions.
Key concepts:
- Plan - the pricing template attached to this subscription
- Billing period -
month,quarter, oryear- determines invoice frequency - Trial - an optional free period before charges begin
- Auto-renew - whether the subscription renews automatically at period end
- Billing anchor day - the day of month that billing cycles align to (e.g., the 1st or 15th)
- Proration - when a subscription changes mid-cycle, charges are adjusted proportionally
- Items - the specific products and quantities included in this subscription
draft → finalized → sent → paid (or void / uncollectible). Draft invoices can be edited; finalized invoices are immutable and receive a sequential invoice number.
Key concepts:
- Invoice type -
subscription(recurring),one_off(manual), orcredit_note(refund/adjustment) - Line items - individual charges with product, quantity, amount, and tax breakdown
- Credit notes - partial or full reversals of a finalized invoice
- PDF export - generate a formatted PDF for download or email delivery
- XRechnung - EU-compliant electronic invoice format (XML) for B2G billing
- Buyer reference - PO number or reference that appears on the invoice for the customer's records
- Products - the items included in this plan, each with optional included quantities and rollover rules
- Versions - immutable snapshots of the plan configuration at a point in time
- Publishing - makes a draft plan version available for new subscriptions
- Migration - moves existing subscribers from one plan version to another, with configurable proration
- Credit - add funds to the wallet (from a payment, promotion, or manual adjustment)
- Debit - remove funds (applied automatically during invoicing, or manually)
- Hold - reserve an amount for a pending charge (released or captured later)
- Transfer - move funds between wallets (e.g., currency conversion)
- Adjust - correct the balance without a formal credit/debit (e.g., migration adjustment)
- Product type -
recurring,usage,one_time, orseat- determines how charges are calculated - External ID - your internal SKU or product code for integration with other systems
- Cost tracking - named COGS entries via
costs[](per-product or org-scoped) for margin analysis - Dependencies -
requires_product_idsenforces that certain products must be purchased together
- Flat - a fixed amount per billing period (e.g., $49/month)
- Per-unit - a fixed amount multiplied by quantity (e.g., $10/seat)
- Tiered - different rates at different volume thresholds (e.g., $0.10/unit for 0–1,000, $0.08/unit for 1,001–10,000)
- Volume - the tier that contains the total quantity determines the rate for all units
- Graduated - each tier's rate applies only to units within that tier's range
- Formula - a mathematical expression evaluated at billing time (see Price Formulas)
- Effective date - prices can be scheduled to take effect in the future
- Country code - geo-specific pricing for different markets
- Currency - each price is denominated in a single currency; use multiple prices for multi-currency support
base_price * (1 - volume_discount) where volume_discount increases with usage.- Code - the coupon code a customer enters (e.g.,
SAVE20) - Effects - what the promotion does: percentage discount, fixed discount, free trial extension, or credit grant
- Conditions - eligibility rules: minimum spend, specific plans, customer segments, date ranges
- Budget - optional spending cap; the promotion deactivates when the budget is exhausted
- Stackable - whether this promotion can combine with other active promotions
- Simulation - preview the financial impact of a promotion before activating it
- Provider - the payment processor (
stripe,gocardless, etc.) - Mode -
liveortest- determines whether real charges are made - Supported currencies - which currencies this gateway can process
- Supported methods - which payment methods this gateway handles (card, direct_debit, etc.)
is_default and is used automatically when invoices are finalized.- Jurisdiction - country and optional region the rule applies to
- Tax type -
vat,sales_tax,gst,hst, etc. - Inclusive vs. exclusive - whether the tax is included in the listed price or added on top
- Compound tax - whether this tax is calculated on the pre-tax amount or on the amount including other taxes
- Apply order - controls the sequence when multiple tax rules apply
- Release strategy -
immediate(execute now),scheduled(at a specific datetime), ornext_period(at the start of the next billing cycle) - Dependencies - chain changes so one executes only after another completes
- Rollback window - how long after execution the change can be reversed
- Notification - optionally notify the customer before a change takes effect
- An invoice payment fails
- The dunning policy's first step activates (e.g., retry after 3 days)
- If the retry fails, the next step activates (e.g., send a reminder email after 7 days)
- Steps escalate until payment succeeds or the final action triggers (e.g., cancel subscription after 30 days)
text, number, boolean, date, enum, entity_ref
Key concepts:
- Entity types - which resources this field applies to (e.g.,
customer,subscription) - Field group - logical grouping for UI display
- Validation - regex patterns, min/max values, required/optional
- Auditable - whether changes to this field are tracked in the audit log
- Deprecation - soft-disable a field before permanent removal
pending → verified / failed / expired.
Use verifications for KYC/KYB compliance, age verification, or business entity validation.- MRR - the normalized monthly revenue from all active subscriptions
- Churn - the rate at which customers cancel or downgrade
- Revenue - breakdown by product, plan, currency, and time period
allowance.rolled_over
approval.request_approved
approval.request_auto_rejected
approval.request_cancelled
approval.request_created
approval.request_rejected
approval.step_approved
approval.step_auto_approved
approval.step_escalated
approval.step_started
credit_note.applied
credit_note.created
credit_note.issued
credit_note.voided
customer.corrective_invoice_review_required
customer.created
customer.mode_changed
customer.type_changed
dispute.changed
document.failed
document.generated
document.requested
dunning.step.cancel
dunning.step.email
dunning.step.grace
dunning.step.suspend
e_invoicing.document.generated
e_invoicing.document.quarantined
invoice.created
invoice.finalized
invoice.generated
invoice.line_added
invoice.line_deleted
invoice.line_updated
invoice.manual_collection_link_requested
invoice.payment_attempt_failed
invoice.payment_failed_terminal
invoice.payment_recorded
invoice.pending_approval
invoice.updated
invoice.voided
meter.threshold_breached
mutation.recorded
payment.changed
plan.published
plan.subscribers_migrated
plan.version_rebased
product.activated
product.archived
product.copied
product.created
product.deleted
product.updated
product.version_rebased
promotion.activated
promotion.archived
promotion.budget_exhausted
promotion.created
promotion.effect_applied
promotion.expired
promotion.phase_changed
promotion.redeemed
promotion.redemption_cap_reached
promotion.redemption_dormant
promotion.redemption_free_periods_exhausted
promotion.redemption_reactivated
promotion.redemption_revoked
promotion.updated
reserve_outcome.captured
reserve_outcome.failed
reserve_outcome.queued
scheduled_change.cancelled
scheduled_change.created
scheduled_change.reconfirmed
scheduled_change.released
scheduled_change.rolled_back
scheduled_change.superseded
scheduled_change.upcoming
state.transitioned
subscription.activated
subscription.cancelled
subscription.created
subscription.dunning_entered
subscription.dunning_stage_changed
subscription.item_added
subscription.item_removed
subscription.paused
subscription.payment_failed
subscription.plan_changed
subscription.quantity_changed
subscription.recovered
subscription.refund_required
subscription.resumed
tax.oss_threshold_approaching
tax.oss_threshold_exceeded
wallet.apply_to_invoice
wallet.auto_topup_triggered
wallet.hold_expired
wallet.payment_skipped
wallet.transferred