Overview
Retrieve SMS and OTP balances and feature limits for your project.Endpoint
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
SMS.balance | number | Remaining SMS credits or parts available |
SMS.limit | number | SMS monthly/project limit |
OTP.balance | number | Remaining OTP credits |
OTP.limit | number | OTP plan limit |
Payment Methods Array
Each payment method object contains:| Field | Type | Description |
|---|---|---|
type | string | Payment type: wallet or subscription |
balance | number | Available balance (wallet only) |
remaining_sms | integer | Remaining SMS credits (subscription only) |
total_sms | integer | Total SMS in plan (subscription only) |
status | string | Status: active, inactive, expired |
renewal_date | string | Next renewal date (subscription only) |
Recent Transactions Array
Each transaction object contains:| Field | Type | Description |
|---|---|---|
transaction_id | string | Unique transaction identifier |
type | string | Transaction type |
amount | number | Transaction amount (negative for charges) |
description | string | Human-readable description |
timestamp | string | When the transaction occurred |
message_id | string | Related message ID (for SMS charges) |
payment_method | string | Payment method used (for top-ups) |
Transaction Types
| Type | Description |
|---|---|
sms_charge | Charge for sending SMS |
otp_charge | Charge for OTP service |
top_up | Manual balance top-up |
auto_recharge | Automatic balance recharge |
refund | Refund for failed messages |
adjustment | Manual balance adjustment |
Error Responses
401 Unauthorized
403 Forbidden
Use Cases
Balance Monitoring
Monitor account balance to ensure uninterrupted service
Cost Tracking
Track SMS costs and usage patterns
Billing Integration
Integrate balance information into billing systems
Auto-Recharge Setup
Configure automatic balance top-ups
Implementation Examples
Balance Monitoring
Cost Tracking Dashboard
Best Practices
Regular Monitoring
Check balance regularly to avoid service interruption
Set Up Alerts
Configure low balance alerts and auto-recharge
Track Spending
Monitor spending patterns to optimize costs
Backup Payment
Have backup payment methods configured