1. Express Deposits
Almara Pay Documentation
  • Introduction
  • Definitions
    • Data Types
    • Error Codes
    • MCCMNC Codes
  • Authorization
    • Overview
    • Token Request
      POST
    • Find Transaction Routes
      GET
    • Health Check
      GET
  • Payouts
    • Overview
    • Payment Order Request Information
    • Mobile Money Requests
      • 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
      • Overview
      • Express Deposit Request
        POST
      • Find Express Deposit By OriginatorConversationId
        GET
    • C2B IPN (Callback)
      • C2B IPN Overview
  • Card Payments
    • Overview
    • Checkout Order Request
      POST
    • Query Checkout Request
      GET
    • Checkout Callback Request
      POST
  • Account Validation
    • Overview
    • Account Number Validation Request
    • Find KYC Status by SystemTraceAuditNumber
    • Account Validation
    • Find Account Validation Status by SystemTraceAuditNumber
  • Platform Services
    • Airtime Purchase
      • Overview
      • Airtime Purchase
      • Find Airtime Purchases By OriginatorConversationId
    • Customer Accounts
      • Balance Check
      • Find Charges By TransactionTypeId
    • Bill Payments
      • Overview
      • Bill Request Validation
      • Bill Request Payment
      • Find Bill Services
      • Find Bill Number By Service Id and Account Number
      • Find Bill Request By Originator Converstion Id
      • Bill Number
  1. Express Deposits

Express Deposit Request

POST
/v1/express-deposit
===========================================================================
DISCLAIMER: Kindly note that this service will send two callbacks. ONLY rely on the second callback for the final status of the transaction. DO NOT rely on the first one. Refer to C2B IPN for the structure of the second callback
============================================================================
Note: A valid token is required for authentication as it expires after every hour. Refer to Token Request to generate a new token.
This is a POST request that is responsible for initiating an Express Deposit request.

Sample Request#

{
    "ShortCode": "174300",
    "Amount": "8",
    "PhoneNumber": "254712365971",
    "TransactionDesc": "Test",
    "OriginatorConversationId": "{{$guid}}",
    "CallBackUrl": "https://bright-sparrow-99.webhook.cool",
    "type": 6,
    "successRedirectUrl": "https://guidgenerator.com/",
    "failedRedirectUrl": "https://guidgenerator.com/",
    "serviceCode": "Almara Pay collections",
    "currency": "KES",
    "firstName": "John",
    "lastName": "Doe"
}
NOTE: The type, SuccessRedirectUrl, FailedRedirectUrl and ServiceCode fields are mandatory for transactions made to Zambia.

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'"
    }
  ]
}
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

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."
      }
  ],
}

Sample success callback response:#

{
    "Body": {
        "StkCallback": {
            "MerchantRequestID": "59675-2838158-2",
            "CheckoutRequestID": "ws_CO_110520211915044651",
            "OriginatorConversationId": "2134568790",
            "SystemConversationId": "456575345435",
            "ResultCode": 0,
            "ResultDesc": "The service request is processed successfully.",
            "CallbackMetadata": {
                "Item": [
                    {
                        "Name": "Amount",
                        "Value": 1
                    },
                    {
                        "Name": "MpesaReceiptNumber",
                        "Value": "PEB0U5YIQ2"
                    },
                    {
                        "Name": "Balance"
                    },
                    {
                        "Name": "TransactionDate",
                        "Value": 20210511191517
                    },
                    {
                        "Name": "PhoneNumber",
                        "Value": 254799182092
                    }
                ]
            }
        }
    }
}

Sample failed callback response:#

{
    "Body": {
      "StkCallback": {
        "MerchantRequestID": "14237-1707571-2",
        "CheckoutRequestID": "ws_CO_210520211255325781",
        "ResultCode": "1032",
        "ResultDesc": "Request cancelled by user",
        "OriginatorConversationId": "F1002939292022",
        "SystemConversationId": "7f520000-0e89-0ee0-ea10-08d91c3e9181",
        "CallbackMetadata": null
      }
}

Request

Authorization
Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/express-deposit' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ShortCode": "string",
    "Amount": "string",
    "PhoneNumber": "string",
    "TransactionDesc": "string",
    "OriginatorConversationId": "string",
    "CallBackUrl": "http://example.com",
    "type": 0,
    "successRedirectUrl": "http://example.com",
    "failedRedirectUrl": "http://example.com",
    "serviceCode": "string",
    "currency": "string",
    "firstName": "string",
    "lastName": "string"
}'
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-04-30 06:22:11
Previous
Overview
Next
Find Express Deposit By OriginatorConversationId
Built with