Prepare your transaction number (txn_no), and use the POST Refund Request on our JSON library
Note: You may want to refer to our FAQ on how to set up our JSON collection on an API platform.
*You'll need to have a transaction number ready. This should be in the following format
2022-00000 //the first 4 digits indicate the year of transaction
Step 1: On your preferred API platform, select the POST Refund Request file
Step 2: Insert these parameters into the body
{
"txn_no": "2022-00000",// required
"amount": 200, // optional, indicate the amount to refund. If left blank, the full amount will be refunded
"callback_url": "",//optional, this is the URL to get refund statuses
"remarks": "refund"// optional, indicate the reason for the refund request here
"documents": [ // optional
{
"file_name": "file_name",
"url": "https://direct.download.link"
}
]
}
Step 3: Send the API request and you should get either a success or error message
A success message would look like this:
{
"status": "success",
"data": {
"reference_id": "12345678-90ab-cdef-ghij-1234567890ab" //use this reference_id for getting the refund status
}
}
An error message would look like this:
{
"status": "error",
"message": "internal server error",
"errors": [
{
"code": 2046,
"message": "The refund request could not be processed because a refund request already exists against the given transaction"
}
]
}
The reasons for the refund request failing is detailed in our API documents.
Step 4: Tazapay will process the refund request on our end. In the meantime, you can get the refund request status using a Get Refund Status API call.
You may also want to see our API documentation for Refunds.