Inbound cost metering
Outbound sends and inbound traffic run through the same pricing engine. A send resolves a price and debits your wallet in the same breath; a received SMS or MMS is now charged the same way, as it arrives, at exactly what the carrier charged for it. In short: received SMS and MMS are charged at the carrier’s cost, with no markup. Received voice minutes are priced and reported. This page is the model for that inbound side — what is charged, whatGET /api/v1/usage/inbound-cost reports, and what to reconcile it
against.
1. Received messages are charged at cost
Every received SMS and MMS is charged to your wallet. The amount is exactly what the carrier charged for that message — a pass-through, with no markup and no platform fee. A single-part message that costs the carrier $0.0040 costs you $0.0040; a message with a carrier surcharge costs you the carrier’s total, surcharge included. How the charge behaves:- Sub-cent amounts are exact. Your wallet holds whole cents, but a received message often costs a fraction of one. Those fractions accumulate, and a cent leaves your wallet each time they add up to a whole cent, so over any stream of messages you pay the true price to within one cent. A $0.0040 message is never rounded up to a cent.
- It lands after the message does. The message is stored and delivered to your inbox, routing, and webhooks first; the charge follows. A pricing problem or an empty wallet never delays, blocks, or drops a received message — that message simply stays uncharged.
- A retry never charges twice. If a delivery is repeated, the message is charged once.
- Each charge is a ledger entry. It appears in your wallet transaction history as a received-message charge, and the message record carries the amount it was charged.
- Where an amount comes from. When the carrier reports the cost of a message, that exact figure is charged. Otherwise the message is priced from your inbound rate for the number that received it, multiplied by the message’s segments. If no inbound rate exists for your account, the message is delivered and not charged — Orbit never invents a price.
- Your own pricing still applies. An organization-specific price, including a $0 bundled price, replaces the standard rate.
- Outbound meters. The send path writes one usage record and debits the wallet synchronously — the loop described on the usage metering pipeline.
- Received messages are charged, then reported. The report sums what your wallet was actually charged for received SMS and MMS in the window, so it always equals your balance movement for those messages.
- Inbound voice is rated at request time. The report aggregates
received calls from
call_logsand prices those minutes on demand for the window you ask for.
2. The response contract
One request covers one window and answers with one total plus one line per channel that carried received traffic:periodlabels the window (aYYYY-MMcalendar month by default).range.from/range.toare the exact half-open interval the lines aggregate, so two reports can always be compared by interval.currencyis the ISO-4217 code of your wallet currency — the same currency every other billing surface reports in, so this figure can never disagree with your balance about which currency it speaks.lines[]carries one entry per channel with received volume: thechannel(sms,mms,voice), the billingunit(next section), thequantityin that unit, the per-unitunit_price_cents, the line totalcost_cents, and thepricing_sourceattribution (section 4). Lines are ordered most-expensive first.- Received-message lines (
sms,mms) add the counts and the exact amount:message_countis every message received in the window (equal toquantity),charged_countis how many of them were charged, andcost_micro_centsis the exact total charged in micro-cents (1 cent = 1,000,000), the sub-cent figure behind the roundedcost_cents. Theirpricing_sourceischarged, because the amount is what was charged, not a re-rating.
total_cost_cents is
the exact sum of the per-line cost_cents values, and there is no sub-cent
drift between the breakdown and the total. Per-unit prices may carry
sub-cent precision (0.8 above); each line rounds to whole cents once, and
the total adds those rounded lines.
The window itself is chosen with a calendar month, a rolling window, or an
explicit from/to pair — the same options as the rest of usage reporting;
the API reference carries the full parameter contract.
3. The two billing units received traffic uses
Inbound traffic bills on exactly two units:per_message— received SMS and MMS. Each received message counts as one inquantity, and what it costs is what the carrier charged for it, which already reflects the number of parts the carrier billed. A long message that arrives in several parts therefore costs more than a short one, exactly as the carrier bills it; see SMS segments and encoding for how parts are counted.per_minute— inbound voice. Each received call rounds up to the next whole minute (a 61-second call bills as two minutes), mirroring how carriers bill termination;quantityis the sum of those rounded minutes over the window.
4. The same resolution chokepoint, with direction “mo”
Pricing inbound traffic uses the same rate-resolution step as pricing a send —resolvePrice(), the chokepoint documented on
pricing and rate resolution — with the
direction set to "mo" (mobile-originated / inbound). Inbound voice lines
wildcard the country to *, which resolves the global inbound rate for the
channel; the report shares the batched ladder read
(resolveBaseRatesBatch()) so every voice rate shape resolves in one pass.
A received message with no carrier-reported cost is charged from the same
ladder, using the country of the number that received it.
Because both passages share the ladder, each rated line’s pricing_source
names the rung that produced its unit price, using the same attribution
labels as outbound rating (received-message lines report charged, since
they show what was charged rather than a re-rating):
org_markup— the base inbound rate marked up by your organization’s own override.default_markup— the base inbound rate with the platform-default markup.fallback— no inbound rate row matched the channel yet, so the per-channel fallback price was used; the report therefore works before per-country inbound rate sheets exist.absolute_override— an absolute per-unit price set for your organization, verbatim.
5. Reporting-only invariants
Reading the report is reporting-only, and three guarantees define it:- A report request never mutates the wallet. No debit row, no credit deduction, no authorize/capture hold — calling the endpoint cannot change your balance. The charge for a received message happens once, when the message arrives, never when you read the report.
- It never calls a provider. The report is a pure read of persisted volume and charges, plus the rate ladder for voice.
- Received-message lines reconcile to your wallet. Each line sums the
charges recorded on your received messages, so it equals the wallet
movement for them — see
the wallet ledger audit trail,
where each charge is a row you can point at. A voice line is re-derived
instead: filter your received calls to the same
range, count carrier-rounded minutes, and multiply by the line’sunit_price_cents.
6. Where this page sits in the billing family
- The usage metering pipeline — the outbound loop. Its aggregation stage already counts inbound rows (its counter rollups name “sms-inbound, sms-outbound” alongside voice), but stops at counts; this page is the cost side of those inbound counts.
- Pricing and rate resolution — the precedence ladder both directions resolve through, and the home of the attribution labels.
- Wallets, credits, and charges — the append-only ledger the inbound plane deliberately never writes.
7. Where to see it live
- Dashboard. The Billing → Usage page shows received-traffic cost next to your outbound spend.
- API.
GET /api/v1/usage/inbound-costreturns the report for your tenant. - Guide. Inbound traffic cost metering walks worked endpoint calls and reads a breakdown end to end.