Append-only ledger
Each movement is an immutable line. No DELETE, no silent UPDATE — corrections go through explicit compensation writes.
ACID ledger, Mobile Money payouts
Each payment credits a wallet. Each payout debits. All writes are ACID (pessimistic lock + atomic transaction), and a /v1/wallets endpoint exposes the balance + signed history.
Each movement is an immutable line. No DELETE, no silent UPDATE — corrections go through explicit compensation writes.
Pessimistic lock on the wallet + atomic transaction. A crash mid debit-then-credit never produces an inconsistent balance — the database rolls back automatically.
POST /v1/marketplace/payouts → immediate wallet debit (PENDING) → async worker sends to Mobile Money provider → COMPLETED or FAILED + atomic re-credit.
Our internal service continuously verifies that sum(credits) − sum(debits) == current balance. Any drift is immediately detected and alerts our Ops team.
curl https://api.saalapay.com/v1/wallets/me \
-H "X-SP-Signature: $HMAC_SIGNATURE"
# Réponse
{
"data": {
"balance": 12450000,
"currency": "XOF",
"last_movement_at": "2026-05-04T20:32:00+00:00",
"ledger_url": "/v1/wallets/me/ledger?limit=50"
}
}
# Et pour l'historique signé (audit-grade)
curl https://api.saalapay.com/v1/wallets/me/ledger?limit=50 \
-H "X-SP-Signature: $HMAC_SIGNATURE"
The wallet is created automatically on your first payment.