Contents

Refunds

 

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.

 

Info
Remember!

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

 

DCC refunds have a similar structure to standard REFUND requests, but are subject to additional requirements that are outlined below. There are four DCC refund options available:

 

Warning
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.


 

Option 1: Refund using original rate

 

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.

 

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

#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
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
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
  'username' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
  'requesttypedescriptions' => array('REFUND'),
  'sitereference' => 'test_site12345',
  'parenttransactionreference' => '1-2-345678',
  'currencyiso3a' => 'USD',
  'baseamount' => '1641'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678",
  "currencyiso3a": "USD",
  "baseamount": "1641"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","parenttransactionreference":"1-2-345678","currencyiso3a":"USD","baseamount":"1641"}]}
<?xml version='1.0' encoding='utf-8'?>
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <amount currencycode="USD">1641</amount>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Field specification

Field Format Description

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.

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.

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).
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).
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.
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).
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).
dcctype
XPath: /billing/dcc/dcctype
Alpha (3) If submitted, this must be “DCC”.
parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
This field must contain the transaction reference of the AUTH request that you would like to refund.
requesttypedescriptions
XPath: /@type
Alpha (20) You must submit “REFUND”.
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.

 

Request REFUND
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.

Info
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
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.
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.
currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3) The customer’s currency in iso3a format. Click here for a full list of available currencies.
dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3) The merchant’s currency in iso3a format. Click here for a full list of available currencies.
dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate originally used to calculate the amount in the customer’s currency.
dccconversionratesource
XPath: /billing/dcc/conversionratesource
Alphanumeric (255) The source of the original conversion rate returned from the DCC provider.
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.
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.
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.

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.
dccratio
XPath: /billing/dcc/ratio
Numeric (255) The ratio between both amounts processed in the request in main units.
dcctype
XPath: /billing/dcc/dcctype
Alpha (3) This is returned as “DCC”.
parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
The transaction reference of the AUTH request refunded.
requesttypedescription
XPath: /@type
Alpha (20) This is returned as “REFUND”.

 


 

Option 2: Refund using new rate

 

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).
Info
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)


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
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
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
  'username' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
  'requesttypedescriptions' => array('REFUND'),
  'sitereference' => 'test_site12345',
  'parenttransactionreference' => '1-2-345678',
  'currencyiso3a' => 'USD',
  'baseamount' => '1260',
  'dcctype' => 'DCC',
  'dccconversionrate' => '1.2',
  'dccmarginratepercentage' => '2.5000',
  'dcccurrencyiso3a' => 'GBP',
  'dccbaseamount' => '1050'

  'requesttypedescriptions' => array('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'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "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"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"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"}]}
<?xml version='1.0' encoding='utf-8'?>
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <amount currencycode="USD">1260</amount>
      <dcc type="DCC">
        <amount currencycode="GBP">1050</amount>
        <conversionrate>1.2</conversionrate>
        <conversionratesource>Rate Source</conversionratesource>
        <provider>Test Provider</provider>
<dccproviderdata>01020304120021250373330603INR0803356200513800210875190000300124306MBB015</dccproviderdata>
        <marginratepercentage>2.5000</marginratepercentage>
      </dcc>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Field specification

Field Format Description
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.

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.
currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3) The customer’s currency in iso3a format. Click here for a full list of available currencies.
dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3) The merchant’s currency in iso3a format. Click here for a full list of available currencies.
dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate used to calculate the new amounts (returned in the new CURRENCYRATE response).
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).
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.
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).
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).
dcctype
XPath: /billing/dcc/dcctype
Alpha (3) You must submit “DCC”.
parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
This field must contain the transaction reference of the AUTH request that you would like to refund.
requesttypedescriptions
XPath: /@type
Alpha (20) You must submit “REFUND”.
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
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.
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.
currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3) The customer’s currency in iso3a format. Click here for a full list of available currencies.
dcccurrencyiso3a
XPath: /billing/dcc/amount/@currencycode
Alpha (3) The merchant’s currency in iso3a format. Click here for a full list of available currencies.
dccconversionrate
XPath: /billing/dcc/conversionrate
Numeric (255) The conversion rate used to calculate the new amounts (returned in the new CURRENCYRATE response).
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).
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.
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.
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.

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.
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.
dccratio
XPath: /billing/dcc/ratio
Numeric (255) The ratio between both amounts processed in the request in main units.
dcctype
XPath: /billing/dcc/dcctype
Alpha (3) This is returned as “DCC”.
parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
The transaction reference of the AUTH request refunded.
requesttypedescription
XPath: /@type
Alpha (20) This is returned as “REFUND”.

 


 

