Standard Payment Flow
Step-by-Step Flow
1
1. Create Recipient (Optional)
If recipient doesn’t exist, create recipient record with bank account details.
2
2. Initiate Payment
Create payment quote by calling the initiate endpoint.
3
3. Review Quote
Review the payment quote including:
- Payment amount
- Fees breakdown
- Exchange rate (if applicable)
- Total amount to deduct
- Quote expiration time
4
4. Confirm Payment
Confirm the payment using quote ID and reference.
5
5. Payment Processing
Pooler processes the payment:
- Validates payment details
- Checks account balance
- Selects payment route
- Initiates transfer through payment network
6
6. Payment Completion
Payment is completed and recipient receives funds.
Payment States and Transitions
State Descriptions
| Status | Description |
|---|---|
initiated | Payment quote created Waiting for confirmation Quote expires after 5 minutes |
pending | Payment confirmed Awaiting processing Funds reserved |
processing | Payment being processed Transfer initiated through payment network Cannot be cancelled |
completed | Payment successfully completed Recipient received funds Final state |
failed | Payment processing failed Funds returned (if deducted) Can retry with new payment |
rejected | Payment was rejected May be due to compliance or validation Funds returned |
Error Handling
Common Errors and Handling
Insufficient BalanceError Flow Diagram
Webhook Events in Payment Flow
| Event | Description |
|---|---|
payment.initiated | Fired when payment quote is created Contains quote details |
payment.completed | Fired when payment is successfully completed Contains final payment details |
payment.failed | Fired when payment processing fails Contains error information |
payment.rejected | Fired when payment is rejected Contains rejection reason |
Webhook Handling Example
Payment Retry Strategies
When to Retry
Retry payments in these scenarios:| Scenario | Description |
|---|---|
| Network Errors | Temporary network issues |
| Timeout Errors | Request timeouts |
| Rate Limiting | Rate limit errors (with backoff) |
| Temporary Failures | Transient service errors |