1. Definitions
ZamuPay API Documentation
  • Introduction
  • Definitions
    • Data Types
  • Authorization
    • Overview
    • Token Request
      POST
    • Find Transaction Routes
      GET
    • Health Check
      GET
  • Checkout Request
    • Overview
    • Checkout Order Request
      POST
    • Query Checkout Request
      GET
    • Checkout Callback Request
      POST
  • Payment Request
    • Payment Order Request
      POST
    • Reject Order By OriginatorConversationId
      POST
    • Find Payment Order By OriginatorConversationId
      GET
  • Collection Request
    • Find Express Deposit By OriginatorConversationId
      GET
    • Express Deposit Request
      POST
  • Bill Payments
    • Bill Number
      POST
    • Find Bill Number By Service Id and Account Number
      GET
    • Bill Request
      POST
    • Find Bill Request By Originator Converstion Id
      GET
    • Find Bill Services
      GET
  • KYC
    • Account Number Validation Request
      POST
    • KYC Validation
      POST
    • KYC Validation
      GET
    • Find Account Validation Status by SystemTraceAuditNumber
      GET
  • Payment Links
    • Find Payment Links By Id
    • Create Payment Link
    • Update Payment Link
  • Customer Accounts
    • Balance Check
    • Find Charges By TransactionTypeId
  • Airtime Purchase
    • Airtime Purchase
    • Find Airtime Purchases By OriginatorConversationId
  1. Definitions

Data Types

📝 Data Definition for Payment Orders#

This table defines the mandatory and optional fields required for a payment order request.
Field NameData TypeMax LengthStateDescription
originatorConversationIdstring100MandatoryUnique identifier for the transaction.
paymentNotesstring255MandatoryNotes related to the payment.
remitterNamestring128MandatorySender's full name.
remitterAddressstring128MandatorySender's address.
remitterPhoneNumberstring13MandatorySender's phone number.
remitterIdTypestring13MandatoryType of sender's ID (e.g., National ID).
remitterIdNumberstring13MandatorySender's ID number.
remitterCountrystring50MandatorySender's country.
remitterCCYstring3MandatorySender's currency code.
remitterNationalitystring64MandatorySender's nationality.
remitterIdIssuePlacestring64OptionalPlace of ID issuance.
remitterIdIssueDatestring64OptionalDate of ID issuance.
remitterIdExpiryDatestring64OptionalDate of ID expiry.
recipientNamestring64MandatoryRecipient's full name.
remitterFinancialInstitutionstring64MandatorySender's financial institution.
remitterSourceOfFundsstring64MandatorySource of the sender's funds.
remitterPrincipalActivitystring64MandatorySender's principal activity/occupation.
remitterDateOfBirthstring64MandatorySender's date of birth.
recipientAddressstring64OptionalRecipient's address.
recipientEmailAddressstring64OptionalRecipient's email address.
recipientPhoneNumberstring13MandatoryRecipient's phone number.
recipientMCCMNCinteger6Required Mobile onlyMobile Country Code/Mobile Network Code.
recipientInstitutionIdentifierstring6Optional (Only for Mobile)Recipient's institution identifier.
recipientPrimaryAccountNumberstring50MandatoryRecipient's account number (e.g., mobile number).
recipientCCYinteger6MandatoryRecipient's currency code.
recipientCountrystring3MandatoryRecipient's country code.
recipientIdTypestring3MandatoryRecipient's ID type.
recipientIdNumberstring3MandatoryRecipient's ID number.
recipientPurposestring3MandatoryPurpose of the transaction.
transactionRouteIdguid6MandatoryThe ID of the transaction route.
transactionAmountdecimal6MandatoryThe amount of the transaction.
transactionChannelTypeinteger6MandatoryThe channel type of the transaction.
transactionReferencestring100MandatoryReference for the transaction.
transactionSystemTraceAudiNumberstring50MandatorySystem Trace Audit Number.
transactionCustomerAccountNostring50OptionalCustomer Account Number.
Name Specification Note: The recipient and remitter names must adhere to the following specifications:
1.
Should contain at least two names.
2.
No capturing of initials.
3.
No input of numbers.
4.
A single space should be used between the names.

