Contents

Request types

Info
A valid requesttypedescription must be included in every request submitted to us. We use the value of this field to determine the type of request required in order to process the request. Please refer to the table below for a summary of the request types that we support.

 

Overview

Request type Supported account types Description
ACCOUNTCHECK
  • ECOM
  • MOTO
Performs basic checks on the card and billing address details submitted.
Learn more
(Combined)
ACCOUNTCHECK SUBSCRIPTION
For the ACCOUNTCHECK:

  • ECOM
  • MOTO

For the SUBSCRIPTION:

  • RECUR
Performs basic checks on the card and billing address details submitted, then schedules an automated subscription in our subscription engine.
Learn more
AUTH
  • ECOM
  • MOTO
Performs a payment, which debits funds from the customer’s account.
Learn more
(Combined)
AUTH SUBSCRIPTION
For the AUTH:

  • ECOM
  • MOTO

For the SUBSCRIPTION:

  • RECUR
Performs a payment, which debits funds from the customer’s account, then schedules an automated subscription in our subscription engine.
Learn more
CURRENCYRATE
  • CURRENCYRATE
For retrieving the currency associated with the customer’s card, and calculating the amount in this currency.
Learn more
ORDER
  • ECOM
Initiate a new payment with PayPal.
Learn more
ORDERDETAILS
  • ECOM
Retrieve the order details from PayPal, after the customer has signed in to their account and agreed to the payment on PayPal’s servers.
Learn more
REFUND
Standard / Payout
  • CFT
  • ECOM
  • MOTO
For transferring funds back to the customer.
Learn more
RISKDEC
  •  FRAUDCONTOL
For processing requests to our Protect Plus system, for purposes of highlighting payments with suspicious characteristics.
Learn more
STORE
  •  CARDSTORE
For storing card details in our records for future purchases.
Learn more
THREEDQUERY
  •  ECOM
For querying a card’s 3-D secure enrolment status.
Learn more

 

 

ACCOUNTCHECK

Request ACCOUNTCHECK
Perform checks on the cardholder’s first line of address, the cardholder’s postcode and the security code, without reserving funds on the customer’s account.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

accountcheck= {
    "currencyiso3a": "GBP",
    "requesttypedescriptions": ["ACCOUNTCHECK"],
    "sitereference": "test_site12345",
    "baseamount": "0",
    "orderreference": "My_Order_123",
    "accounttypedescription": "ECOM",
    "cachetoken": "token_posted_by_st.js",
    "billingpremise": "789",
    "billingpostcode": "TE45 6ST"
}

strequest = securetrading.Request()
strequest.update(accountcheck)
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(
'currencyiso3a' => 'GBP',
'requesttypedescriptions' => array('ACCOUNTCHECK'),
'sitereference' => 'test_site12345',
'baseamount' => '0',
'orderreference' => 'My_Order_123',
'accounttypedescription' => 'ECOM',
'cachetoken' => 'token_posted_by_st.js',
'billingpremise' => '789',
'billingpostcode' => 'TE45 6ST'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "currencyiso3a": "GBP",
  "requesttypedescriptions": ["ACCOUNTCHECK"],
  "sitereference": "test_site12345",
  "baseamount": "0",
  "orderreference": "My_Order_123",
  "accounttypedescription": "ECOM",
  "cachetoken": "token_posted_by_st.js",
  "billingpremise": "789",
  "billingpostcode": "TE45 6ST"
}]}'

 

 

ACCOUNTCHECK SUBSCRIPTION (Combined)

Request SUBSCRIPTION
Performs basic checks on the card and billing address details submitted, then schedules an automated subscription in our subscription engine.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

accountchecksub = {
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["ACCOUNTCHECK","SUBSCRIPTION"],
  "accounttypedescription": "ECOM",
  "currencyiso3a": "GBP",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "subscriptiontype": "RECURRING",
  "subscriptionunit": "MONTH",
  "subscriptionfrequency": "1",
  "subscriptionfinalnumber": "12",
  "subscriptionbegindate": "2018-01-01",
  "cachetoken": "token_posted_by_st.js"
}

