Payouts API

Enable your customers to withdraw funds from their CashPay wallet directly to their mobile money or bank accounts. All payouts debit the CashPay user and credit your partner fleet account.

Overview

The Payouts API is the cornerstone of interoperability, allowing value to flow from the CashPay network to external financial systems like bank accounts and mobile money wallets.

Payout Flow (CashPay to Bank/Fintech):

  1. A CashPay user initiates a withdrawal to an account within your institution (e.g., a Rawbank account).
  2. Your backend calls the appropriate Payouts API endpoint with the transaction details.
  3. The CashPay system debits the user's CashPay wallet.
  4. Simultaneously, your **Partner Fleet Account is credited** with the corresponding amount.
  5. Your system receives a successful API response with a unique transaction reference. You can then safely credit your customer's bank account.

Payout to Mobile Money

POST/api/v1/b2b/payouts/mobile-money

Sends funds to a mobile money wallet (M-Pesa, Airtel, etc.).

cURL
curl -X POST 'https://api.cashpay-all.com/api/v1/b2b/payouts/mobile-money' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
  "recipient": {
    "phone": "243800000001",
    "name": "John Doe",
    "countryCode": "CD"
  },
  "amount": 50,
  "currency": "USD",
  "reference": "PAYOUT-001",
  "operator": "MPESA"
}'

Success Response

JSON
{
  "success": true,
  "message": "Payout processing initiated.",
  "transactionId": "MPESA_TXN_ABC123"
}

Payout to Bank Account

POST/api/v1/b2b/payouts/bank-account

Sends funds to a traditional bank account.

cURL
curl -X POST 'https://api.cashpay-all.com/api/v1/b2b/payouts/bank-account' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
  "recipient": {
    "accountNumber": "001122334455",
    "bankCode": "ECOCCDKI",
    "name": "Jane Smith",
    "countryCode": "CD"
  },
  "amount": 500,
  "currency": "USD",
  "reference": "PAYOUT-002"
}'