Skip to Content

Credits

const balance = await client.credits.balance() console.log(balance.accountId, balance.balance) const history = await client.credits.history({ page: 1, perPage: 25 }) for (const txn of history) { console.log(txn.type, txn.amount, txn.balanceAfter, txn.description) }
GET /v1/credits/balance GET /v1/credits/history

When the balance runs out, sends fail with 402 (SendAfricaError with isInsufficientCredits) — see Errors. Top up with Payments.

Last updated on