strequest = securetrading.Request()
strequest.update(accountchecksub)
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(
  'sitereference' => 'test_site12345', 
  'requesttypedescriptions' => array('ACCOUNTCHECK','SUBSCRIPTION'),
  'accounttypedescription' => 'ECOM',
  'currencyiso3a' => 'GBP',
  'baseamount' => '1050',
  'orderreference' => 'My_Order_123',
  'subscriptiontype' => 'RECURRING',
  'subscriptionunit' => 'MONTH',
  'subscriptionfrequency' => '1',
  'subscriptionfinalnumber' => '12',
  'subscriptionbegindate' => '2018-01-01',
  'cachetoken' => 'token_posted_by_st.js'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"[email protected]",
"version": "1.00",
"request": [{
  "currencyiso3a": "GBP",
  "requesttypedescriptions": ["ACCOUNTCHECK","SUBSCRIPTION"],
  "sitereference": "test_site12345",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "accounttypedescription": "ECOM",
  "subscriptiontype": "RECURRING",
  "subscriptionunit": "MONTH",
  "subscriptionfrequency": "1",
  "subscriptionfinalnumber": "12",
  "subscriptionbegindate": "2018-01-01",
  "cachetoken": "token_posted_by_st.js"
}]}'

 

 

AUTH

Request AUTH
Performs a payment, which debits funds from the customer’s account.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

auth = {
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["AUTH"],
  "accounttypedescription": "ECOM",
  "currencyiso3a": "GBP",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "cachetoken": "token_posted_by_st.js"
}

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' => '[email protected]',
  'password' => 'Password1^',
);

$requestData = array(
  'sitereference' => 'test_site12345', 
  'requesttypedescriptions' => array('AUTH'),
  'accounttypedescription' => 'ECOM',
  'currencyiso3a' => 'GBP',
  'baseamount' => '1050',
  'orderreference' => 'My_Order_123',
  'cachetoken' => 'token_posted_by_st.js'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"[email protected]",
"version": "1.00",
"request": [{
  "currencyiso3a": "GBP",
  "requesttypedescriptions": ["AUTH"],
  "sitereference": "test_site12345",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "accounttypedescription": "ECOM",
  "cachetoken": "token_posted_by_st.js"
}]}'

 

 

AUTH SUBSCRIPTION (Combined)

Request SUBSCRIPTION
Performs a payment, which debits funds from the customer’s account, then schedules an automated subscription in our subscription engine.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

authsub = {
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["AUTH","SUBSCRIPTION"],
  "accounttypedescription": "ECOM",
  "currencyiso3a": "GBP",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "subscriptiontype": "RECURRING",
  "subscriptionunit": "MONTH",
  "subscriptionfrequency": "1",
  "subscriptionfinalnumber": "12",
  "subscriptionbegindate": "2018-01-01",
  "cachetoken": "token_posted_by_st.js"
}

strequest = securetrading.Request()
strequest.update(authsub)
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(
  'sitereference' => 'test_site12345', 
  'requesttypedescriptions' => array('AUTH','SUBSCRIPTION'),
  'accounttypedescription' => 'ECOM',
  'currencyiso3a' => 'GBP',
  'baseamount' => '1050',
  'orderreference' => 'My_Order_123',
  'subscriptiontype' => 'RECURRING',
  'subscriptionunit' => 'MONTH',
  'subscriptionfrequency' => '1',
  'subscriptionfinalnumber' => '12',
  'subscriptionbegindate' => '2018-01-01',
  'cachetoken' => 'token_posted_by_st.js'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"[email protected]",
"version": "1.00",
"request": [{
  "currencyiso3a": "GBP",
  "requesttypedescriptions": ["AUTH","SUBSCRIPTION"],
  "sitereference": "test_site12345",
  "baseamount": "1050",
  "orderreference": "My_Order_123",
  "accounttypedescription": "ECOM",
  "subscriptiontype": "RECURRING",
  "subscriptionunit": "MONTH",
  "subscriptionfrequency": "1",
  "subscriptionfinalnumber": "12",
  "subscriptionbegindate": "2018-01-01",
  "cachetoken": "token_posted_by_st.js"
}]}'

 

 

CURRENCYRATE

Request CURRENCYRATE
For retrieving the currency associated with the customer’s card, and calculating the amount in this currency.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

currencyrate = {
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["CURRENCYRATE"],
  "accounttypedescription": "CURRENCYRATE",
  "dcctype": "DCC",
  "dccbaseamount": "1050",
  "dcccurrencyiso3a": "GBP",
  "orderreference": "My_Order_123",
  "cachetoken": "token_posted_by_st.js"
}

