How do I refund DCC payments?

For customers that have completed a payment using DCC, it is possible to process refunds by manually submitting a REFUND request using our Webservices API or MyST.

  Before proceeding, please note the following:

  • The customer’s currency is the currency associated with their card.
  • The merchant’s currency is the local currency associated with your account.

 

If the customer chose to process the payment in the merchant’s currency:

If the customer chose to process the payment in the customer’s currency, choose one of the four options below:

  DCC refunds processed through our Webservices API have a similar structure to standard REFUND requests, but are subject to additional requirements that are outlined below.

  It is your responsibility to ensure that all DCC field values you include in any DCC REFUND requests are correct and agreed with your conversion rate provider.

Your conversion rate provider will specify the required process to handle refunds on your account. We recommend that you review the options available and contact our Support Team for further information.

 

Tab Option 1: Refund using original rate (Webservices API)

Request

The request has the same structure as a standard REFUND request, except your system will also need to resubmit either the customer currency fields OR the merchant currency fields, as shown below:

Either submit the following two customer currency fields in the request:

currencyiso3a The customer’s currency.
baseamount The amount in the customer’s currency.

Or, if you prefer to submit the merchant currency fields in the request:

dcccurrencyiso3a The merchant’s currency.
dccbaseamount The amount in the merchant’s currency.

  As with standard REFUND requests, the submitted parenttransactionreference field must refer to the parent AUTH request being refunded (not the CURRENCYRATE request).

Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

refund= {
"requesttypedescriptions": ["REFUND"],
"sitereference": "test_site12345",
"parenttransactionreference": "1-2-345678",
"currencyiso3a": "USD",
"baseamount": "1641"
}

strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

 

Field specification

  Field Format Description

table-required.png

Submit one of these amounts

baseamount
XPath: /billing/amount
Numeric (13)

The amount to be refunded in the customer’s currency (this includes the fee added as part of the Margin Rate Percentage calculation). This should be in base units with no commas or decimal points, so £10 would be 1000.

Note: When submitting the baseamount, you must also submit the associated currencyiso3a field.

dccbaseamount
XPath: /billing/dcc/amount
Numeric (13)

The amount to be refunded in the merchant’s currency. This should be in base units with no commas or decimal points, so £10 would be 1000.

Note: When submitting the dccbaseamount, you must also submit the associated dcccurrencyiso3a field.

table-required.png

Submit one of these currencies

currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3)

The customer’s currency in iso3a format.

Click here for a full list of available currencies.

Required if the baseamount is submitted.

dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3)

The merchant’s currency in iso3a format.

Click here for a full list of available currencies.

Required if the dccbaseamount is submitted.

table-optional.png dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate originally used to calculate the amount in the customer’s currency (returned in the original CURRENCYRATE response).
table-optional.png dccconversionratesource
XPath: /billing/dcc/conversionratesource
Alphanumeric (255) The source of the original conversion rate returned from the DCC provider (returned in the original CURRENCYRATE response).
table-optional.png dccmarginratepercentage
XPath: /billing/dcc/marginratepercentage
Numeric (11) The percentage (4 decimal places) used as part of the CURRENCYRATE request to calculate the currency conversion fee, which is automatically appended to the amount in the customer’s currency, following calculation.
table-optional.png dccprovider
XPath: /billing/dcc/provider
Alphanumeric (255) The name of the third-party DCC provider that has provided the conversion rate used in the payment (returned in the original CURRENCYRATE response).
table-optional.png dccproviderdata
XPath: /billing/dcc/dccproviderdata
Alphanumeric (255) A unique string that contains information on the calculated conversion rate, returned directly from participating conversion rate providers (returned in the original CURRENCYRATE response).
table-optional.png dcctype
XPath: /billing/dcc/dcctype
Alpha (3) If submitted, this must be “DCC”.
table-required.png parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
This field must contain the transaction reference of the AUTH request that you would like to refund.
table-required.png requesttypedescriptions
XPath: /@type
Alpha (20) You must submit “REFUND”.
table-required.png sitereference
XPath: /operation/sitereference
Alphanumeric
& underscore (50)

