Direct Collection API
Initiates a direct collection transaction to request funds from a specified account.
- URL:
/v1/payment/direct-collection
- Method:
POST
- Auth Required: Yes
- Request Body:
{
"reference_id": "abc12345678494850545900",
"amount": 650,
"trans_type": "PULL",
"currency": "UGX",
"product_id": 10012,
"phone": "256711111111",
"account_number": "256711111111"
} - Success Response:
{
"status": 202,
"message": "Collection request sent to payment provider",
"data": {
"trans_id": "887becb4-a414-4d57-89a4-82e099adb037",
"status": "PENDING"
}
} - Error Response:
{
"status": 400,
"message": "Invalid request",
"data": {
"error": "Invalid account number or insufficient funds"
}
}
Request Fields
reference_id
: Your unique reference for the transactionamount
: Amount to collecttrans_type
: Should be "PULL" for collectionscurrency
: Currency code (e.g., "UGX")product_id
: Product identifier for the collectionphone
: Phone number of the account to collect fromaccount_number
: Account number to collect from (same as phone for mobile money)
Response Fields
trans_id
: Unique transaction identifierstatus
: Transaction status (e.g., "PENDING")
Transaction Status
Possible transaction status values:
PENDING
: Transaction is being processedSUCCESS
: Transaction completed successfullyFAILED
: Transaction failed to complete