verifyRefund-v7
Description
The verifyRefund request will check the status of the refund created by refundToken for the transaction currency.
URL:Â https://secure.3gdirectpay.com/API/v7/
Â
Usage
Use this method in order to verify refund status for paid transaction.
Â
Response
The method will response with the result of your request
Â
Variables to Send:
Parameter | Data Type | Description | Â |
---|---|---|---|
Request | Text | verifyRefund | Mandatory |
CompanyToken | Text (Token - UUID) | Token you got from 3G to operate this API | Mandatory |
TransactionToken | Text (Token - UUID) | Mandatory - Optional (TransactionToken or TransRef to be be passed) | Mandatory or Optional if |
TransRef | Text | Mandatory - Optional (TransactionToken or TransRef to be be passed) | Mandatory or Optional if |
request for example:
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<Request>verifyRefund</Request>
<CompanyToken>4D48CB2C-497A-4F0B-9544-83B664FA0E32</CompanyToken>
<TransRef>R4964845</TransRef>
<TransactionToken>DDED6926-AB11-4D9E-8D9F-212ADD255444</TransactionToken>
</API3G>
Â
Response:
The server will respond for the Verifyrefund request according to the following results, the response can be an array (Refunds) if the transaction had multiple refunds.
Parameter | Data Type | Description |
---|---|---|
Code | 3 digits code | A code will be sent with the result of the request |
Explanation | Text | Free text of the result |
Refunds | Text | Used to mask an array of refunds |
Refund | Text | Refund tag |
RefundStatus | Text | Status of the refund |
RefundDate | Text | Date and time of the refund Formats: YYYY/MM/DD HH:MM:SS |
RefundAmount | Text | Float |
Codes in the response:
Code | Explanation |
---|---|
000 | Results Found |
001 | Request missing company token |
003 | Refund successful -Â Automated done |
008 | Declined |
009 | Manual Pending |
804 | Error in XML |
902 | Invalid format |
950 | Request missing transaction level mandatory fields/Data mismatch - field name |
response:
Sample Successful Response
<?xml version="1.0" encoding="UTF-8"?>
<API3G><Code>000</Code>
<Explanation>Results Found</Explanation>
<Refunds>
<Refund><Code>003</Code>
<RefundStatus>Automated done</RefundStatus>
<RefundDate>2022-09-28 14:12:52</RefundDate>
<RefundAmount>1.0000</RefundAmount>
</Refund>
</Refunds>
</API3G>
Sample Successful Response if Multiple refunds on a transaction
<?xml version="1.0" encoding="UTF-8"?>
<API3G><Code>000</Code>
<Explanation>Results Found</Explanation>
<Refunds>
<Refund><Code>003</Code>
<RefundStatus>Automated done</RefundStatus>
<RefundDate>2022-08-31 14:36:34</RefundDate>
<RefundAmount>1.0000</RefundAmount>
</Refund>
<Refund><Code>003</Code>
<RefundStatus>Automated done</RefundStatus>
<RefundDate>2022-08-31 14:48:44</RefundDate>
<RefundAmount>1.0000</RefundAmount>
</Refund>
<Refund><Code>003</Code>
<RefundStatus>Automated done</RefundStatus>
<RefundDate>2022-08-31 14:48:49</RefundDate>
<RefundAmount>1.0000</RefundAmount>
</Refund>
</Refunds>
</API3G>
Â
Sample failed response:
Â