1. Express Deposits (C2B)
Koba Documentation
  • Introduction
  • Definitions
    • Data Types
    • Remittance / Payouts Callback Overview
    • C2B / Payins Callback Overview
    • Koba Transactions Response Codes for Payouts
    • MCCMNC Codes
    • API Credentials
  • Authorization
    • Overview
    • Token Request
      POST
    • Find Transaction Routes
      GET
    • Health Check
      GET
  • Payouts
    • Overview
    • Payment Order Request Information
    • Mobile Money Requests (B2C)
      • Overview
      • Mobile Transfers- Safaricom (M-Pesa)
      • Mobile Transfers - Airtel Money
    • Payment Order Requests - Business Transfers
      POST
    • Payment Order Requests - Bank Transfers
      POST
    • Find Payment Order By OriginatorConversationId
      GET
    • Reject Order By OriginatorConversationId
      POST
  • Pay-Ins
    • Payment Links
      • Overview
      • Create Payment Link
      • Find Payment Links By Id
      • Update Payment Link
    • Express Deposits (C2B)
      • Overview
      • Express Deposit Request
        POST
      • Find Express Deposit By OriginatorConversationId
        GET
  • Account Validation
    • Overview
    • Account Number Validation Request
      POST
    • Find KYC Status by SystemTraceAuditNumber
      GET
    • Account Validation
      POST
    • Find Account Validation Status by SystemTraceAuditNumber
      GET
  • Platform Services
    • Customer Accounts
      • Balance Check
      • Find Charges By TransactionTypeId
  1. Express Deposits (C2B)

Express Deposit Request

POST
/v1/express-deposit
===============================================================
**DISCLAIMER: Kindly note that this service will send TWO callbacks for Safaricom Requests.
Callback #1 – Final Transaction Status
Callback #1 contains the final status of the Express Deposit request, including the relevant transaction details and parameters from the original request. Integrators MUST rely on this callback to finalize the transaction and complete the checkout flow.
Callback #2 – Reconciliation and Transaction Logging
Callback #2 is intended for reconciliation and transaction logging. It may arrive later or may not be received at all. It is not required to complete the transaction.
Important: Receiving only Callback #1 is expected behavior. Integrators MUST NOT wait for Callback #2 to complete a transaction. Refer to the C2B Callback Overview section for the structure of both callbacks.
===============================================================
NOTE: The type, SuccessRedirectUrl, FailedRedirectUrl and ServiceCode fields are mandatory for transactions made to Zambia.

Sample Safaricom C2B Request#

{
 "OriginatorConversationId" : "{{$guid}}",   // Mandatory  - Must be unique with each request
 "ShortCode" : "648732",   //Mandatory- Shortcode will be provided by us
 "Amount" : "1",   //Mandatory  
 "PhoneNumber" : "254719000000",   //Mandatory - A valid Safaricom phone number
 "TransactionDesc": "Deposit to wallet",   //  Mandatory - Not more than 30 characters
 "Currency" : "KES",   //  Mandatory
 "AccountNo": "00324-{unique reference not more than 12 characters}" // Mandatory  eg. "00324-XC7UL3JKJNO",   AccountNo will be provided by us 
"type": 0,  // Mandatory   - use 0 for  Safaricom
 "CallBackUrl" : "https://eo2j2658kmohqiy.m.pipedream.net",   // Mandatory
 "mccmnc": "63902",   // Optional-  Safaricom MCCMNC Code if Safaricom request
"successRedirectUrl": "https://guidgenerator.com/",  // Optional
  "failedRedirectUrl": "https://guidgenerator.com/",  //Optional 
  "serviceCode": "ZAMUPAYCOLLECTIONS", //optional
"firstName": "John",  //Optional
    "lastName": "Doe"  //Optional
 }

Sample success response:#

{
    "message": {
        "appDomainName": "LIVE",
        "remarks": "Express Deposit submission accepted",
        "originatorConversationId": "r279b231rf89238723489733ygge998121",
        "systemConversationId": "16780000-a97d-3024-2e57-08d937173800",
        "timestamp": "2021-06-24T13:51:51.3331004Z"
    }
}

Sample failed response:#

{
  "appDomainName": "LIVE",
  "timestamp": "2022-02-11T10:13:11.2483928Z",
  "systemConversationId": "16780000-a97d-3024-98a9-08d9ed471bab",
  "originatorConversationId": "W93323321ei4455t40093334xxiuigggtey",
  "errors": [
    {
      "field": "OriginatorConversationId",
      "message": "duplicate originator conversation id 'W93323321ei4455t40093334xxiuigggtey'"
    }
  ]
}

Sample validation errors response:#

{
  "appDomainName": "LIVE",
  "status": "BadRequest",
  "timestamp": "2022-02-11T10:13:11.2483928Z",
  "systemConversationId": "16780000-a97d-3024-98a9-08d9ed471bab",
  "originatorConversationId": "W93323321ei4455t40093334xxiuigggtey",
  "errors": [
      {
        "field": "ShortCode",
        "message": "The Shortcode field is required."
      }
  ],
}
The required Json body contains :

ShortCode: This is the credit party in the transaction
Amount: This is the amount to be debited
PhoneNumber: This is the debit party in the transaction
AccountNo: This is a nullable field only to be provided if it's a paybill express deposit
TransactionDesc: This is a brief description of the transaction
OriginatorConversationId: This is a unique identifier for the transaction from the client
CallBackUrl: This is your callback url
Type : This is a description of the C2B type
SuccessRedirectUrl : This is the success callback url
FailedRedirectUrl : This is the failed callback url
ServiceCode : This is the code describing the service
Currency : This is the currency of the country
FirstName: This is the first name of the debit party
LastName: This is the last name of the debit party

Data definition#

Field NameData TypeMax Length
ShortCode
string
7
Amount
decimal
8
PhoneNumber
string
13
TransactionDesc
string
100
OriginatorConversationId
string
100
CallBackUrl
string
256
Type
string
3
SuccessRedirectUrl
string
256
FailedRedirectUrl
string
256
ServiceCode
string
6
Currency
string
6
FirstName
string
128
LastName
string
128

Request

Authorization
Body Params application/json

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/express-deposit' \
--header 'Content-Type: application/json' \
--data '{
    "OriginatorConversationId": "{{$guid}}",
    "ShortCode": "172170",
    "Amount": "1",
    "PhoneNumber": "254716465401",
    "TransactionDesc": "Deposit to wallet",
    "Currency": "KES",
    "AccountNo": "01770-254716465401",
    "type": 0,
    "CallBackUrl": "https://eo2j2658kmohqiy.m.pipedream.net"
}'
Response Response Example
{
    "message": {
        "appDomainName": "LIVE",
        "remarks": "Express Deposit submission accepted",
        "originatorConversationId": "r279b231rf89238723489733ygge998121",
        "systemConversationId": "16780000-a97d-3024-2e57-08d937173800",
        "timestamp": "2021-06-24T13:51:51.3331004Z"
    }
}
Modified at 2026-10-28 13:34:05
Previous
Overview
Next
Find Express Deposit By OriginatorConversationId
Built with