Intermediate WalletBilling

💰Wallet top-up and pay-as-you-go reconciliation

Understand SimSmsBox's wallet model — how to top up, the per-order charging rules, refunds on failure, and how to pull transactions for reconciliation, so finance and engineering agree on every cost.

✍️ SimSmsBox 📅 June 12, 2026

SimSmsBox uses a prepaid wallet + per-order charging model. This tutorial helps you fully understand “how the money is spent” so reconciliation is easy.

The billing model at a glance

  1. Top up the wallet first to create available balance;
  2. Each successful order is charged at that order’s unit price;
  3. Orders that never receive a code are refunded automatically — no charge;
  4. Every change is written to the wallet transaction log.

Core principle: no charge on failure. This makes bulk-operation cost predictable.

Step 1: Check the balance

curl https://api.simsmsbox.com/api/sms/wallet/balance \
  -H "X-API-Key: psk_xxx"

Response:

{ "balance": 128.50, "currency": "USDT" }

Step 2: Pull transactions for reconciliation

curl "https://api.simsmsbox.com/api/sms/wallet/txs?page=1&pageSize=50" \
  -H "X-API-Key: psk_xxx"

Each transaction typically contains:

FieldDescription
typerecharge (top-up) / charge / refund
amountAmount (positive = credit, negative = debit)
orderIdRelated order (present for charge/refund)
createdAtTimestamp

Step 3: Reconciliation approach

Aggregate transactions over a period by type:

Ending balance = Opening balance + Σ top-ups - Σ charges + Σ refunds

As long as this equation holds, the books are balanced. We recommend pulling and storing transactions on a daily schedule to build your own reconciliation table.

Set a low-balance alert

Bulk operations must avoid “running out of money halfway”. Add a rule to your monitoring:

if balance < threshold: trigger alert / auto top-up

Next steps

← Back to Tutorials