Quick start
Get Secure Fields integrated on your checkout page.
1. Set up your Payment Form
Follow the recipe below to get started:
📝
Secure Fields Form
Open Recipe
2. Obtain the tokens
Once you have transmitted the transactionId
and the rest of the form to your server, you then need to execute a server-to-server POST
request to retrieve the tokenized card, CVV or bank account details.
This service requires HTTPS Basic Authentication.
The required credentials can be found in your Dashboard.
Examples:
curl --request POST \
--url 'https://api.sandbox.datatrans.com/v1/tokenizations/{{transactionId}}' \
--header 'Authorization: Basic {{basicAuth}}' \
--header 'Idempotency-Key: e75d621b-0e56-4b71-b889-1acec3e9d870'
{
"paymentMethod": "VIS",
"alias": "7LHXscqwAAEAAAGCq4LyxV20zPAFABWx",
"fingerprint": "F-dV5V8dE0SZLoTurWbq2HZp",
"maskedCard": "424242xxxxxx4242",
"aliasCVV": "ISlRs6QoSOyzdFl8t-hiW_-4",
"expiryYear": "25",
"expiryMonth": "06",
"cardInfo": {
"brand": "VISA CREDIT",
"type": "credit",
"usage": "consumer",
"country": "GB",
"issuer": "DATATRANS"
}
}
{
"aliasIban": "AAABeKaD2UbssdexyrAAAUN24QvOZg3n",
"maskedIban": "DE85xxxxxxxxxxxxxx2345"
}
{
"aliasAccountNumber": "AAABeKahwGDssdexyrAAAV8w_R0dlq9b",
"maskedAccountNumber": "xxxx0604",
"aliasBranchCode": "AAABeKahwGDssdexyrAAAadGCQEwl6MZ"
}
Errors
When running the POST
request, you may encounter the following errors.
Error message | Explanation |
---|---|
Tokenization expired. | The transactionId has expired. It is only valid for 30 minutes. |
Tokenization not found. | The merchantId used to create the transactionId does not match the merchantId used in the form. |
Updated 3 months ago