Identifies your site on the Trust Payments system.

If you do not know your site reference, please contact our Support Team.

Partial refund

By submitting a baseamount OR dccbaseamount with a lower value than originally authorised, your system can process partial refunds. We will automatically recalculate the amount in the other currency and this will be returned in the response.

 

Response

The response returned will follow a similar structure to a standard REFUND response, with the addition of DCC-specific fields, as described below.

The DCC-specific fields returned will have the same values as in the initial CURRENCYRATE and AUTH requests, reflecting that the same conversion data has been applied.

  The dccratio value is calculated using the refund amount in the customer and merchant currencies. Because this value is calculated after the conversion has taken place, and the converted amount is rounded, the dccratio returned in the response may differ slightly from that used in the initial payment.

 

Field specification

  Field Format Description
table-returned.png baseamount
XPath: /billing/amount
Numeric (13) The amount refunded in the customer’s currency (this includes the fee added as part of the Margin Rate Percentage calculation). This is in base units with no commas or decimal points, so £10 would be 1000.
table-returned.png dccbaseamount
XPath: /billing/dcc/amount
Numeric (13) The amount refunded in the merchant’s currency. This is in base units with no commas or decimal points, so £10 would be 1000.
table-returned.png currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3)

The customer’s currency in iso3a format.

Click here for a full list of available currencies.

table-returned.png dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3)

The merchant’s currency in iso3a format.

Click here for a full list of available currencies.

table-returned.png dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate originally used to calculate the amount in the customer’s currency.
table-returned.png dccconversionratesource
XPath: /billing/dcc/conversionratesource
Alphanumeric (255) The source of the original conversion rate returned from the DCC provider.
table-returned.png dccenabled
XPath: /billing/dcc/@enabled
Numeric (1) The value returned will be “1”, indicating the account used for processing this payment is enabled for DCC.
table-returned.png dccmarginratepercentage
XPath: /billing/dcc/marginratepercentage
Numeric (11) The percentage (4 decimal places) used as part of the CURRENCYRATE request to calculate the currency conversion fee, which is automatically appended to the amount in the customer’s currency, following calculation.
table-returned.png dccoffered
XPath: /billing/dcc/offered
Numeric (1) This value represents whether the REFUND was processed in the customer’s currency or the merchant’s currency:

1 – The customer was refunded in the customer’s currency.

3 – The customer was refunded in the merchant’s currency.

table-returned.png dccproviderdata
XPath: /billing/dcc/dccproviderdata
Alphanumeric (255) A unique string that contains information on the calculated conversion rate, returned directly from participating conversion rate providers.
table-returned.png dccratio
XPath: /billing/dcc/ratio
Numeric (255) The ratio between both amounts processed in the request in main units.
table-returned.png dcctype
XPath: /billing/dcc/dcctype
Alpha (3) This is returned as “DCC”.
table-returned.png parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
The transaction reference of the AUTH request refunded.
table-returned.png requesttypedescription
XPath: /@type
Alpha (20) This is returned as “REFUND”.
Tab Option 2: Refund using new rate (Webservices API)

Process overview

  1. Perform a new CURRENCYRATE request.
    Note: When performing a partial refund, you will need to submit a lower dccbaseamount in the request.
  2. Perform a REFUND request, ensuring all DCC-specific fields returned in the new CURRENCYRATE response are submitted (see list below).

  As with standard REFUND requests, the submitted parenttransactionreference field must refer to the parent AUTH request being refunded (not the CURRENCYRATE request).

 

Request

The following is an example of a request to process a REFUND using a new conversion rate. This presumes you have already performed a new CURRENCYRATE request and are including the new data in the REFUND request (Refer to the field specification below for further information on these fields)

Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

