Orders
Product price plus delivery fee is deducted atomically when an order is created.
The key prefix is the environment switch. Test and live activity use separate balances and usage records.
test_* keys use the test wallet and mark created orders as test. live_* keys use real merchant funds and create live orders. Request bodies do not override the mode chosen by the key.
Product price plus delivery fee is deducted atomically when an order is created.
Returned product records are counted during the day and settled in one wallet entry.
Catalogue calls do not update the wallet inside the product request. Usage is aggregated by day and mode, then the previous day's product reads are settled at 1:00 AM Africa/Lagos. This keeps product browsing responsive and reduces transaction contention.
Order creation reads and updates the financial summary in the same transaction as the order and wallet entry. An insufficient balance returns an error without creating an order. Idempotency protects retries from a second deduction.