Option 3: Refund using custom rule

 

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:

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.

 

Info
As with standard REFUND requests, the submitted parenttransactionreference field must refer to the parent AUTH request being refunded (not the CURRENCYRATE request).
Info
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.

 


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
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
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
  'username' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
  'requesttypedescriptions' => array('REFUND'),
  'sitereference' => 'test_site12345',
  'parenttransactionreference' => '1-2-345678',
  'currencyiso3a' => 'USD',
  'baseamount' => '1641'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678",
  "currencyiso3a": "USD",
  "baseamount": "1641"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","parenttransactionreference":"1-2-345678","currencyiso3a":"USD","baseamount":"1641"}]}
<?xml version='1.0' encoding='utf-8'?>
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <amount currencycode="USD">1641</amount>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 


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.

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

 

Payouts

Warning
The following content assumes you have obtained the necessary PCI certification to process and submit sensitive cardholder data in the request to our Webservices API.

If you are unsure, please contact our Support Team for assistance.

 

Payouts are similar to standard refunds, except they can be performed independently of other transactions. The benefits of performing payouts include:

Info
Payouts are also known as Credit Fund Transfers (CFT) or Original Credit Transfers (OCT).
Info
Payouts processed with Visa Direct are processed online, with the customer’s account typically being credited within 30 minutes.

 

Please contact your account manager to check if you are eligible to enable Visa Direct on your account.

 

Requirements

You will need to have a CFT Merchant Number associated with your Trust Payments account. If you are unsure if your merchant number supports this, we recommend contacting your bank for clarification. Additionally, please ensure you are following any guidelines outlined by your bank before proceeding.

 

Payout request

Using parent transaction

The following is an example of such a request:

Warning
Ensure the submitted accounttypedescription is “CFT”, otherwise a regular REFUND will be processed instead of a payout.

#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
  
payout= {
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "accounttypedescription": "CFT",
  "parenttransactionreference": "1-2-345678"
}
  
strequest = securetrading.Request()
strequest.update(payout)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
  'username' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
'requesttypedescriptions' => array('REFUND'),
'sitereference' => 'test_site12345',
'accounttypedescription' => 'CFT',
'parenttransactionreference' => '1-2-345678'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "accounttypedescription": "CFT",
  "parenttransactionreference": "1-2-345678"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","accounttypedescription":"CFT","parenttransactionreference":"1-2-345678"}]}
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <operation>
      <sitereference>test_site12345</sitereference>
      <accounttypedescription>CFT</accounttypedescription>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Without parent

As an alternative to the above, you can also submit a payout request without reference to a parent transaction. In this scenario, you will instead need to submit the customer’s payment details in the payout request. Please see the following example:


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
  
payout= {
        "requesttypedescriptions": ["REFUND"],
        "sitereference": "test_site12345",
        "accounttypedescription": "CFT",
        "baseamount": "1050",
        "currencyiso3a": "GBP",
        "pan": "4111111111111111",
        "expirydate": "12/2020",
        "securitycode": "123"
}
  
strequest = securetrading.Request()
strequest.update(payout)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php
if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
'username' => '[email protected]',
'password' => 'Password1^',
);

