Skip to content

Money ​

Every amount is an object with an integer number of minor units (kobo for NGN, cents for USD) and an ISO 4217 currency code.

DirectionShapeExample
Request{ "amountMinor": number, "currency": string }{ "amountMinor": 125000, "currency": "NGN" }
Response{ "amountMinor": string, "currency": string }{ "amountMinor": "125000", "currency": "NGN" }

125000 kobo is ₦1,250.00.

Why strings in responses ​

Balances and totals are 64-bit integers on the server. JavaScript numbers lose precision above 2^53, so responses send amountMinor as a decimal string. Parse it with BigInt (or your language's big-integer or decimal type), never with parseFloat.

ts
const minor = BigInt(balance.amountMinor);          // 125000n
const display = new Intl.NumberFormat("en-NG", {
  style: "currency",
  currency: balance.currency,
}).format(Number(minor) / 100);                     // Display only; NGN has 2 decimals

Rules ​

  • Never use floats for money, in storage or arithmetic. Do the arithmetic in minor units.
  • Currency always travels with the amount. Don't assume NGN.
  • Use the currency's own number of decimals for display (from the currencies lookup).
  • Fees are computed on the server and returned as their own amounts (fee, net), so the client never recomputes them.
  • Every money-moving request takes an Idempotency-Key.
  • Behind the API, every movement is a balanced double-entry ledger transaction. Receipts and history are derived from it, so they always add up.

Fees ​

Platform fees are a configurable percentage of gross:

ProductDefault fee
Mart sales15%
Fan funding10%
Live tickets15%
Live gifts20%
Superfan memberships10%
Beats and licences15%

Payment-provider fees (Hyparrow service fee and VAT) are shown at checkout. See Wallet & payments.

Plemuz API v2