OI Payments Docs
Core concepts

Money & amounts

All monetary values are integer minor units (paisa). Never use floating point for money.

Every monetary value in the API — amountMinor, totalMinor, paidMinor, thresholds, line-item amounts — is an integer count of the currency's smallest unit (the minor unit). For BDT, the minor unit is the paisa, so:

Value (minor units)Means
10000100.00 BDT
255025.50 BDT
10.01 BDT

Never represent money as a float or a decimal string with a fractional part in requests. Send 2550, not 25.50. Floating-point rounding silently corrupts financial totals and breaks the double-entry ledger's balance invariant.

Converting for display

Convert to a human-readable amount only at the display edge, by dividing by the minor-unit scale (100 for BDT):

const display = (minor: number) => (minor / 100).toLocaleString("en-BD", {
  style: "currency",
  currency: "BDT",
});

display(10000); // "৳10,000.00" → i.e. 100.00 BDT shown with grouping

Keep amounts as integers everywhere else — in your database, in arithmetic, and on the wire.

Currency

currency is an ISO-4217 code (max 3 characters), defaulting to BDT when omitted. The minor-unit scale depends on the currency; for BDT it is 100.

On this page