Skip to content
Documentation menu

By EcoCash

Disburse Change

Pay a customer their change into their EcoCash wallet at the point of sale.

POSThttps://developers.ecocash.co.zw/api/serviceRequest

serviceType: CHANGEDISBURSEV2

Overview

Disburse Change solves the small-change problem at the till. Where a merchant cannot give physical change, the balance is paid into the customer's EcoCash wallet instead.

How it works

  1. The till calculates the change owed.
  2. Your system sends a request with the customer number, the change amount, the terminal and the merchant name.
  3. EcoCash validates your credentials, the request body, the channel code and the customer number.
  4. On success the change is credited to the customer wallet and the response is returned on the same call.
  5. A simulated SMS is sent to the customer, naming the merchant.

Getting started

Prerequisites

  • A developer account with sandbox credentials.
  • The customer number whitelisted and OTP-verified.
  • A terminal identifier for the till you are integrating.

Good to know

  • merchantName appears in the SMS the customer receives, so send the trading name they would recognise.
  • terminalId is free text. Use it to trace a transaction back to a till.
  • The response uses timestamp, lower case. Merchant to Subscriber uses timeStamp.

Use cases

  • Supermarket tills where coin float runs short.
  • Fuel forecourts rounding to the litre.
  • Any retail point of sale in a low-coin environment.

Request body

REQUEST JSON BODY
{
  "serviceType": "CHANGEDISBURSEV2",
  "externalReference": "1786097300",
  "receiverNumber": "263777000000",
  "amount": "2",
  "currency": "USD",
  "transferReference": "Change Disbursement",
  "username": "epg-sandbox-user-v1",
  "password": "<encrypted>",
  "terminalId": "TestTerminal001",
  "channelCode": "800002",
  "merchantName": "Test Merchant"
}

Request parameter definition

Request parameters for Disburse Change
NameDescriptionTypeSample value
serviceTypeSelects the service. Must be CHANGEDISBURSEV2.StringCHANGEDISBURSEV2
externalReferenceUnique reference generated by your system for this transaction.String1786097300
receiverNumberThe customer receiving the change. Must be whitelisted in sandbox.String263777000000
amountAmount of change to disburse.String2
currencyISO 4217 currency code. USD or ZWG.StringUSD
transferReferenceDescription of the transfer. Free text.StringChange Disbursement
usernameYour channel API user.Stringepg-sandbox-user-v1
passwordYour API user password, encrypted.String<encrypted>
terminalIdYour point of sale terminal identifier. Free text.StringTestTerminal001
channelCodeThe code identifying your sending channel. Must be 800002.String800002
merchantNameMerchant or branch name. Appears in the customer's SMS.StringTest Merchant

Response body

RESPONSE JSON BODY
{
  "serviceType": "CHANGEDISBURSEV2",
  "externalReference": "1786097300",
  "requestId": "7c4e1b90-2f8a-4d63-b7e5-19a3c6d80f42",
  "transactionId": "CI260807.1208.T6335239",
  "status": 200,
  "statusMessage": "Success",
  "responseCode": "00",
  "responseMessage": "Response is successfully returned.",
  "senderNumber": "263789000000",
  "senderPostBalance": "1787.36",
  "receiverName": "Test Customer",
  "receiverMsisdn": "263777000000",
  "timestamp": "2026-08-26T12:48:40.107Z",
  "amount": "2",
  "currency": "USD",
  "transferReference": "Change Disbursement"
}

Response parameter definition

Response parameters for Disburse Change
NameDescriptionTypeSample value
serviceTypeThe service that ran.StringCHANGEDISBURSEV2
externalReferenceEchoed from the request.String1786097300
requestIdUnique identifier for this API call.UUID7c4e1b90-2f8a-…
transactionIdEcoCash's identifier for the transaction.StringCI260807.1208.T6335239
statusHTTP status. Numeric on this service.Numeric200
statusMessageOutcome in one word.StringSuccess
responseCodeOutcome code. 00 is success.String00
responseMessageOutcome in full.StringResponse is successfully returned.
senderNumberThe channel number the change came from.String263789000000
senderPostBalanceChannel balance after the transaction. Fixed value in sandbox.String1787.36
receiverNameName registered against the whitelisted number.StringTest Customer
receiverMsisdnThe customer who received the change.String263777000000
timestampWhen the transaction completed. Lower case on this service.String2026-08-26T12:48:40.107Z
amountAmount disbursed.String2
currencyCurrency.StringUSD
transferReferenceEchoed from the request.StringChange Disbursement

Error codes

Error codes this service returns
HTTPCodeCauseWhat to do
401SBX40100Client Id or Client Secret missing or wrong.Check both headers.
401TP40101Username or decrypted password does not match.Check the username and the encryption key.
400SBX40000Something is wrong with the request body. A missing field, an unrecognised serviceType, a malformed number, a non-positive amount or an unsupported currency.Read the message. It names the field.
400TP40288channelCode is not 800002.Use the channel code for this service.
400IC50103receiverNumber is not on your whitelist.Add and verify the number on the Test Numbers page.

Match on responseCode, not on the message text. Every code, with an example body, is on the Errors page.

Next steps

Testing

  • Run a successful transaction with a whitelisted number.
  • Run it again with a channel code other than 800002 and confirm TP40288.

Go live

Complete the cases above, then follow the steps on the Go Live page.