Visa and Mastercard have mandated that all merchants processing debt repayments submit the following fields in requests to Trust Payments. (Only applies to AUTH and ACCOUNTCHECK request types)
This mandate only applies to merchants with certain acquiring banks. Please contact our Support Team for further information.
Requirement: Your merchant category code must be either 6012, 6051 or 7299.
Your Merchant Category Code (MCC) is a four-digit number assigned to you by your acquirer. It is used to classify the business by the type of products or services it provides. If you are unsure of the value of your merchant category code, please contact our Support Team.
Inheritance
Once you have processed an AUTH or ACCOUNTCHECK containing these required fields, they can be inherited in future requests, and passed onto the acquiring bank automatically, if required.
Request example
The following example includes the fields mandated for merchants processing debt repayments:
(Payload)
{
"payload":{
"accounttypedescription":"ECOM",
"baseamount":"1050",
"currencyiso3a":"GBP",
"sitereference":"test_site12345",
"requesttypedescriptions":["THREEDQUERY","AUTH"],
"customeraccountnumber":"4111111111111111",
"customeraccountnumbertype":"CARD",
"customerdob":"1990-01-01",
"customerpostcode":"TR45 6ST",
"customerlastname":"Bloggs",
"debtrepayment":"1"
},
"iat":1559033849,
"iss":"jwt.user"
}
The following example includes the fields mandated for merchants processing debt repayments:
(Payload)
{
"payload":{
"accounttypedescription":"ECOM",
"baseamount":"1050",
"currencyiso3a":"GBP",
"sitereference":"test_site12345",
"termurl":"https:\/\/payments.securetrading.net\/process\/payments\/mobilesdklistener",
"requesttypedescriptions":["THREEDQUERY","AUTH"],
"customeraccountnumber":"4111111111111111",
"customeraccountnumbertype":"CARD",
"customerdob":"1990-01-01",
"customerpostcode":"TR45 6ST",
"customerlastname":"Bloggs",
"debtrepayment":"1"
},
"iat":1559033849,
"iss":"jwt.user"
}
The following example includes the fields mandated for merchants processing debt repayments:
#!/usr/bin/python
import securetrading
stconfig = securetrading.Config()
stconfig.username = "webservices@example.com"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)
auth = {
"sitereference": "test_site12345",
"requesttypedescriptions": ["AUTH"],
"accounttypedescription": "ECOM",
"currencyiso3a": "GBP",
"baseamount": "1050",
"orderreference": "My_Order_123",
"pan": "4111111111111111",
"expirydate": "12/2020",
"securitycode": "123",
"customeraccountnumber": "4111111111111111",
"customeraccountnumbertype": "CARD",
"customerdob": "1990-01-01",
"customerpostcode": "TR45 6ST",
"customerlastname": "Bloggs",
"debtrepayment": "1"
}
strequest = securetrading.Request()
strequest.update(auth)
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' => 'webservices@example.com',
'password' => 'Password1^',
);
$requestData = array(
'sitereference' => 'test_site12345',
'requesttypedescriptions' => array('AUTH'),
'accounttypedescription' => 'ECOM',
'currencyiso3a' => 'GBP',
'baseamount' => '1050',
'orderreference' => 'My_Order_123',
'pan' => '4111111111111111',
'expirydate' => '12/2020',
'securitycode' => '123',
'customeraccountnumber' => '4111111111111111',
'customeraccountnumbertype' => 'CARD',
'customerdob' => '1990-01-01',
'customerpostcode' => 'TR45 6ST',
'customerlastname' => 'Bloggs',
'debtrepayment' => '1'
);
$api = \Securetrading\api($configData);
$response = $api->process($requestData);
var_dump($response->toArray());
?>
curl --user webservices@example.com:Password1^ <DOMAIN>/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"webservices@example.com",
"version": "1.00",
"request": [{
"currencyiso3a": "GBP",
"requesttypedescriptions": ["AUTH"],
"sitereference": "test_site12345",
"baseamount": "1050",
"orderreference": "My_Order_123",
"accounttypedescription": "ECOM",
"pan": "4111111111111111",
"expirydate": "12/2020",
"securitycode": "123",
"customeraccountnumber": "4111111111111111",
"customeraccountnumbertype": "CARD",
"customerdob": "1990-01-01",
"customerpostcode": "TR45 6ST",
"customerlastname": "Bloggs",
"debtrepayment": "1"
}]
}'
{
"alias":"webservices@example.com",
"version":"1.00",
"request":[{
"currencyiso3a":"GBP",
"requesttypedescriptions":["AUTH"],
"sitereference":"test_site12345",
"baseamount":"1050",
"orderreference":"My_Order_123",
"accounttypedescription":"ECOM",
"pan":"4111111111111111",
"expirydate":"12/2020",
"securitycode":"123",
"customeraccountnumber":"4111111111111111",
"customeraccountnumbertype":"CARD",
"customerdob":"1990-01-01",
"customerpostcode":"TR45 6ST",
"customerlastname":"Bloggs",
"debtrepayment":"1"
}]
}
<requestblock version="3.67">
<alias>webservices@example.com</alias>
<request type="AUTH">
<merchant>
<orderreference>My_Order_123</orderreference>
<debtrepayment>1</debtrepayment>
</merchant>
<billing>
<payment type="VISA">
<expirydate>12/2020</expirydate>
<pan>4111111111111111</pan>
<securitycode>123</securitycode>
</payment>
<amount currencycode="GBP">1050</amount>
</billing>
<operation>
<sitereference>test_site12345</sitereference>
<accounttypedescription>ECOM</accounttypedescription>
</operation>
<customer>
<name>
<last>Bloggs</last>
</name>
<postcode>TR45 6ST</postcode>
<dob>1990-01-01</dob>
<accountnumber type="CARD">4111111111111111</accountnumber>
</customer>
</request>
</requestblock>
Field specification
The required fields are as follows:
Field | Format | Description | |
customeraccountnumber XPath: /customer/accountnumber |
Numeric (20) |
If account number type is “ACCOUNT”, the account holder’s account number.
If account number type is “CARD”, the account holder’s card number. The returned value in the response is in a masked format, e.g. “411111#######1111”. |
|
customeraccountnumbertype XPath: /customer/accountnumber/@type |
Alpha (7) | Either “CARD” or “ACCOUNT”. | |
customerdob XPath: /customer/dob |
Date YYYY-MM-DD | The account holder’s date of birth. | |
customerpostcode XPath: /customer/postcode |
Alphanumeric (25) |
The customer’s postcode or ZIP code.
This must be a valid postcode/ZIP code for the customercountryiso2a submitted. |
|
customerlastname XPath: /customer/name/last |
Alphanumeric including symbols (127) |
The customer’s last name. | |
debtrepayment XPath: /merchant/debtrepayment |
Numeric (1) |
Indicates if transaction is flagged as debt repayment:
Note: Your site can be configured to automatically submit this flag with value 0 or 1 in every transaction by default. (Please contact our Support Team to make this change). |