$requestData = array(
'requesttypedescriptions' => array('REFUND'),
'sitereference' => 'test_site12345',
'accounttypedescription' => 'CFT',
'baseamount' => '1050',
'currencyiso3a' => 'GBP',
'pan' => '4111111111111111',
'expirydate' => '12/2020',
'securitycode' => '123'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "accounttypedescription": "CFT",
  "baseamount": "1050",
  "currencyiso3a": "GBP",
  "pan": "4111111111111111",
  "expirydate": "12/2020",
  "securitycode": "123"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","accounttypedescription":"CFT","baseamount":"1050","currencyiso3a":"GBP","pan":"4111111111111111","expirydate":"12\/2020","securitycode":"123"}]}
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <payment>
        <expirydate>12/2020</expirydate>
        <pan>4111111111111111</pan>
        <securitycode>123</securitycode>
      </payment>
      <amount currencycode="GBP">1050</amount>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <accounttypedescription>CFT</accounttypedescription>
    </operation>
  </request>
</requestblock>

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

 

Field specification

Info
When reading the following specification, please ensure that you reference the relevant code examples for your chosen language.

 

Field Format Description
accounttypedescription
XPath: /operation/accounttypedescription
Alpha (20) Must be “CFT”.
baseamount
XPath: /billing/amount
Numeric (13) The refund amount in base units, with no commas or decimal points. e.g. £10.99 would be submitted as “1099” but ¥246 would be submitted as “246”.

(Max length of amount may vary depending on your acquiring bank – Contact your bank for further info)

currencyiso3a
XPath: /billing/amount/@currencycode
Alpha (3) The currency that the transaction will be processed in.

Click here for a full list of available currencies.

expirydate
XPath: /billing/payment/expirydate
Date MM/YYYY If you would like to process a refund with an updated expiry date, the new value is submitted in this field.
orderreference
XPath: /merchant/orderreference
Alphanumeric including
symbols (255)
Your unique order reference that can be stored on Trust Payments’s system.

If this is not submitted, it is inherited from the parent AUTH request, provided a parenttransactionreference has been included.

pan
XPath: /billing/payment/pan
Numeric (12-19) This is the long number printed on the front of the customer’s card.

We return a masked version of this PAN in the response, in the field maskedpan. e.g. “411111######1111”

parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
You can submit the transaction reference of the AUTH request that you would like to refund.
requesttypedescriptions
XPath: /@type
Alphanumeric
& hyphens (25)
The request type required is “REFUND”.
securitycode
XPath: /security/securitycode
Numeric (3-4) This is the three digit security code printed on the back of the card.

(For AMEX cards, this is a 4 digit code found on the front of the card)

We strongly recommend submitting this value for the processing of security code checks.

Additionally, some banks may decline the payment if the security code is not present.

sitereference
XPath: /operation/sitereference
Alphanumeric
& underscore (50)
A unique reference that identifies your account. You receive this when you first sign up with us.

 

Payout response

The response returned has the same structure as a standard REFUND, except that the accounttypedescription returned is “CFT”:


{
  u 'requestreference': u 'Agv3epv31',
    u 'version': u '1.00',
    u 'response': [{
      u 'transactionstartedtimestamp': u '2016-12-07 15:44:33',
        u 'parenttransactionreference': u '1-2-345678',
        u 'livestatus': u '0',
        u 'issuer': u 'SecureTrading Test Issuer1',
        u 'dccenabled': u '0',
        u 'settleduedate': u '2016-12-07',
        u 'errorcode': u '0',
        u 'orderreference': u 'My_Order_123',
        u 'tid': u '27880001',
        u 'merchantnumber': u '00000000',
        u 'merchantcountryiso2a': u 'GB',
        u 'transactionreference': u '1-2-345679',
        u 'merchantname': u 'Test Merchant',
        u 'paymenttypedescription': u 'VISA',
        u 'baseamount': u '1050',
        u 'accounttypedescription': u 'CFT',
        u 'acquirerresponsecode': u '00',
        u 'requesttypedescription': u 'REFUND',
        u 'securityresponsesecuritycode': u '0',
        u 'currencyiso3a': u 'GBP',
        u 'authcode': u 'TEST REFUND ACCEPTED',
        u 'errormessage': u 'Ok',
        u 'operatorname': u '[email protected]',
        u 'securityresponsepostcode': u '0',
        u 'maskedpan': u '411111######1111',
        u 'securityresponseaddress': u '0',
        u 'issuercountryiso2a': u 'US',
        u 'settlestatus': u '0'
    }]
}
array(3) {
  ["requestreference"] => string(9) "A19beknpr"
  ["version"] => string(4) "1.00"
  ["response"] => array(1) {
    [0] => array(28) {
      ["transactionstartedtimestamp"] => string(19) "2016-12-09 10:21:13"
      ["parenttransactionreference"] => string(10) "1-2-345678"
      ["livestatus"] => string(1) "0"
      ["issuer"] => string(26) "SecureTrading Test Issuer1"
      ["dccenabled"] => string(1) "0"
      ["settleduedate"] => string(10) "2016-12-09"
      ["errorcode"] => string(1) "0"
      ["orderreference"] => string(12) "My_Order_123"
      ["tid"] => string(8) "27880001"
      ["merchantnumber"] => string(8) "00000000"
      ["securityresponsepostcode"] => string(1) "0"
      ["transactionreference"] => string(10) "1-2-345679"
      ["merchantname"] => string(13) "Test Merchant"
      ["paymenttypedescription"] => string(4) "VISA"
      ["baseamount"] => string(4) "1050"
      ["accounttypedescription"] => string(3) "CFT"
      ["acquirerresponsecode"] => string(2) "00"
      ["requesttypedescription"] => string(6) "REFUND"
      ["securityresponsesecuritycode"] => string(1) "0"
      ["currencyiso3a"] => string(3) "GBP"
      ["authcode"] => string(20) "TEST REFUND ACCEPTED"
      ["errormessage"] => string(2) "Ok"
      ["operatorname"] => string(23) "[email protected]"
      ["merchantcountryiso2a"] => string(2) "GB"
      ["maskedpan"] => string(16) "411111######1111"
      ["securityresponseaddress"] => string(1) "0"
      ["issuercountryiso2a"] => string(2) "US"
      ["settlestatus"] => string(1) "0"
    }
  }
}
{"requestreference":"W23-qc7t4h8a","version":"1.00","response":[{"transactionstartedtimestamp":"2016-12-07 15:50:37","parenttransactionreference":"1-2-345678","livestatus":"0","issuer":"SecureTrading Test Issuer1","dccenabled":"0","settleduedate":"2016-12-07","errorcode":"0","baseamount":"1050","tid":"27880001","merchantnumber":"00000000","merchantcountryiso2a":"GB","transactionreference":"1-2-345679","merchantname":"Test Merchant","paymenttypedescription":"VISA","orderreference":"My_Order_123","accounttypedescription":"CFT","acquirerresponsecode":"00","requesttypedescription":"REFUND","securityresponsesecuritycode":"0","currencyiso3a":"GBP","authcode":"TEST REFUND ACCEPTED","errormessage":"Ok","operatorname":"[email protected]","securityresponsepostcode":"0","maskedpan":"411111######1111","securityresponseaddress":"0","issuercountryiso2a":"US","settlestatus":"0"}],"secrand":"0V2j6j0kl2R1UU"}
<?xml version='1.0' encoding='utf-8'?>
<responseblock version="3.67">
  <requestreference>X1u3u92dg</requestreference>
  <response type="REFUND">
    <merchant>
      <tid>27880001</tid>
      <merchantnumber>00000000</merchantnumber>
      <merchantcountryiso2a>GB</merchantcountryiso2a>
      <merchantname>Test Merchant</merchantname>
      <orderreference>My_Order_123</orderreference>
      <operatorname>[email protected]</operatorname>
    </merchant>
    <transactionreference>1-2-345679</transactionreference>
    <billing>
      <amount currencycode="GBP">1050</amount>
      <payment type="VISA">
        <pan>411111######1111</pan>
        <issuercountry>US</issuercountry>
        <issuer>SecureTrading Test Issuer1</issuer>
      </payment>
      <dcc enabled="0"/>
    </billing>
    <timestamp>2019-12-17 11:16:05</timestamp>
    <error>
      <message>Ok</message>
      <code>0</code>
    </error>
    <acquirerresponsecode>00</acquirerresponsecode>
    <live>0</live>
    <authcode>TEST REFUND ACCEPTED</authcode>
    <operation>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
      <accounttypedescription>CFT</accounttypedescription>
    </operation>
    <settlement>
      <settleduedate>2019-12-17</settleduedate>
      <settlestatus>0</settlestatus>
    </settlement>
    <security>
      <address>0</address>
      <postcode>0</postcode>
      <securitycode>0</securitycode>
    </security>
  </response>
  <secrand>V1utOQ5A</secrand>
</responseblock>

 

Refunds

Warning
The following content assumes you have obtained the necessary PCI certification to process and submit sensitive cardholder data in the request to our Webservices API.

If you are unsure, please contact our Support Team for assistance.

 

After processing a payment, it is possible to pay the customer back by submitting a REFUND request. This page will walk you through the process.

 

Process overview

  1. Merchant submits REFUND request.
  2. Trust Payments validates the request and contacts the bank.
  3. Trust Payments processes the refund with the relevant acquirer.
  4. Trust Payments receives results of the request and passes this back to the merchant.
  5. Merchant receives and interprets this response.

 

Requirements

 

REFUND request

Full refund

The following example REFUND request performs a full refund on the specified AUTH:


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
  
refund= {
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678"
}
  
strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
  'username' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
  'requesttypedescriptions' => array('REFUND'),
  'sitereference' => 'test_site12345',
  'parenttransactionreference' => '1-2-345678'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","parenttransactionreference":"1-2-345678"}]}
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Full refund with updated expiry date

The following example REFUND request performs a full refund on the specified AUTH, using a new card expiry date. The new expiry date is submitted in the expirydate field.


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
  
refund= {
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678",
  "expirydate": "05/2025"
}
  
strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
'username' => '[email protected]',
'password' => 'Password1^',
);

