This page outlines the specification for the cryptocurrencyindicator field. This field acts as a flag to determine whether or not a transaction is for the purpose of purchasing cryptocurrency.
This functionality is supported for merchants with a Trust Payments acquiring account. If you are using a different acquiring bank, you will need to contact our Support Team to check this feature is supported before proceeding.
Requirement: Your merchant category code must be 6051.
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.
Process overview
There are two methods that can be used to include the cryptocurrencyindicator field in requests submitted to the acquiring bank:
-
By assigning default values on your account
Using this method, the cryptocurrencyindicator field is automatically included in transactions processed on your account, with no additional configuration required. To configure your account to use this method, contact our Support Team, requesting that your site is set up with your preferred default cryptocurrencyindicator field value (this is described in greater detail below). -
By manually including the cryptocurrencyindicator field in your requests
Using this method allows you to specify different values on a request-by-request basis. To configure your account to use this method, update your requests using the specification provided below.
Submitting cryptocurrencyindicator in a request
The cryptocurrency indicator fields can be included in the POST to Payment Pages, as shown in the following example:
<html>
<body>
<form method="POST" action="<DOMAIN>/process/payments/choice">
<input type="hidden" name="sitereference" value="test_site12345">
<input type="hidden" name="stprofile" value="default">
<input type="hidden" name="currencyiso3a" value="USD">
<input type="hidden" name="mainamount" value="100.00">
<input type="hidden" name="version" value="2">
<input type="hidden" name="cryptocurrencyindicator" value="1">
<input type="submit" value="Pay">
</form>
</body>
</html>
Replace <DOMAIN>
with a supported domain. Click here for a full list.
You will need to update the payload submitted within your JWT to include an additional field, as shown below. Submitting the cryptocurrencyindicator in this way will always override any value stored on your account or inherited from a parent.
{
"payload":{
"accounttypedescription":"ECOM",
"baseamount":"1050",
"currencyiso3a":"GBP",
"sitereference":"test_site12345",
"requesttypedescriptions":["THREEDQUERY","AUTH"],
"cryptocurrencyindicator":"1"
},
"iat":1559033849,
"iss":"jwt.user"
}
You will need to update the payload submitted within your JWT to include an additional field, as shown below. Submitting the cryptocurrencyindicator in this way will always override any value stored on your account or inherited from a parent.
{
"payload":{
"accounttypedescription":"ECOM",
"baseamount":"1050",
"currencyiso3a":"GBP",
"sitereference":"test_site12345",
"termurl":"https:\/\/payments.securetrading.net\/process\/payments\/mobilesdklistener",
"requesttypedescriptions":["THREEDQUERY","AUTH"],
"cryptocurrencyindicator":"1"
},
"iat":1559033849,
"iss":"jwt.user"
}
You will need to update the request as shown below. Submitting the cryptocurrencyindicator in this way will always override any value stored on your account or inherited from a parent.
#!/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",
"billingfirstname": "Joe",
"billinglastname": "Bloggs",
"cryptocurrencyindicator": "1",
"pan": "4111111111111111",
"expirydate": "12/2020",
"securitycode": "123"
}
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',
'billingfirstname' => 'Joe',
'billinglastname' => 'Bloggs',
'cryptocurrencyindicator' => '1',
'pan' => '4111111111111111',
'expirydate' => '12/2020',
'securitycode' => '123'
);
$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",
"billingfirstname": "Joe",
"billinglastname": "Bloggs",
"accounttypedescription": "ECOM",
"cryptocurrencyindicator": "1",
"pan": "4111111111111111",
"expirydate": "12/2020",
"securitycode": "123"
}]
}'
{
"alias":"webservices@example.com",
"version":"1.00",
"request":[{
"currencyiso3a":"GBP",
"requesttypedescriptions":["AUTH"],
"sitereference":"test_site12345",
"baseamount":"1050",
"orderreference":"My_Order_123",
"billingfirstname":"Joe",
"billinglastname":"Bloggs",
"accounttypedescription":"ECOM",
"cryptocurrencyindicator":"1",
"pan":"4111111111111111",
"expirydate":"12/2020",
"securitycode":"123"
}]
}
<requestblock version="3.67">
<alias>webservices@example.com</alias>
<request type="AUTH">
<merchant>
<orderreference>My_Order_123</orderreference>
</merchant>
<billing>
<payment>
<expirydate>12/2020</expirydate>
<pan>4111111111111111</pan>
<securitycode>123</securitycode>
</payment>
<amount currencycode="GBP">1050</amount>
<name>
<first>Joe</first>
<last>Bloggs</last>
</name>
</billing>
<operation>
<sitereference>test_site12345</sitereference>
<accounttypedescription>ECOM</accounttypedescription>
<cryptocurrencyindicator>1</cryptocurrencyindicator>
</operation>
</request>
</requestblock>
Field specification
Field | Format | Description | |
cryptocurrencyindicator XPath: /operation/cryptocurrencyindicator |
Numeric (1) |
Indicates if transaction is flagged as a purchase of cryptocurrency:
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). |
Additional notes
Supported request types
The cryptocurrencyindicator field can be submitted in the following requests:
- ACCOUNTCHECK
- AUTH
- THREEDQUERY
Click here for a full list of request types.
Inheriting from parent requests
If you do not submit the cryptocurrencyindicator field in a request, and a parent transaction reference is specified, it is inherited from said parent.