Refund Token (v6)

Create a refund for a paid transaction using refundToken in the DPO Pay API v6.

Refund Token (v6)

Create a refund for a paid transaction in the original transaction currency.

Use the refundToken request to refund a paid transaction. You can identify the transaction by either TransactionToken or TransRef.


Endpoint

POST https://secure.3gdirectpay.com/API/v6/

Headers

Content-Type: application/xml; charset=utf-8
Accept: application/xml

Request parameters

ParameterData typeDescriptionRequired
RequestTextMust be refundToken.Mandatory
CompanyTokenTokenToken you received from 3G to operate this API.Mandatory
TransactionTokenTokenTransaction token received from createToken. Used in place of TransRef.Mandatory when TransRef is not sent.
TransRefTextDPO reference generated in the createToken response. Used in place of TransactionToken.Mandatory when TransactionToken is not sent.
refundAmountNumericRequested refund amount.Mandatory
refundDetailsTextRequested refund description.Mandatory
refundRefTextRefund reference.Optional
refundApproval1/0If sent, the refund is checked by a checker.Optional
📘

Send either TransactionToken or TransRef to identify the transaction you want to refund.


Request examples

Using TransactionToken

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Request>refundToken</Request>
  <CompanyToken>68B90B5E-25F6-4146-8AB1-CV4GA0C41A7F</CompanyToken>
  <TransactionToken>246757AE-4D4F-7763-BFF5-326704703102</TransactionToken>
  <refundAmount>1.2</refundAmount>
  <refundDetails>Refund description</refundDetails>
</API3G>

Using TransRef

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Request>refundToken</Request>
  <CompanyToken>68B90B5E-25F6-4146-8AB1-CV4GA0C41A7F</CompanyToken>
  <TransRef>R4852596P6</TransRef>
  <refundAmount>1.2</refundAmount>
  <refundDetails>Refund description</refundDetails>
</API3G>

Response fields

The server responds to the refundToken request with the result of your request.

ParameterData typeDescription
Result3-digit codeCode sent with the result of the request.
ResultExplanationTextFree text result explanation.

Response codes

CodeExplanation
000Refund successful.
801Request missing company token.
802Wrong CompanyToken.
803No request or error in request type name.
804Error in XML.
950Request missing transaction-level mandatory fields or data mismatch: field name.
999Refund failed: error description.

Success response example

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Result>000</Result>
  <ResultExplanation>Refund successful</ResultExplanation>
</API3G>