$requestData = array(
'requesttypedescriptions' => array('REFUND'),
'sitereference' => 'test_site12345',
'parenttransactionreference' => '1-2-345678',
'expirydate' => '05/2025'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d ' {
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678",
  "expirydate": "05/2025"
}]}'
{"alias":"[email protected]","version":"1.00","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","parenttransactionreference":"1-2-345678","expirydate":"05\/2025"}]}
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <payment>
        <expirydate>05/2025</expirydate>
      </payment>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Partial refund

The following example REFUND request performs a partial refund on the specified AUTH. You can specify the amount to be refunded in the baseamount field.


#!/usr/bin/python
import securetrading
  
stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
  
refund= {
  "requesttypedescriptions": ["REFUND"],
   "sitereference": "test_site12345",
   "parenttransactionreference": "1-2-345678",
   "baseamount": "2001"
}
  
strequest = securetrading.Request()
strequest.update(refund)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
'username' => '[email protected]',
'password' => 'Password1^',
);

$requestData = array(
'requesttypedescriptions' => array('REFUND'),
'sitereference' => 'test_site12345',
'parenttransactionreference' => '1-2-345678',
'baseamount' => '2001'
);

$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{"alias": "[email protected]",
"version": "2001",
"request": [{
  "requesttypedescriptions": ["REFUND"],
  "sitereference": "test_site12345",
  "parenttransactionreference": "1-2-345678",
  "baseamount": "200"
}]}'
{"alias":"[email protected]","version":"2001","request":[{"requesttypedescriptions":["REFUND"],"sitereference":"test_site12345","parenttransactionreference":"1-2-345678","baseamount":"200"}]}
<requestblock version="3.67">
  <alias>[email protected]</alias>
  <request type="REFUND">
    <billing>
      <amount>200</amount>
    </billing>
    <operation>
      <sitereference>test_site12345</sitereference>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
    </operation>
  </request>
