Check the status of refunds created by refundToken using the DPO Pay verifyRefund API v7.
Verify Refund (v7)
Check the status of a refund created by refundToken for a paid transaction.
Use verifyRefund to verify the refund status for a paid transaction. You can identify the transaction by either TransactionToken or TransRef.
Endpoint
POST https://secure.3gdirectpay.com/API/v7/Headers
Content-Type: application/xml; charset=utf-8
Accept: application/xmlRequest parameters
| Parameter | Data type | Description | Required |
|---|---|---|---|
Request | Text | Must be verifyRefund. | Mandatory |
CompanyToken | Text (Token - UUID) | Token you received from 3G to operate this API. | Mandatory |
TransactionToken | Text (Token - UUID) | Transaction token. Send either TransactionToken or TransRef. | Mandatory, or optional if TransRef is sent. |
TransRef | Text | DPO transaction reference. Send either TransRef or TransactionToken. | Mandatory, or optional if TransactionToken is sent. |
Send either
TransactionTokenorTransRefto identify the transaction. You may send both values when both are available.
Request 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 fields
The server responds to the verifyRefund request with the result of your request. If the transaction has multiple refunds, the response can include multiple Refund items inside Refunds.
| Parameter | Data type | Description |
|---|---|---|
Code | 3-digit code | Code sent with the result of the request. |
Explanation | Text | Free text result explanation. |
Refunds | Text | Wrapper for an array of refunds. |
Refund | Text | Individual refund tag. |
RefundStatus | Text | Status of the refund. |
RefundDate | Text | Date and time of the refund. Format: YYYY/MM/DD HH:MM:SS. |
RefundAmount | Text | Refund amount as a float. |
Response codes
| 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 or data mismatch: field name. |
Successful response example
<?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>Multiple refunds response example
<?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>No refunds found response example
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>000</Code>
<Explanation>No refunds found</Explanation>
<Refunds></Refunds>
</API3G>
