Verify Refund (v7)

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/xml

Request parameters

ParameterData typeDescriptionRequired
RequestTextMust be verifyRefund.Mandatory
CompanyTokenText (Token - UUID)Token you received from 3G to operate this API.Mandatory
TransactionTokenText (Token - UUID)Transaction token. Send either TransactionToken or TransRef.Mandatory, or optional if TransRef is sent.
TransRefTextDPO transaction reference. Send either TransRef or TransactionToken.Mandatory, or optional if TransactionToken is sent.
📘

Send either TransactionToken or TransRef to 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.

ParameterData typeDescription
Code3-digit codeCode sent with the result of the request.
ExplanationTextFree text result explanation.
RefundsTextWrapper for an array of refunds.
RefundTextIndividual refund tag.
RefundStatusTextStatus of the refund.
RefundDateTextDate and time of the refund. Format: YYYY/MM/DD HH:MM:SS.
RefundAmountTextRefund amount as a float.

Response codes

CodeExplanation
000Results found.
001Request missing company token.
003Refund successful. Automated done.
008Declined.
009Manual pending.
804Error in XML.
902Invalid format.
950Request 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>