</requestblock>

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

 

Field specification

Info
When reading the following specification, please ensure that you reference the relevant code examples for your chosen language.

 

Field Format Description
baseamount
XPath: /billing/amount
Numeric (13) The refund amount in base units, with no commas or decimal points. e.g. £10.99 would be submitted as “1099” but ¥246 would be submitted as “246”.

This amount cannot be greater than the final amount settled into your bank account.

You can opt to perform a partial refund by submitting a lower amount here.

If this field is not present, the full amount of the transaction will be refunded. (Max length of amount may vary depending on your acquiring bank – Contact your bank for further info)

chargedescription
XPath: /merchant/chargedescription
Alphanumeric including
symbols (25)
This is a description of the payment that appears on the customer’s bank statement.

Only supported by certain acquiring banks.

Specification of this field will depend on your acquiring bank. For further information, please contact our Support Team.

Valid characters:

  • Uppercase/lowercase A-Z
  • Numbers 0-9
  • Spaces
  • Punctuation: + – _ . @ ( )
expirydate
XPath: /billing/payment/expirydate
Date MM/YYYY If you would like to process a refund with an updated expiry date, the new value is submitted in this field.
orderreference
XPath: /merchant/orderreference
Alphanumeric including
symbols (255)
Your unique order reference that can be stored on the Trust Payments system.

If this is not submitted, it is inherited from the parent AUTH request.

parenttransactionreference
XPath: /operation/parenttransactionreference
Alphanumeric
& hyphens (25)
This field must contain the transaction reference of the AUTH request that you would like to refund.
requesttypedescriptions
XPath: /@type
Alpha (20) The request type required is “REFUND”.
sitereference
XPath: /operation/sitereference
Alphanumeric
& underscore (50)
A unique reference that identifies your account. You receive this when you first sign up with us.

The site reference submitted in the REFUND request must be the same as the site reference used to process the parent AUTH request.

 

REFUND response


