Get Balance
Endpoints
Get Balance
Returns merchant balance in cents
GET
Get Balance
Overview
Returns the current balance and overdraft limit for your merchant account. All amounts are returned in cents.Endpoint
Authentication
Your CashQ API Key for authentication
Request Example
Response
Balance information for the merchant account
Response Example
Understanding the Response
Balance Calculation
Your available funds =balance + overdraft
Example:
- Balance: 1000 cents ($10.00)
- Overdraft: 2000 cents ($20.00)
- Available funds: 3000 cents ($30.00)
When to Check Balance
Before Transfers
Check balance before initiating large transfers to ensure sufficient funds
Regular Monitoring
Monitor balance regularly to avoid insufficient funds errors
After Deposits
Verify balance after adding funds to your account
Error Recovery
Check balance when receiving insufficient funds errors
Error Responses
| Error Code | Description | Solution |
|---|---|---|
authentication_error | Invalid or missing API key | Verify your API key is correct and included in the header |
internal_server_error | Server error occurred | Retry the request after a brief delay |
Best Practices
Cache balance appropriately
Cache balance appropriately
Don’t check balance before every single transaction. Cache the balance for a reasonable time (e.g., 5 minutes) to reduce API calls.
Handle overdraft correctly
Handle overdraft correctly
Remember to include overdraft when calculating available funds. Don’t just check the balance field.
Convert to dollars for display
Convert to dollars for display
Balance is returned in cents. Always divide by 100 when displaying to users.
Monitor balance regularly
Monitor balance regularly
Set up automated monitoring to alert you when balance falls below a threshold.
Related Endpoints
Money Transfer
Initiate a money transfer after confirming sufficient balance
Check Transfer
Validate transfer details before execution
