Tokenization
Last updated: 29-Oct-2021
To tokenize cardholder data through Checkout follow these steps:
- Create a customer using the createCustomer API
- Create a checkout using the createCheckout API and set
configurations.card.process_transaction
tofalse
andconfigurations.card.threed_secure.enabled
tofalse
for only tokenization. Ifconfigurations.card.threed_secure.enabled
is set totrue
a 3DS authentication will be done. Set theamount
to any amount higher than0
(zero). The response would look like:
{ "_id": "string", "url": "string" }
The_id
field is the ID of the checkout object. Theurl
field is the URL that the consumer should be sent to to complete the checkout process. - Redirect the Cardholder to the
url
of the checkout page, received when creating the checkout. - After the consumer has provided his card details and submitted the form, there are two ways to retrieve the
card._id
:
- Consumer will be redirected to the
return_url
with thecard._id
appended to the url like so:
https://return.url?card_id=5cade83a35f9660226f21726
- The
card._id
will also be stored in thecheckout
object. Use getCheckout API using the id that you received in the Checkout response/v1/checkout/{{id}}
. Retrieve thecard._id
from theconfigurations.card.card
field. The response will look like this:
{ ... "configurations": { "card": { ... "card": "5cade83a35f9660226f21726" ... } }, ... }
- Consumer will be redirected to the
Rate this article: