Disbursement Process Flow
This guide explains the complete disbursement flow using the Payfonte API, which involves three main steps: validating a transfer recipient, requesting a disbursement, and verifying the disbursement.Overview
The disbursement process enables you to send money to recipients through various providers including bank transfers and mobile money. The flow ensures security and accuracy by validating recipients before processing transfers.Prerequisites
- Valid API credentials (
client-idandclient-secret) - Sufficient wallet balance for the disbursement
- Disbursement PIN (for authorization) or Authorization URL
- Access to the Payfonte API (Sandbox or Production)
Step 1: Validate a Transfer Recipient
Before initiating a disbursement, you must validate the transfer recipient to ensure the account details are correct.1.1 Fetch Provider Properties (Optional)
Some providers require additional properties (e.g., bank codes, mobile network identifiers). Fetch these if needed: Endpoint:GET /billing/v1/transfer-recipients/{provider}/properties
Parameters:
provider- The provider slug (e.g.,paystack-bank-transfer-ng,wave-ivory-coast)
1.2 Validate the Transfer Recipient
Create and validate the transfer recipient account details. Endpoint:POST /billing/v1/transfer-recipients/validate
Request Body:
For Bank Transfer:
transferRecipientId from this response (found in the database record). You’ll need it for the next step.
Step 2: Request a Disbursement
Once you have a validated transfer recipient, you can initiate the disbursement. Endpoint:POST /billing/v1/disbursements
Request Body:
transferRecipientId(required) - ID from the validation stepamount(required) - Amount in the lowest denomination (e.g., 100000 = 1,000.00)reference(optional) - Your unique transaction reference. If not provided, one will be generatednarration(optional) - Description of the transferpin(required*) - Your disbursement PIN for authorizationwebhookURL(optional) - Override webhook URL for this transaction
queued- Disbursement is queued for processingrejected- Disbursement was rejected by the platformprocessing- Disbursement is being processedsuccess- Disbursement completed successfullyfailed- Disbursement failed
Step 3: Verify the Disbursement
After requesting a disbursement, verify its status to confirm successful completion. Endpoint:GET /billing/v1/disbursements/verify/{reference}
Parameters:
reference- The transaction reference from Step 2
Best Practices
- Always validate recipients first - This prevents failed transfers due to incorrect account details
- Store transfer recipient IDs - Reuse validated recipients for future disbursements
- Use unique references - Generate unique references for each transaction to avoid duplicates
- Implement webhooks - Set up webhook endpoints to receive real-time status updates
- Verify disbursements - Always verify the final status, especially for critical transactions
- Handle errors gracefully - Implement retry logic with exponential backoff for failed requests
- Monitor wallet balance - Ensure sufficient funds before initiating disbursements
- Secure your PIN - Never expose your disbursement PIN in client-side code