Billing & Wallet

Check the wallet balance, top up, and list payments and transactions.

Branofy Voice billing is a prepaid wallet. All amounts are in paise (minor currency units — ₹1 = 100 paise):

  • You top up the wallet; calls debit it at a per-minute rate, prorated per second of talk time.
  • New workspaces start with free trial minutes so you can test without a card — see Pricing & Billing for the current rate and trial credit.
  • When the balance can't cover a call, dispatch fails with HTTP 429 and INSUFFICIENT_WALLET_BALANCE.

Get billing summary

GET /v1/billing — wallet balance, plan, currency, and auto top-up settings.

const billing = await voice.billing.get();
// {
//   walletBalancePaise: 48400,
//   currency: "INR",
//   currentPlan: "free",
//   autoTopupEnabled: false,
//   lowBalanceThresholdPaise: 10000,
// }
billing = client.billing()
balance_rupees = billing["walletBalancePaise"] / 100

Top up the wallet

POST /v1/billing/topup creates a payment order. amount is in rupees (not paise). The response includes a Cashfree paymentSessionId — the payment is completed in the Cashfree checkout. The easiest way is the dashboard's Billing page, which opens the checkout for you; once the payment succeeds the wallet is credited automatically.

const order = await voice.billing.topup({ amount: 500 }); // ₹500
// order.paymentSessionId → complete the payment in the checkout
import os, requests

order = requests.post(
    "https://api.branofy.cloud/v1/billing/topup",
    json={"amount": 500},  # ₹500
    headers={"X-API-Key": os.environ["BRANOFY_VOICE_API_KEY"]},
).json()
# order["paymentSessionId"] → complete the payment in the checkout

Request

FieldTypeRequiredDescription
amountintegerYesTop-up amount in rupees (min 1).
customerPhonestringNoPhone number to attach to the payment order.
returnUrlstringNoURL the payment page returns to after checkout.

Response

FieldDescription
paymentIdPayment record id — shows up in the payments list.
paymentSessionIdCashfree payment session id used to open the checkout.
cashfreeOrderIdCashfree order id.
amountPaiseOrder amount in paise.
currencye.g. INR.

List wallet transactions

GET /v1/billing/transactions — the wallet ledger, newest first (up to 100). Call charges are debit entries with source: "call"; completed top-ups are credit entries with source: "topup". Each entry carries balanceAfterPaise so you can reconstruct the balance over time.

const { data } = await voice.billing.transactions();
transactions = requests.get(
    "https://api.branofy.cloud/v1/billing/transactions",
    headers={"X-API-Key": os.environ["BRANOFY_VOICE_API_KEY"]},
).json()["data"]

List payments

GET /v1/billing/payments — top-up payment orders and their status, newest first (up to 100). Use this to reconcile checkouts you opened via the top-up endpoint; the wallet is credited when a payment reaches completed.

const { data } = await voice.billing.payments();
payments = requests.get(
    "https://api.branofy.cloud/v1/billing/payments",
    headers={"X-API-Key": os.environ["BRANOFY_VOICE_API_KEY"]},
).json()["data"]

On this page