Verified BursaPay payout workflow: Explains how Finance prevents concurrent approval or decline operations from racing each other.
1. Overview & Purpose
Approval and decline views load withdrawal records with select_for_update inside transaction.atomic, serializing concurrent mutations on the same request.
2. Requirements & Setup
The action must run through the Finance mutation endpoint.
3. Step-by-Step Workflow
- Open Finance > Withdrawals and select the relevant request type.
- Review the request state, amount, wallet or settlement context.
- Perform the permitted approval, decline or investigation action.
- Confirm the resulting status, ledger/audit record and notification state.
4. Rules & Troubleshooting
Locking protects the request state check so two workers cannot both treat the same pending request as untouched.
5. Verification & Next Steps
When diagnosing duplicate processing concerns, inspect the transaction boundaries and locked query path first.