Endpoint
POST /api/v1/distributors/{distributorID}/operations
Authentication
Bearer token with your API key. Must have Perform Operations permission.
Path Parameters
The unique identifier of the distributor. Must match the distributor ID associated with the API key.
Request Body
Cash-In Operation
Amount to credit to the destination wallet (e.g., “5000.00”)
End user’s mobile phone number in international format (e.g., “+234 8123456781”). Required when cashing in to an individual wallet. Cannot be used together with merchantToShortCode.
Merchant’s short code number (e.g., “100000”). Required when cashing in to a merchant wallet. Cannot be used together with phoneTo.
Optional reference note or description for the operation (e.g., “Receipt #1234”, “Customer deposit”).
For cash-in operations, you must provide either phoneTo (individual wallet) or merchantToShortCode (merchant wallet), but not both.
Cash-Out Operation
Must be "cash-out-fulfillment"
Amount to debit from the user’s wallet (e.g., “3000.00”)
End user’s mobile phone number in international format (e.g., “+234 8123456781”)
Type of fulfillment. Currently only "cash" is supported.
Receipt or reference ID for the cash-out transaction
Optional reference note or description for the operation.
Response
Unique identifier for the created operation
Cash-In (Individual) cURL
Cash-In (Merchant) cURL
Cash-Out cURL
Cash-In (Individual) Node.js
Cash-In (Merchant) Node.js
Cash-Out Node.js
curl -X POST "https://api.yourdomain.com/api/v1/distributors/36e48800-22ce-4ea0-b37a-198f7978cd53/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "cash-in",
"amount": "5000.00",
"phoneTo": "+234 8123456781",
"memo": "Cash deposit - Receipt #1234"
}'
200 Success
400 Bad Request - Invalid Amount
403 Forbidden - Insufficient Permission
403 Forbidden - Transaction Limit Exceeded
403 Forbidden - Daily Volume Exceeded
403 Forbidden - Insufficient Balance
400 Bad Request - Invalid Merchant Code
400 Bad Request - Conflicting Destination
{
"operationID" : "op_8b7c9d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
}
Validation Rules
The API validates the following before creating an operation:
Must have Perform Operations permission
Distributor ID must match the key’s associated distributor
Must be a valid decimal number
Must be greater than 0
Cannot exceed API key’s max transaction amount (if set)
Sum of today’s operations + this operation cannot exceed key’s daily volume limit (if set)
For individual wallets : phoneTo must be in international format (e.g., +234 8123456781) and belong to a registered user
For merchant wallets : merchantToShortCode must be a valid, existing merchant short code
You must provide exactly one of phoneTo or merchantToShortCode for cash-in operations
Cash-In : Distributor must have sufficient balance
Cash-Out : User must have sufficient wallet balance
Maker-Checker Workflow
Operations created via API follow the maker-checker approval pattern. The operation is created in a pending state and requires approval by a checker before execution.
After creating an operation:
Operation is saved with status pending
A checker with appropriate permissions must approve it via the web interface
Once approved, the operation is executed on the blockchain
The operation status changes to completed or failed
Get Balance Check distributor balance before creating operations
Get Operations Query operation history and status