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 | Token | Token you got from 3G to operate this API | Mandatory |
TransRef | Text | DPO Ref generated on createToken response | Mandatory |
Request example:
Using Token <?xml version="1.0" encoding="utf-8"?> <API3G> <Request>refundToken</Request> <CompanyToken>68B90B5E-25F6-4146-8AB1-CV4GA0C41A7F</CompanyToken> <TransRef>R49763213</TransRef> </API3G>
Response:
The server will respond for the refundToken request according to the following results, the response can be an array (Refunds) if the transaction had multiple refunds.
Parameter | Data type | Description |
Result | 3 digits code | A code will be sent with the result of the request |
ResultExplanation | Text | Free text of the result |
Codes in the response:
Code | Explanation |
003 | Refund successful |
001 | Request missing company token |
902 | Invalid format |
008 | Declined |
804 | Error in XML |
950 | Request missing transaction level mandatory fields/Data mismatch - field name |
Respond example:
<?xml version="1.0" encoding="UTF-8"?> <API3G> <Code>000</Code> <Explanation>Results Found</Explanation> <Refunds> <Refund> <Code>008</Code> <RefundStatus>Declined</RefundStatus> <RefundDate>2023-09-04 06:33:19</RefundDate> <RefundAmount>104.8283</RefundAmount> </Refund> <Refund> <Code>008</Code> <RefundStatus>Declined</RefundStatus> <RefundDate>2023-09-04 06:34:33</RefundDate> <RefundAmount>104.8283</RefundAmount> </Refund> <Refund> <Code>008</Code> <RefundStatus>Declined</RefundStatus> <RefundDate>2023-09-04 06:40:43</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>008</Code> <RefundStatus>Declined</RefundStatus> <RefundDate>2023-09-04 06:41:09</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>003</Code> <RefundStatus>Automated done</RefundStatus> <RefundDate>2023-09-04 06:41:50</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>009</Code> <RefundStatus>Manual Pending</RefundStatus> <RefundDate>2023-09-04 06:42:09</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>003</Code> <RefundStatus>Automated done</RefundStatus> <RefundDate>2023-09-04 06:42:29</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>003</Code> <RefundStatus>Automated done</RefundStatus> <RefundDate>2023-09-04 06:42:46</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>008</Code> <RefundStatus>Declined</RefundStatus> <RefundDate>2023-09-04 07:21:25</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> <Refund> <Code>003</Code> <RefundStatus>Automated done</RefundStatus> <RefundDate>2023-09-04 07:21:54</RefundDate> <RefundAmount>78.5729</RefundAmount> </Refund> </Refunds> </API3G>