Wallet ledger
Debit and credit ledger with the balance after each movement, plus gift grants. Payment instruments and secrets are never returned.
When to use it. Reconcile send usage with billing in your system.
Code example
Correct: Latest movements
curl --location 'https://raselsms.com/api/v2/account/wallet/transactions' \--header 'X-API-Key: YOUR_API_KEY'Response example
200 — Latest movements
{ "success": true, "data": { "transactions": [ { "id": "6800bbb123def4567890aaaa", "amount": 0.12, "type": "debit", "source": "usage", "description": "SMS send", "balanceAfter": 4.88, "messageCount": 1, "createdAt": "2026-07-20T14:22:00.000Z" } ], "total": 1, "balance": 4.88, "skip": 0, "limit": 100 }}401 — Missing or invalid API key.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "UNAUTHORIZED", "error": "Missing or invalid API key"}403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "FORBIDDEN", "error": "Phone not verified or missing permission"}429 — Rate limit exceeded. Honor Retry-After when present.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "RATE_LIMITED", "error": "Rate limit exceeded", "retryAfterSeconds": 30}HTTP request
GET /api/v2/account/wallet/transactions
Request Headers
| Header | Type | Description |
|---|---|---|
| X-API-Key | string | Your Rasel API key. Send it on every documented request except inbound webhooks. * |
Query parameters
| Field | Type | Description |
|---|---|---|
| skip | integer | Number of rows to skip. Default 0. |
| limit | integer | Page size. Typical range is 1-50 for conversation context and 1-500 for account lists. |
| fromDate | string | Inclusive start date filter (YYYY-MM-DD). |
| toDate | string | Inclusive end date filter (YYYY-MM-DD). |
| type | credit | debit | Filter value. On chats: all, direct, or group. On wallet movements: credit or debit. |
| source | admin_topup | usage | topup_request | default_plan_bonus | trial_balance | admin_withdrawal | subscription_refund | subscription_payment | coupon | send_failure_refund | Wallet movement source such as usage, admin_topup, or topup_request. On media upload it is the stored asset origin. |
Response Fields
| Field | Type | Description | Example |
|---|---|---|---|
| success | boolean | True when the operation succeeded, or when at least one batch recipient succeeded. | |
| data | object | Primary payload for list and snapshot endpoints. | |
| data.transactions | json | Paged wallet debit and credit rows. | |
| data.freeMessageGrants | object | Complimentary admin gift message grants. | |
| data.freeMessageGrants.summary | object | Totals for complimentary message grants on this account. | |
| data.freeMessageGrants.summary.totals | object | Granted, consumed, reserved, withdrawn, and remaining gift messages. | |
| data.freeMessageGrants.summary.totals.granted | number | Gift messages that were issued. | |
| data.freeMessageGrants.summary.totals.consumed | number | Gift messages that were already used. | |
| data.freeMessageGrants.summary.totals.reserved | number | Gift messages held for sends that are still in flight. | |
| data.freeMessageGrants.summary.totals.withdrawn | number | Gift messages removed by an admin. | |
| data.freeMessageGrants.summary.totals.remaining | number | Gift messages that are still unused. | |
| data.freeMessageGrants.summary.totals.activeRemaining | number | Remaining messages on grants that are still active. | |
| data.freeMessageGrants.summary.activeGrantCount | integer | Number of grants that are still active. | |
| data.freeMessageGrants.summary.grantCount | integer | Total number of grants, including inactive ones. | |
| data.freeMessageGrants.summary.byScope | json | Remaining gift messages grouped by channel or scope. | |
| data.freeMessageGrants.grants | json | Individual complimentary message grants. | |
| data.total | integer | Total matching rows. | |
| data.balance | number | Wallet balance after the latest movement or current snapshot. | |
| data.skip | integer | Number of rows to skip. Default 0. | |
| data.limit | integer | Page size. Typical range is 1-50 for conversation context and 1-500 for account lists. |
Status Codes
| Status | Description |
|---|---|
| 200 | Success. |
| 401 | Missing or invalid API key. |
| 403 | Phone not verified, missing permission, or the account cannot perform this action. |
| 429 | Rate limit exceeded, or the maximum number of verification attempts was reached. |
Try it
Parameters
Number of rows to skip. Default 0.
Page size. Typical range is 1-50 for conversation context and 1-500 for account lists.
Inclusive start date filter (YYYY-MM-DD).
Inclusive end date filter (YYYY-MM-DD).
Filter value. On chats: all, direct, or group. On wallet movements: credit or debit.
Wallet movement source such as usage, admin_topup, or topup_request. On media upload it is the stored asset origin.
Request
GET /api/v2/account/wallet/transactions?skip=0&limit=100&fromDate=2026-01-01&toDate=2026-06-30&type=debit&source=usageResponse
Send a request to see the response.