Voucher API – Check
Using this API, you will be able to check a voucher’s current value.
The configuration for the Voucher API calls can be seen below.
|API URL (Live)||https://guyana.wipayfinancial.com/v1/voucher_check|
|API URL (Sandbox)||https://sandbox.wipayfinancial.com/guyana/voucher_check|
|API Response-Type||JSON Object|
|The 12-character voucher serial.||–||Yes|
You may use these parameters to make a test Voucher API call using the Sandbox API URL.
|Parameter||Valid Test Value(s)|
All Voucher API calls return a JSON object. There are two main types of responses; “
success” and “
error“. These response types can be found in the value of the “
status” key in the JSON response object.
If all submitted data is valid, you will receive a JSON response object indicating a “
success” value for the “
status” key. Below is an example of a successful transaction using the Voucher API.
"msg": "Voucher check successful",
error” responses may be received for various reasons. Check the value of the “
msg” key in the JSON response object to diagnose what your specific error may be caused by. The following is an example of an “
"msg": "Invalid Voucher"
The possible values of the “
msg” key in an “
error” type response are as follows:
|Error Message||Likely Cause|
|The submitted voucher in the API call is empty.|
|There is no registered WiPay Voucher with a Voucher Number that matches the submitted voucher in the API call.|
|There were more than five (5) API calls within the last sixty (60) seconds.|