Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Refund (Voucher Number)

POST {api-url}/refund2?ns={community}

Execute a refund transaction based on the voucher number used in the original transaction. You can process multiple partial refunds. Any amount up to the original transaction amount can be entered. Funds are reversed from the merchant’s cash balance, and the commission is returned to the merchant.

If the voucher corresponds to a Voucher Type, the funds returned back to the merchant as the typed voucher. If you would like the funds returned to cash balance, please look at /reverseClosure.

FieldTypeRequirementDescription
VoucherNoStringRequiredThe voucher number used in the original transaction.
AmountStringRequiredTransaction amount in cents.
StoreIDStringRequiredA unique store identifier code for the merchant.
CurrencyStringRequiredDefault is currency of merchant (e.g., ZAR).
ReferenceStringOptional*A unique transaction reference number given by the merchant.
MetadataStringOptionalAny other detail that the merchant wishes to store on this transaction.

*Reference numbers must be unique identifiers otherwise an error will be returned.

{
"VoucherNo": "168-41405-74358",
"Amount": "2000",
"StoreID": "Store1",
"Reference": "101",
"Currency": "ZAR",
"Metadata": "{\"ActorUserIDs\": \"547828938941114\"}"
}
Terminal window
curl -X POST '{api-url}/refund2?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"VoucherNo":"168-41405-74358","Amount":"2000","StoreID":"Store1","Reference":"101","Currency":"ZAR","Metadata":"{\"ActorUserIDs\": \"547828938941114\"}"}'