{
  u 'requestreference': u 'Ak70u1ujh',
    u 'version': u '1.00',
    u 'response': [{
      u 'transactionstartedtimestamp': u '2016-12-07 15:14:00',
        u 'parenttransactionreference': u '1-2-345678',
        u 'livestatus': u '0',
        u 'issuer': u 'SecureTrading Test Issuer1',
        u 'dccenabled': u '0',
        u 'settleduedate': u '2016-12-07',
        u 'errorcode': u '0',
        u 'orderreference': u 'My_Order_123',
        u 'tid': u '27882788',
        u 'merchantnumber': u '00000000',
        u 'merchantcountryiso2a': u 'GB',
        u 'transactionreference': u '1-2-345679',
        u 'merchantname': u 'Test Merchant',
        u 'paymenttypedescription': u 'VISA',
        u 'baseamount': u '2001',
        u 'accounttypedescription': u 'ECOM',
        u 'acquirerresponsecode': u '00',
        u 'requesttypedescription': u 'REFUND',
        u 'securityresponsesecuritycode': u '0',
        u 'currencyiso3a': u 'GBP',
        u 'authcode': u 'TEST REFUND ACCEPTED',
        u 'errormessage': u 'Ok',
        u 'securityresponsepostcode': u '0',
        u 'maskedpan': u '411111######1111',
        u 'securityresponseaddress': u '0',
        u 'issuercountryiso2a': u 'US',
        u 'operatorname': u '[email protected]',
        u 'settlestatus': u '0'
    }]
}
array(3) {
  ["requestreference"] => string(9) "Acdefhwxy"
  ["version"] => string(4) "1.00"
  ["response"] => array(1) {
    [0] => array(28) {
      ["transactionstartedtimestamp"] => string(19) "2016-12-09 10:06:13"
      ["parenttransactionreference"] => string(10) "1-2-345678"
      ["livestatus"] => string(1) "0"
      ["issuer"] => string(26) "SecureTrading Test Issuer1"
      ["dccenabled"] => string(1) "0"
      ["settleduedate"] => string(10) "2016-12-09"
      ["errorcode"] => string(1) "0"
      ["orderreference"] => string(12) "My_Order_123"
      ["tid"] => string(8) "27882788"
      ["merchantnumber"] => string(8) "00000000"
      ["securityresponsepostcode"] => string(1) "0"
      ["transactionreference"] => string(10) "1-2-345679"
      ["merchantname"] => string(13) "Test Merchant"
      ["paymenttypedescription"] => string(4) "VISA"
      ["baseamount"] => string(4) "2001"
      ["accounttypedescription"] => string(4) "ECOM"
      ["acquirerresponsecode"] => string(2) "00"
      ["requesttypedescription"] => string(6) "REFUND"
      ["securityresponsesecuritycode"] => string(1) "0"
      ["currencyiso3a"] => string(3) "GBP"
      ["authcode"] => string(20) "TEST REFUND ACCEPTED"
      ["errormessage"] => string(2) "Ok"
      ["merchantcountryiso2a"] => string(2) "GB"
      ["maskedpan"] => string(16) "411111######1111"
      ["securityresponseaddress"] => string(1) "0"
      ["issuercountryiso2a"] => string(2) "US"
      ["operatorname"] => string(23) "[email protected]"
      ["settlestatus"] => string(1) "0"
    }
  }
}
{"requestreference":"W23-22rd4301","version":"1.00","response":[{"transactionstartedtimestamp":"2016-12-07 15:31:48","parenttransactionreference":"1-2-345678","livestatus":"0","issuer":"SecureTrading Test Issuer1","dccenabled":"0","settleduedate":"2016-12-07","errorcode":"0","baseamount":"2001","tid":"27882788","merchantnumber":"00000000","merchantcountryiso2a":"GB","transactionreference":"1-2-345679","merchantname":"Test Merchant","paymenttypedescription":"VISA","orderreference":"My_Order_123","accounttypedescription":"ECOM","acquirerresponsecode":"00","requesttypedescription":"REFUND","securityresponsesecuritycode":"0","currencyiso3a":"GBP","authcode":"TEST REFUND ACCEPTED","errormessage":"Ok","securityresponsepostcode":"0","maskedpan":"411111######1111","securityresponseaddress":"0","issuercountryiso2a":"US","operatorname":"[email protected]","settlestatus":"0"}],"secrand":"SNQVg"}
<responseblock version="3.67">
  <requestreference>Xk3mvyk5v</requestreference>
  <response type="REFUND">
    <merchant>
      <merchantname>Test Merchant</merchantname>
      <orderreference>My_Order_123</orderreference>
      <tid>27882788</tid>
      <merchantnumber>00000000</merchantnumber>
      <merchantcountryiso2a>GB</merchantcountryiso2a>
      <operatorname>[email protected]</operatorname>
    </merchant>
    <transactionreference>1-2-345679</transactionreference>
    <billing>
      <amount currencycode="GBP">2001</amount>
      <payment type="VISA">
        <issuer>SecureTrading Test Issuer1</issuer>
        <issuercountry>US</issuercountry>
        <pan>411111######1111</pan>
      </payment>
      <dcc enabled="0"/>
    </billing>
    <authcode>TEST REFUND ACCEPTED</authcode>
    <live>0</live>
    <error>
      <message>Ok</message>
      <code>0</code>
    </error>
    <timestamp>2012-10-08 12:46:11</timestamp>
    <acquirerresponsecode>00</acquirerresponsecode>
    <security>
      <address>0</address>
      <postcode>0</postcode>
      <securitycode>0</securitycode>
    </security>
    <settlement>
      <settleduedate>2012-10-08</settleduedate>
      <settlestatus>0</settlestatus>
    </settlement>
    <operation>
      <parenttransactionreference>1-2-345678</parenttransactionreference>
      <accounttypedescription>ECOM</accounttypedescription>
    </operation>
  </response>
  <secrand>f</secrand>