📊 Reference Codes#

Transaction Status Types#

Reference for the transactionStatus field on the Transfers callback payload.
TypeDescription
0Pending
1Queued
2Submitted
3Submit Acknowledged
4Success
6Failed
7Rejected
8Timed Out

Category Types#

Reference for the category field from the Find Transaction Routes request. Describes the transaction type for a particular route.
TypeDescription
0Mobile Wallet Transfer
1Bank Transfer
4Bill Payments
6Business Transfers

Channel Types#

Reference for the channel field from the Find Transaction Routes request. Describes the available transaction routes.
TypeDescription
1Mpesa
2Pesalink
3EFT
4RTGS
6B2B
8Bill Payments
13Business Buy Goods
14Business PayBill
15Business Deposit
16Business To Business Transfer
17Business Transfer From MMF To Utility
18Business Transfer From Utility To MMF
19Express Bank Transfer (via Paybill)
23Business PayBill

Currencies#

The API supports the following currencies:
NameCodeDescription
Kenyan Shillings404KES
Naira566NGN
Ghana Cedi936GHS
Tanzanian Shilling834TZS
Ugandan Shilling800UGX
U.S. Dollar (For Liberia)840USD
United Arab Emirates dirham784AED

MCCMNC Codes (Mobile Only)#

Reference for the mccmnc field on the Payment Order Request for mobile transactions.
CodeDescription
63902Safaricom Kenya
63903Airtel Kenya
63907Telkom Kenya
64101Airtel Uganda
64110MTN Uganda
64111Telcom Uganda
64114Africell Uganda
64002Tigo Tanzania
64003ZANTEL Tanzania
64004Vodacom Tanzania
64005Airtel Tanzania
62001MTN Ghana
61801MTN Liberia

⚠️ Error Codes and Response Status#

Zamupay Transactions Response Codes#

CodeDescriptionException RuleComments
0SuccessSuccess
1Insufficient funds at source accountTransient (retry with new ID)Retry after funding the B2C account.
2Transfer limit exceededPermanent (Fail and do not retry)
3Internal server errorTransient (retry with new ID)
4Third party internal server errorTransient (retry with new ID)
5Invalid debit account (B2C)Permanent (Fail and do not retry)
6Invalid credit accountPermanent (Fail and do not retry)
7Transfer amount below the limitPermanent (Fail and do not retry)
8Invalid transactionPermanent (Fail and do not retry)
9Duplicate transactionUnknown (requery for status)Requery the transaction.
10Server busyTransient (retry with new ID)
11Transaction not foundRetry Transaction with same IDRetry with same originatorConversationID or STAN.
12General errorPermanent (Fail and do not retry)
13Third party general failurePermanent (Fail and do not retry)
14Inconclusive statusUnknown (requery for status)Requires manual resolution.
15Insufficient wallet balanceTransient (retry with new ID)Retry after funding the PYCS account.
16Third party system unavailablePermanent (Fail and do not retry)
17AML FailurePermanent (Fail and do not retry)
18DeclinedPermanent (Fail and do not retry)

Zamupay API Response Codes#

CodeDescription
200The request was processed successfully.
202The request has been accepted for processing.
401Unauthorized request. Happens when the credentials (bearer token) have expired.
400Bad request. Occurs due to validation errors (missing fields) or a duplicate entry (originatorConversationId).
404Request URL not found.
429Too many requests. Occurs when too many requests hit the API causing downtime.
500Internal server error.

🔔 C2B IPN (Callback) Configuration#

1.
Log in to your ZamuPay customer account.
2.
Navigate to Settings and switch to the Webhook Settings tab.
3.
Check the Enable Transaction Webhooks? checkbox.
4.
Provide your callbackUrl in the Url input box. This is where ZamuPay will send the response.
5.
Optional: Check Is Secure? to set authentication (Username and Password) for the URL.
6.
Set the format of the callback payload by selecting either JSON or XML.

