Skip to main content
POST
Withdrawals (B2C)

Endpoint

Description

Initiates a fund transfer to the user’s DCash account. The transaction flow works as follows:
1

Transfer to DCash

Funds are transferred from your merchant account to the user’s DCash account
2

Withdraw to Provider

If payment provider is provided in the request, funds are withdrawn from the user’s DCash account and sent to the specified payment provider. Otherwise, the funds remain in the user’s DCash account
3

Complete

Transaction completes and response is returned

Body Parameters

string
Merchant-provided unique identifier for the transaction
string
Brief description of the withdrawal
string
Provider to process the withdrawal (e.g., “mpesa”, “airtel”)
string
required
User’s email address
number
required
Amount to withdraw
string
required
Currency code (e.g., “USD”)

Response

string
Unique identifier for the transaction
string
Merchant-provided reference ID (if provided)
string
Status of the transaction (e.g., “completed”)
number
Amount withdrawn
string
Currency code
number
Timestamp of completion (format: YYYYMMDDHHMMSS)

Example Request

Example Response

Important Notes

Ensure you have sufficient balance in your merchant account before initiating withdrawals.
Unlike deposits, withdrawals typically complete synchronously and return the full transaction details in the immediate response.

Use Cases

Common scenarios for B2C withdrawals:
  • Payouts: Sending earnings or rewards to users
  • Refunds: Processing refund requests
  • Cashouts: Allowing users to withdraw their balance
  • Disbursements: Distributing funds to multiple recipients

Error Codes