Skip to main content
POST
Deposits (C2B)

Endpoint

Description

Initiates a fund transfer on behalf of the user. The transaction flow works as follows:
1

Balance Check

System checks if the user has sufficient balance for the requested payment amount
2

Sufficient Balance

If balance is sufficient, the transfer is processed immediately and response is returned
3

Insufficient Balance

If balance is insufficient:
  • Payment Provider Check: Verifies whether payment_provider is specified in the request
  • No Provider Specified: Returns “insufficient balance” response
  • Provider Specified: Initiates a deposit transaction through the specified payment provider, returns “transaction pending” response, and once the deposit is successful, funds are transferred to the merchant account
4

Webhook Notification

The result is sent to the provided webhook URL. If no webhook URL is provided, the result is sent to the deposit webhook URL set on the merchant portal

Headers

string
required
Merchant API key for authentication
string
required
Bearer token of the authenticated userFormat: Bearer {token}

Body Parameters

string
required
Merchant-provided unique identifier for tracking
string
Description of the deposit transaction
string
Payment provider to use (e.g., “mpesa”, “airtel”)Must be one of the providers returned by the Get Payment Providers endpoint
number
required
Amount to deposit
string
required
Currency code (e.g., “USD”)
string
URL to receive transaction completion notification

Response

string
Unique identifier for the transaction
string
Merchant-provided reference ID (if provided)
string
Current status of the transaction (e.g., “pending”)
number
Amount of the transaction
string
Currency code

Example Request

Example Response

200 OK
When the transaction completes, you’ll receive a webhook notification with the final transaction status and additional details.

Error Codes