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

Organisation

    ├── Customers ──────────────── PayoutAccounts
    │       │
    │       ├── Subscriptions ──── Plans ──── Prices ──── Metrics
    │       │       │
    │       │       └── Invoices
    │       │               │
    │       │               └── LineItems
    │       │
    │       └── Events ──────────────────────────────────► UsageRollups

    └── Metrics

Customer

A customer is an end-user, company, or account that you bill or pay out to.
FieldDescription
idMonigo-assigned UUID
external_idYour own ID for this customer (e.g. your database user ID)
nameDisplay name
emailContact email
phoneE.164 phone number (required for mobile money payouts)
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.
FieldDescription
event_nameWhat happened ("api_call", "storage_write")
customer_idWho did it
idempotency_keyUnique key that prevents double-counting on retries
timestampWhen it happened (can be backdated up to 90 days)
propertiesArbitrary key-value pairs for dimensions (region, endpoint, etc.)
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.
FieldDescription
event_nameWhich events this metric tracks
aggregationHow to aggregate: count, sum, max, minimum, average, unique
aggregation_propertyFor sum/max/min/average: the properties key holding the numeric value
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.
FieldDescription
nameHuman-readable label shown on invoices
currencyISO 4217 currency code (e.g. NGN, USD, KES)
plan_typecollection (billing customers) or payout (paying vendors/partners)
billing_perioddaily, weekly, monthly, quarterly, or annually
pricesOne or more pricing rules attached to metrics

Price

A price is one pricing rule attached to a plan. A plan can have multiple prices — one per metric.
FieldDescription
metric_idWhich metric this price applies to
modelPricing model: flat, tiered, volume, package, overage, weighted_tiered
unit_pricePrice per unit (for flat, package, overage models)
tiersTier definitions (for tiered, volume, weighted_tiered, overage models)
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.
FieldDescription
customer_idThe customer being billed
plan_idThe plan they’re subscribed to
statusactive, paused, or canceled
current_period_startStart of the current billing period
current_period_endEnd of the current billing period
trial_ends_atWhen the trial period ends (if any)
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.
FieldDescription
statusdraft, finalized, paid, or void
subtotalPre-tax total as a decimal string
totalFinal total including VAT (if enabled)
period_start / period_endThe billing period this invoice covers
line_itemsOne entry per metric/price pair
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.
FieldDescription
payout_methodbank_transfer or mobile_money
account_numberBank account number (for bank transfers)
mobile_money_numberPhone number in E.164 format (for mobile money)
is_defaultWhether this is the default account for payouts to this customer
Related: Event-Driven Payouts guide