Tokenization for Webservices API

  Last updated: 

What is tokenization?

Tokenization is the process of storing card details and generating a token to be used to process transactions against the stored card details. Trust Payments stores the card details on a secure PCI-compliant server so merchants and partners do not need to store sensitive card numbers.

 

Technical overview

  All businesses within the EEA (European Economic Area) are mandated to use 3D Secure when processing e-commerce transactions, as part of the PSD2 mandate.

Merchants that process e-commerce transactions MUST support 3DS authentication.


See the following pages for further information:

  Learn about EMV 3D Secure     What is 3DS API?     Using your own MPI

 

The following examples are Mail Order Telephone Order (MOTO) payments:

Payment - Tokenizing (Storing) card details - Cardholder Initiated Transaction

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

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

auth = {
  "accounttypedescription": "MOTO",
  "baseamount": "1050",
  "credentialsonfile": "1",
  "currencyiso3a": "GBP",
  "expirydate": "01/35",
  "requesttypedescriptions": ["AUTH"],
  "orderreference": "order123456",
  "pan": "4111111111111111",
  "securitycode": "123",
  "sitereference": "{{site_reference}}"
}

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

No Payment - Tokenizing (Storing) card details - Cardholder Initiated Transaction

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

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

auth = {
  "accounttypedescription": "MOTO",
  "baseamount": "1050",
  "credentialsonfile": "1",
  "currencyiso3a": "GBP",
  "expirydate": "01/35",
  "orderreference": "order123456",
  "pan": "4111111111111111",
  "requesttypedescriptions": ["ACCOUNTCHECK"],
  "securitycode": "123",
  "sitereference": "{{site_reference}}"
}

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

Payment - Tokenized (Stored) card details - Cardholder Initiated Transaction

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

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

auth = {
  "accounttypedescription": "MOTO",
  "baseamount": "1050",
  "credentialsonfile": "2",
  "currencyiso3a": "GBP",
  "orderreference": "order123456",
  "parenttransactionreference": "INSERT_PARENT_TRANSACTION_REFERENCE",
  "requesttypedescriptions": ["AUTH"],
  "sitereference": "{{site_reference}}"
}

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

 

Related articles


What is Tokenization?

Learn about storing card details for use in future transactions.

  Learn more

Recurring payments

Subsequent recurring payments using the tokenized card details can be processed using our Webservices API.

  Learn more

Merchant Initiated Transactions (MIT)

Submit ad-hoc requests to process a transaction from previously stored card details without cardholder interaction.

  Learn more

AUTH

Full documentation for our AUTH requests/responses.

  Learn more

Was this article helpful?
0 out of 0 found this helpful