Credits
Fund a client at a rate you choose, track your margin, and take unused minutes back. Two rates move on every transfer.
You hold a balance. You move minutes from it to a client at a rate you choose, and you can take unused minutes back. The gap between what you pay and what you charge is your margin.
Two different amounts move on every transfer: your balance is debited at your rate, and the client is credited at the rate you set. A revert is the exact mirror.
Preview a transfer
Nothing moves on this call. Use it to confirm the amounts before you commit.
POST /api/v1/reseller/credits/calculate
{ "minutes": 100, "cost_per_min": 0.20 }Transfer minutes to a client
Your balance is debited immediately. A cost_per_min below your own rate is refused as
a loss.
POST /api/v1/reseller/credits/transfer
{ "to_organization_id": 5678, "minutes": 100, "cost_per_min": 0.20 }Take unused minutes back
Pass only how many. No rate: the client is deducted at its current rate, which is what it was charged, and you are refunded at yours, which is what it cost you.
POST /api/v1/reseller/credits/revert
{ "from_organization_id": 5678, "minutes": 40 }Read the ledger
Every move is recorded.
GET /api/v1/reseller/credits/logs