Skip to main content
Monigo is built around seven entities. Understanding how they fit together makes every other part of the API easier to reason about.

Entity map


Customer

A customer is an end-user, company, or account that you bill or pay out to.
Always set external_id to your own system’s identifier. This lets you look up customers by your ID without storing Monigo UUIDs in your database.
Related: Customers API, Payout Accounts

Event

An event is a single record of something your customer did — one API call, one transaction processed, one gigabyte written. Events are the raw input to the metering pipeline. Events are immutable once ingested. You can replay a window of events through updated rules, but you cannot edit individual events. Related: Metering guide, Idempotency guide

Metric

A metric defines how events are aggregated into a single number for billing. Example: A metric named “API Calls” tracks events with event_name: "api_call" using count aggregation. At billing time, Monigo counts all events in the period and charges based on that number. Related: Metering guide

Plan

A plan is a billing template that defines what to charge and when. Multiple customers can share the same plan. billing_mode only applies to collection plans. A prepaid plan debits the customer’s wallet atomically at period-end, creating the invoice directly as paid without a separate finalize-and-charge step. Related: Prepaid Billing guide

Price

A price is one pricing rule attached to a plan. A plan can have multiple prices — one per metric. All monetary values are decimal strings ("2.500000") to avoid floating-point precision errors. Related: Pricing Models guide

Subscription

A subscription links one customer to one plan and tracks the active billing period. A subscription automatically advances to the next period when the current one ends. An invoice is generated at the end of each period. Related: Subscription Lifecycle guide, Billing Cycle

Invoice

An invoice is the bill generated at the end of each billing period. It contains one line item per price on the plan. Related: Invoice Lifecycle guide

Payout Account

A payout account is a bank account or mobile money number that a customer can be paid to. Used for event-driven payouts to vendors, drivers, or partners. Related: Event-Driven Payouts guide

Wallet

A wallet holds a pre-funded balance for a customer in a specific currency. Wallets are used by prepaid billing to debit usage charges directly at period-end. Wallets are created automatically when a customer subscribes to a prepaid plan. You can credit a wallet at any time via the API or by generating a payment link. Related: Prepaid Billing guide