strequest = securetrading.Request()
strequest.update(currencyrate)
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(
  'sitereference' => 'test_site12345', 
  'requesttypedescriptions' => array('CURRENCYRATE'),
  'accounttypedescription' => 'CURRENCYRATE',
  'dcctype' => 'DCC',
  'dccbaseamount' => '1050',
  'dcccurrencyiso3a' => 'GBP',
  'orderreference' => 'My_Order_123',
  'cachetoken' => 'token_posted_by_st.js'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias":"[email protected]",
"version": "1.00",
"request": [{
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["CURRENCYRATE"],
  "accounttypedescription": "CURRENCYRATE",
  "dcctype": "DCC",
  "dccbaseamount": "1050",
  "dcccurrencyiso3a": "GBP",
  "orderreference": "My_Order_123",
  "cachetoken": "token_posted_by_st.js"
}]}'

 

 

ORDER

APM
Initiate a new payment with PayPal.
Learn more about PayPal

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

order = {
    "currencyiso3a": "GBP",
    "requesttypedescriptions": ["ORDER"],
    "accounttypedescription": "ECOM",
    "sitereference": "test_site12345",
    "baseamount": "2001",
    "paymenttypedescription": "PAYPAL",
    "returnurl": "https://yourwebsite.com",
    "cancelurl": "https://yourwebsite.com",
    "paypallocale": "GB",
    "paypaladdressoverride": "1",
    "paypalemail": "[email protected]"
}

strequest = securetrading.Request()
strequest.update(order)
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(
    'currencyiso3a' => 'GBP',
    'requesttypedescriptions' => array('ORDER'),
    'accounttypedescription' => 'ECOM',
    'sitereference' => 'test_site12345',
    'baseamount' => '2001',
    'paymenttypedescription' => 'PAYPAL',
    'returnurl' => 'https://yourwebsite.com',
    'cancelurl' => 'https://yourwebsite.com',
    'paypallocale' => 'GB',
    'paypaladdressoverride' => '1',
    'paypalemail' => '[email protected]'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
    "currencyiso3a": "GBP",
    "requesttypedescriptions": ["ORDER"],
    "accounttypedescription": "ECOM",
    "sitereference": "test_site12345",
    "baseamount": "2001",
    "paymenttypedescription": "PAYPAL",
    "returnurl": "https://yourwebsite.com",
    "cancelurl": "https://yourwebsite.com",
    "paypallocale": "GB",
    "paypaladdressoverride": "1",
    "paypalemail": "[email protected]"
}]}'

 

 

ORDERDETAILS

APM
Retrieve the order details from PayPal, after the customer has signed in to their account and agreed to the payment on PayPal’s servers.
Learn more about PayPal

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

orderdetails = {
    "requesttypedescriptions": ["ORDERDETAILS"],
    "sitereference": "test_site12345",
    "parenttransactionreference": "72-32-20002"
}

strequest = securetrading.Request()
strequest.update(orderdetails)
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('ORDERDETAILS'),
                'sitereference' => 'test_site12345',
                'parenttransactionreference' => '72-32-20002'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
	"alias": "[email protected]",
	"version": "1.00",
	"request": [{
                "requesttypedescriptions": ["ORDERDETAILS"],
                "sitereference": "test_site12345",
                "parenttransactionreference": "72-32-20002"
		}]
}'

 

 

REFUND

Request REFUND
For transferring funds back to the customer.
Learn more about standard refunds / Learn more about payouts

#!/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 = Securetradingapi($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/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"
}]}'

 

 

RISKDEC

Request RISKDEC
To process requests to Protect Plus, our sophisticated counter-fraud service. It makes use of the industry’s largest negative database to perform a comprehensive suite of fraud assessments, including identity checks against the UK electoral roll and BT databases.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

auth= {
    "sitereference": "test_site12345",
    "requesttypedescriptions": ["RISKDEC","AUTH"],
    "accounttypedescription": "ECOM",
    "currencyiso3a": "GBP",
    "baseamount": "1011",
    "orderreference": "My_Order_123",
    "cachetoken": "token_posted_by_st.js"
}

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' => '[email protected]',
'password' => 'Password1^',
);