Sample C2B Callback Response (JSON)#

{
    "Id": "51539fcd-0b8e-eb11-826b-062ab3a3eac8",
    "CollectionType": "Mpesa",
    "PrimaryAccountNumber": "9abd2ba6fa3bf4847ba638040947a0945c3a4279effc96d8a6fe0db10ec76ccd",
    "InstitutionIdentifier": "301174",
    "InvoiceNumber": null,
    "Thirdpartyreceiptnumber": "PCQ1490463",
    "PaymentAmount": "1.00",
    "ThirdPartyTransID": null,
    "Payeeaccountnumber": "1",
    "Createddate": "2021-08-06T06:43:31.97",
    "Thirdpartypayload": null,
    "Payeename": "JOHN DOE"
}

🔔 Sample Payment Order Callback (JSON)#

This payload is sent by the ZamuPay system to the configured callbackUrl for a Payment Order request.
{
  "id": "0c16c3a6-56a7-ec11-ab96-0ee00e897f52",
  "customerId": "a393c67c-158b-ec11-ab86-0ee00e897f52",
  "isEnabled": true,
  "remarks": "ERTU67897RQQEQ",
  "conversationId": "908cb9a6-56a7-ec11-ab96-0ee00e897f52",
  "originatorConversationId": "8f8cb9a6-56a7-ec11-ab96-0ee00e897f52",
  "dueDate": "2022-03-21T00:00:00",
  "dateApproved": null,
  "dateRejected": null,
  "isProcessed": true,
  "dateProcessed": "2022-03-19T07:32:04.3",
  "recordStatus": 2,
  "createdBy": "Flavian",
  "createdDate": "2022-03-19T07:31:55.85",
  "orderLines": [
    {
      "remitter": {
        "name": "John Gram",
        "address": "USA",
        "phoneNumber": "1-900-99398333",
        "idType": "National ID",
        "idNumber": "2000000",
        "country": "USA",
        "ccy": 404,
        "financialInstitution": "Bank",
        "sourceOfFunds": "Business",
        "principalActivity": "Business"
      },
      "recipient": {
        "name": "John Doe",
        "address": "Nyati",
        "emailAddress": "jjdoe@gmail.com",
        "phoneNumber": "",
        "idType": "National ID",
        "idNumber": "2000000",
        "financialInstitution": "Mpesa",
        "primaryAccountNumber": "+254714000000",
        "mccmnc": "63902",
        "ccy": 404,
        "country": "KE",
        "purpose": "TEST"
      },
      "transaction": {
        "routeId": "b1b67c98-84a6-ec11-ab96-0ee00e897f52",
        "amount": 10,
        "reference": "ERTU67897RQQEQ",
        "systemTraceAuditNumber": "0d4b10f3-e679-4a75-b737-11d7d8600fac",
        "type": 0,
        "channelType": 0,
        "customerAccountNo": null,
        "routeTransactionTypeId": "00000000-0000-0000-0000-000000000000"
      },
      "transactionOutcome": {
        "id": "0e16c3a6-56a7-ec11-ab96-0ee00e897f52",
        "paymentAmount": 10,
        "feeAmount": 2,
        "trackingNumber": "5O18CE9I",
        "transactionStatus": 4,
        "transactionStatusDescription": "Completed",
        "workingAccountAvailableFunds": 0,
        "utilityAccountAvailableFunds": 0,
        "transactionDate": "20220319073158",
        "transactionCreditParty": null,
        "resultCode": "0",
        "resultCodeDescription": "Success",
        "thirdPartyPayload": {
          "thirdPartyResultCode": "0",
          "thirdPartyResultCodeDescription": "Transaction processed successfully.",
          "thirdPartyReceiptNumber": null
        },
        "createdDate": "2022-03-19T07:31:55.85"
      }
    }
  ]
}
Modified at 2026-01-29 07:35:04
Previous
Introduction
Next
Overview
Built with