Credits
balance = client.credits.balance()
print(balance.balance, balance.account_id)
history = client.credits.history(page=1, per_page=25)
for txn in history:
print(txn.type, txn.amount, txn.balance_after, txn.description)balance() returns a CreditBalance with account_id and balance (integer credit count). history() returns the paginated credit ledger.
When the balance runs out, sends fail with InsufficientCreditsError (HTTP 402) — see Errors. Top up with Payments.
Last updated on