Skip to content
Preview. The Partners API is not live yet, so details on this page can change before launch.

Balance

Orders and top-ups are charged to your partner balance. The Business portal calls it your wallet, and you add funds there under Wallet. With a test key the balance is a virtual one that only exists in the sandbox.

GET /v1/balance

There are no parameters.

Terminal window
curl "$ESIMIFY_API_URL/v1/balance" \
-H "Authorization: Bearer $ESIMIFY_API_KEY"

200 OK

{
"balance": {
"amount": "999751.00",
"currency": "INR"
},
"low_balance_threshold": {
"amount": "5000.00",
"currency": "INR"
},
"mode": "test"
}
Field Type Nullable Description
balance Money No What you can spend now.
low_balance_threshold Money Yes The level below which a balance.low event is sent. null when no threshold is set, or it is set to 0. Then no balance.low event and no low-balance email is sent.
mode string No test or live, from the key you used.

This endpoint returns only the common errors.

  • low_balance_threshold is the value from the Business portal, under Settings. A new account has none. The same value is used for test and live keys.
  • Every Order carries balance_after, your balance right after the order was charged. If part of the order is refunded (refunded above 0), your balance is higher: call this endpoint for the current figure.
  • Subscribe to the balance.low webhook instead of polling. It is sent once each time an order or top-up takes your balance below the threshold. In live, the Business portal’s low-balance email is sent at the same moment. The sandbox sends the event only, measured against the virtual balance.
  • The sandbox balance starts at 1000000.00 INR and refills on its own when it drops below 10000.00 INR. See Sandbox.