Skip to main content
billing.io provides a complete revenue tracking system built around three pillars:
PillarPurpose
Revenue EventsImmutable ledger of every monetary event
Accounting PeriodsAggregated summaries for financial reporting
AdjustmentsManual credits, debits, and chargebacks

Revenue events

Revenue events form an immutable append-only ledger. Every time money moves — a checkout is confirmed, a subscription is charged, a refund is issued — a revenue event is created. Events cannot be edited or deleted.

Event types

EventDescription
checkout_confirmedOne-time checkout payment confirmed on-chain
subscription_chargedRecurring subscription renewal confirmed on-chain
refundRefund tracked for bookkeeping (merchant executes the actual refund)
adjustment_creditManual credit applied — increases net revenue
adjustment_debitManual debit applied — decreases net revenue
chargebackDisputed transaction recorded for accounting
Revenue events are immutable. To correct an error, create an adjustment (credit or debit) rather than modifying an existing event. This preserves the audit trail.

Accounting periods

The accounting view aggregates revenue events into period-level summaries:
MetricDescription
Gross RevenueTotal confirmed payments
Feesbilling.io orchestration fees
Net RevenueGross revenue minus fees
AdjustmentsSum of credits, debits, and chargebacks
Adjusted NetNet revenue plus/minus adjustments

Revenue Timeline

Chronological stream of individual events. Best for investigating specific transactions.

Accounting View

Period-level summaries for financial reporting, reconciliation, and CSV export.

Adjustments

Adjustments are manual entries that modify revenue records. Each adjustment creates a corresponding revenue event, maintaining ledger integrity.
TypeEffectRevenue Event
creditIncreases net revenueadjustment_credit
debitDecreases net revenueadjustment_debit
chargebackDecreases net revenuechargeback
Adjustments cannot be deleted. To correct a mistake, create a counter-adjustment (e.g., a debit to offset an incorrect credit).

CSV export

The accounting view supports CSV export for integration with external accounting systems (QuickBooks, Xero, spreadsheet applications). Exports include period dates, gross/net revenue, adjustment totals, and event counts.

Code examples

List revenue events

curl "https://api.billing.io/v1/revenue/events?limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

Get accounting summary

curl "https://api.billing.io/v1/revenue/accounting?period=2025-01" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create an adjustment

curl -X POST https://api.billing.io/v1/revenue/adjustments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "credit",
    "amount": 25.00,
    "currency": "USD",
    "reason": "Goodwill credit for delayed checkout confirmation",
    "customer_id": "cus_abc123def456",
    "checkout_id": "chk_xyz789"
  }'

Best practices

Always provide a reason

Clear adjustment reasons are invaluable during accounting reviews.

Link adjustments to resources

Always link adjustments to the relevant checkout, subscription, or customer.

Export monthly

Keep your external accounting system in sync with regular exports.

Review discrepancies promptly

Drill into the revenue timeline to identify and address unexpected numbers.