The Problem
When you send an SMS and your balance is deducted, what happens if the SMS fails to send? You've lost money.
Our Solution
We wrap every billable operation in a database transaction:
- Start transaction
- Check balance
- Deduct balance pessimistically
- Call external API
- If success: commit. If fail: rollback
Your wallet is never charged for failed operations.