refund= {
"requesttypedescriptions": ["REFUND"],
"sitereference": "test_site12345",
"parenttransactionreference": "1-2-345678",
"currencyiso3a": "USD",
"baseamount": "1260",
"dcctype": "DCC",
"dccconversionrate": "1.2",
"dccconversionratesource": "Rate Source",
"dccmarginratepercentage": "2.5000",
"dcccurrencyiso3a": "GBP",
"dccbaseamount": "1050",
"dccprovider": "Test Provider",

"dccproviderdata": "01020304120021250373330603INR0803356200513800210875190000300124306MBB01"
}

strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

 

Field specification

  Field Format Description
table-required.png baseamount
XPath: /billing/amount
Numeric (13) The amount to be refunded in the customer’s currency (this includes the fee added as part of the Margin Rate Percentage calculation). This should be in base units with no commas or decimal points, so £10 would be 1000.

table-required.png

dccbaseamount
XPath: /billing/dcc/amount
Numeric (13) The amount to be refunded in the merchant’s currency. This should be in base units with no commas or decimal points, so £10 would be 1000.
table-required.png currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3)

The customer’s currency in iso3a format.

Click here for a full list of available currencies.

table-required.png dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3)

The merchant’s currency in iso3a format.

Click here for a full list of available currencies.

table-required.png dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate used to calculate the new amounts (returned in the new CURRENCYRATE response).
table-required.png dccconversionratesource
XPath: /billing/dcc/conversionratesource
Alphanumeric (255) The source of the new conversion rate returned from the DCC provider (returned in the new CURRENCYRATE response).
table-required.png dccmarginratepercentage
XPath: /billing/dcc/marginratepercentage
Numeric (11) The percentage used as part of the new CURRENCYRATE request, to calculate the currency conversion fee (4 decimal places), automatically added to the amount in the customer’s currency by the DCC provider.
table-conditional.png dccprovider
XPath: /billing/dcc/provider
Alphanumeric (255) The name of the third-party DCC provider that has provided the conversion rate used in the payment (returned in the new CURRENCYRATE response).
table-conditional.png dccproviderdata
XPath: /billing/dcc/dccproviderdata
Alphanumeric (255) A unique string that contains information on the calculated conversion rate, returned directly from participating conversion rate providers (returned in the new CURRENCYRATE response).
table-required.png dcctype
XPath: /billing/dcc/dcctype
Alpha (3) You must submit “DCC”.
table-required.png parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
This field must contain the transaction reference of the AUTH request that you would like to refund.
table-required.png requesttypedescriptions
XPath: /@type
Alpha (20) You must submit “REFUND”.
table-required.png sitereference
XPath: /operation/sitereference
Alphanumeric
& underscore (50)

Identifies your site on the Trust Payments system.

If you do not know your site reference, please contact our Support Team.

 

Response

The response returned will follow a similar structure to a standard REFUND response, with the addition of DCC-specific fields, as described below.

The DCC-specific fields returned will have the same values as in the new CURRENCYRATE request, reflecting that the new conversion data has been applied.

 

Field specification

  Field Format Description
table-returned.png baseamount
XPath: /billing/amount
Numeric (13) The amount refunded in the customer’s currency (this includes the fee added as part of the Margin Rate Percentage calculation). This is in base units with no commas or decimal points, so £10 would be 1000.
table-returned.png dccbaseamount
XPath: /billing/dcc/amount
Numeric (13) The amount refunded in the merchant’s currency. This is in base units with no commas or decimal points, so £10 would be 1000.
table-returned.png currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3)

The customer’s currency in iso3a format.

Click here for a full list of available currencies.

table-returned.png dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3)

The merchant’s currency in iso3a format.

Click here for a full list of available currencies.

