verifyRefund

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
TextDPO Ref generated on createToken responseMandatory

Request example:


request example
Using Token
<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Request>verifyRefund</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

Code

3 digits code

A code will be sent with the result of the request

Explanation

Text

Free text of the result

RefundsTextUsed to mask an array of refunds
RefundTextRefund tag
RefundStatusTextStatus of the refund
RefundDateTextDate and time of the refund Formats: YYYY/MM/DD HH:MM:SS
RefundAmountTextFloat

Codes in the response:

Code

Explanation

000Results Found

001

Request missing company token

003Refund successful - Automated done

008

Declined

009Manual Pending
804Error in XML

902

Invalid format

950Request missing transaction level mandatory fields/Data mismatch - field name

Respond example:


response 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>