Skip to content

Fees

Tables live in src/cedikit/fees/tables/. Every rule records its evidence. The operator rules come from real messages, not official tariffs; verify them before relying on them. Unknown fees are None, never guessed.

cedikit.fees

Estimate Mobile Money fees and the E-Levy from dated, sourced tables.

Results are always estimates: charges change, and the tables record only what has been observed or published. Unknown values are None, never guessed.

Example

from datetime import date from cedikit import fees fees.estimate("MTN", "cash_out", "50.00").fee Decimal('0.50')

FeeEstimate dataclass

An estimate of what a transaction costs. None means unknown.

basis explains where each number came from.

total property

Fee plus tax, or None if either is unknown.

estimate(network, kind, amount, on=None, *, sent_earlier_today=0)

Estimate the fee and E-Levy for a transaction.

Parameters:

Name Type Description Default
network str

"MTN" or "TELECEL" (case-insensitive).

required
kind Kind

What the transaction is, e.g. "cash_out" or "send_other_network".

required
amount AmountLike

The transaction amount.

required
on date | datetime | None

The transaction date (default: today). Historical dates use the rules in force then.

None
sent_earlier_today AmountLike

Transfers already made that day, for the E-Levy's daily exemption in 2022.

0
Example

e = estimate("telecel", "send_other_network", "40.00", date(2026, 9, 25)) e.fee, e.tax (Decimal('0.20'), Decimal('0.00'))