</responseblock>

The specification of the REFUND response is the same as the standard AUTH response, except the requesttypedescription field has value “REFUND”. You will need to check the fields returned are correct. In particular, ensure the errorcode is “0” (indicating the request was processed successfully) and that the settlestatus is NOT “2” or “3” (indicating funds will not settle).

 


 

Additional resources

Chargebacks

A chargeback is the return of funds to a customer, on request of their bank, in order to resolve a disputed payment.

Info
Any queries about implementing or processing chargeback transactions on your account should be directed to your acquiring bank. We only provide reporting on chargebacks for certain acquiring banks. Please contact our Support team for further information.

Chargebacks can only occur after the Settlement of funds has taken place. Each chargeback transaction has a parenttransactionreference field that contains a reference to the original transaction.

Listed below are three common scenarios that may result in a chargeback:

 

Process overview

1
The customer disputes a settled transaction by contacting their bank.
2
The customer’s bank authorises a chargeback and informs your acquiring bank of the situation. The disputed funds are returned to the customer.
3
We receive details of a chargeback against a settled transaction and generate a CHARGEBACK transaction in our system, which is linked to the original AUTH. (We perform checks for chargebacks on a daily basis).

 

The request type of the transaction generated will be “CHARGEBACK”.
Each chargeback is represented on our records as an independent transaction with a unique transaction reference.
Chargebacks are shown with a settlestatus of 100 (“settled”).

 

Please be aware of the following

  • The value of the parenttransactionreference field in a chargeback always refers to the original authorisation processed. The value of the settlestatus for this AUTH remains at 100.
  • In some cases, a single payment may be subject to multiple CHARGEBACK requests. For further information, please contact your acquiring bank.
  • Notifications of chargebacks are optional and you must contact our Support team to activate this functionality on your account.

 

Disputing chargebacks

It may be possible for you to dispute a chargeback if you have reasonable cause for doubting the customer’s case (e.g. a customer claims a package was not delivered but the package was signed for). For any queries relating to chargebacks processed on your account, please contact your acquiring bank.

 

Reporting chargebacks

We provide two methods for keeping track of chargebacks processed on your account:

 

Configuring URL notifications

Notification
We recommend that you configure automated notifications on your account when implementing payment types where chargebacks can occur. Please contact our Support team for further information.

 

Viewing chargeback transactions in MyST

Transaction search page

Chargebacks processed against transactions on your site reference(s) can be viewed on the MyST “Transaction search” page.

 

 

After submitting a search, you will be presented with a list of Chargebacks that meet your search criteria:

 

 

URL
Refer to our MyST documentation for further information on searching for transactions.

 

Transaction details page

Chargebacks can also be seen when viewing a transaction in MyST.

 

 

URL
Refer to our MyST documentation for further information on searching for transactions.

investors in people logo   pci - security standards council logo

TRUST Payments LTD, No.1 Royal Exchange, London, EC3V 3DG.
A company registered in England and Wales with Company Number 04591066. VAT Number 756265116