$requestData = array(
  'sitereference' => 'test_site12345',
  'requesttypedescriptions' => array('RISKDEC','AUTH'),
  'accounttypedescription' => 'ECOM',
  'currencyiso3a' => 'GBP',
  'baseamount' => '1011',
  'orderreference' => 'My_Order_123',
  'cachetoken' => 'token_posted_by_st.js'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "currencyiso3a": "GBP",
  "requesttypedescriptions": ["RISKDEC","AUTH"],
  "sitereference": "test_site12345",
  "baseamount": "1011",
  "orderreference": "My_Order_123",
  "accounttypedescription": "ECOM",
  "cachetoken": "token_posted_by_st.js"
}]}'

 

 

STORE

Request STORE
To store a customer’s card details on our system for use in future requests, without the need to take an initial payment from their card, or needing to store the data on your own server.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

store = {
    "sitereference": "test_site12345",
    "requesttypedescriptions": ["STORE"],
    "accounttypedescription": "ECOM",
    "orderreference": "EXAMPLE CARDSTORE",
    "cachetoken": "token_posted_by_st.js",
    "accounttypedescription": "CARDSTORE",
    "billingprefix": "Mr",
    "billingfirstname": "Joe",
    "billinglastname": "Bloggs",
    "billingpremise": "789",
    "billingstreet": "Test Street",
    "billingtown": "Bangor",
    "billingcounty": "Gwynedd",
    "billingcountryiso2a": "GB",
    "billingemail": "[email protected]",
    "billingtelephone": "01234567890",
    "billingtelephonetype": "H"
}

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' => '[email protected]',
  'password' => 'Password1^',
);
	
$requestData = array(
    'sitereference' => 'test_site12345',
    'requesttypedescriptions' => array('STORE'),
    'accounttypedescription' => 'ECOM',
    'orderreference' => 'EXAMPLE CARDSTORE',
    'cachetoken' => 'token_posted_by_st.js',
    'accounttypedescription' => 'CARDSTORE',
    'billingprefix' => 'Mr',
    'billingfirstname' => 'Joe',
    'billinglastname' => 'Bloggs',
    'billingpremise' => '789',
    'billingstreet' => 'Test Street',
    'billingtown' => 'Bangor',
    'billingcounty' => 'Gwynedd',
    'billingcountryiso2a' => 'GB',
    'billingemail' => '[email protected]',
    'billingtelephone' => '01234567890',
    'billingtelephonetype' => 'H'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "sitereference": "test_site12345",
  "requesttypedescriptions": ["STORE"],
  "accounttypedescription": "ECOM",
  "orderreference": "EXAMPLE CARDSTORE",
  "cachetoken": "token_posted_by_st.js",
  "accounttypedescription": "CARDSTORE",
  "billingprefix": "Mr",
  "billingfirstname": "Joe",
  "billinglastname": "Bloggs",
  "billingpremise": "789",
  "billingstreet": "Test Street",
  "billingtown": "Bangor",
  "billingcounty": "Gwynedd",
  "billingcountryiso2a": "GB",
  "billingemail": "[email protected]",
  "billingtelephone": "01234567890",
  "billingtelephonetype": "H"
}]}'

 

 

THREEDQUERY

Request THREEDQUERY
For querying a card’s 3-D secure enrolment status.
Learn more

#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

threedquery= {
  "termurl":"https://termurl.com",
  "accept":"text/html,*/*",
  "paymenttypedescription":"VISA",
  "cachetoken": "token_posted_by_st.js",
  "currencyiso3a":"GBP",
  "requesttypedescriptions": ["THREEDQUERY"],
  "accounttypedescription":"ECOM",
  "sitereference": "test_site12345",
  "baseamount": "1050"
}

strequest = securetrading.Request()
strequest.update(threedquery)
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(
  'termurl' => 'https://termurl.com',
  'accept' => 'text/html,*/*',
  'paymenttypedescription' => 'VISA',
  'cachetoken' => 'token_posted_by_st.js',
  'currencyiso3a' => 'GBP',
  'requesttypedescriptions' => array('THREEDQUERY'),
  'accounttypedescription' => 'ECOM',
  'sitereference' => 'test_site12345',
  'baseamount' => '1050'
);

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

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
  "termurl":"https://termurl.com",
  "accept":"text/html,*/*",
  "paymenttypedescription":"VISA",
  "cachetoken": "token_posted_by_st.js",
  "currencyiso3a":"GBP",
  "requesttypedescriptions": ["THREEDQUERY"],
  "accounttypedescription":"ECOM",
  "sitereference": "test_site12345",
  "baseamount": "1050"
}]}'