table-returned.png dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate used to calculate the new amounts (returned in the new CURRENCYRATE response).
table-returned.png dccconversionratesource
XPath: /billing/dcc/conversionratesource
Alphanumeric (255) The source of the new conversion rate returned from the DCC provider (returned in the new CURRENCYRATE response).
table-returned.png dccenabled
XPath: /billing/dcc/@enabled
Numeric (1) The value returned will be “1”, indicating the account used for processing this payment is enabled for DCC.
table-returned.png dccmarginratepercentage
XPath: /billing/dcc/marginratepercentage
Numeric (11) The percentage used as part of the new CURRENCYRATE request, to calculate the currency conversion fee (4 decimal places), automatically added to the amount in the customer’s currency by the DCC provider.
table-returned.png dccoffered
XPath: /billing/dcc/offered
Numeric (1) This value represents whether the REFUND was processed in the customer’s currency or the merchant’s currency:

1 – The customer was refunded in the customer’s currency.

3 – The customer was refunded in the merchant’s currency.

table-conditional.png dccprovider
XPath: /billing/dcc/provider
Alphanumeric (255) The name of the third-party DCC provider that has provided the conversion rate used in the payment.
table-conditional.png dccproviderdata
XPath: /billing/dcc/dccproviderdata
Alphanumeric (255) A unique string that contains information on the calculated conversion rate, returned directly from participating conversion rate providers.
table-returned.png dccratio
XPath: /billing/dcc/ratio
Numeric (255) The ratio between both amounts processed in the request in main units.
table-returned.png dcctype
XPath: /billing/dcc/dcctype
Alpha (3) This is returned as “DCC”.
table-returned.png parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
The transaction reference of the AUTH request refunded.
table-returned.png requesttypedescription
XPath: /@type
Alpha (20) This is returned as “REFUND”.
Tab Option 3: Refund using custom rule (Webservices API)

Process overview

Your conversion rate provider may require you to use a new conversion rate when performing a DCC refund after a pre-specified number of days have passed since the parent AUTH was processed (we’ll refer to this as x days). To address this, our Support Team can configure your account to behave in the following way:

  • Submit DCC REFUND request.
  • If less than x days have passed since the AUTH, we will process a refund using the original conversion rate.
  • If greater than x days have passed since the AUTH, we will automatically perform a new CURRENCYRATE request and use the output to process a refund using the latest conversion rate.

To have this configured for your account or to find out further information, please contact our Support Team.

 

Request

The request has the same structure as a standard REFUND request, except your system will also need to resubmit either the customer currency fields OR the merchant currency fields, as shown below:

Either submit the following two customer currency fields in the request:

currencyiso3a The customer’s currency.
baseamount The amount in the customer’s currency.

Or, if you prefer to submit the merchant currency fields in the request:

dcccurrencyiso3a The merchant’s currency.
dccbaseamount The amount in the merchant’s currency.

  As with standard REFUND requests, the submitted parenttransactionreference field must refer to the parent AUTH request being refunded (not the CURRENCYRATE request).

  This implementation supports both partial refunds and full refunds. Simply submit a lower baseamount OR dccbaseamount and we will calculate the value in the other currency.

Python PHP cURL Raw JSON Raw XML
#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

refund= {
"requesttypedescriptions": ["REFUND"],
"sitereference": "test_site12345",
"parenttransactionreference": "1-2-345678",
"currencyiso3a": "USD",
"baseamount": "1641"
}

strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response

Replace <DOMAIN> with a supported domain. Click here for a full list.

Tab Option 4: Refund using MyST

It is also possible to refund DCC payments by using MyST. If the payment was processed using the customer’s currency (shown within MyST as dccoffered = 1), we automatically perform a new CURRENCYRATE request in order to refund the customer using an up-to-date conversion rate. MyST also supports the ability to process partial refunds.

Click here for documentation on performing refunds using MyST.

  The ability to refund transactions using MyST is limited to users with certain user roles (Click here for information on different user roles).

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request