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_transactiontofalseandconfigurations.card.threed_secure.enabledtofalsefor only tokenization. Ifconfigurations.card.threed_secure.enabledis set totruea 3DS authentication will be done. Set theamountto any amount higher than0(zero). The response would look like:
{ "_id": "string", "url": "string" }
The_idfield is the ID of the checkout object. Theurlfield is the URL that the consumer should be sent to to complete the checkout process. - Redirect the Cardholder to the
urlof 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_urlwith thecard._idappended to the url like so:
https://return.url?card_id=5cade83a35f9660226f21726 - The
card._idwill also be stored in thecheckoutobject. Use getCheckout API using the id that you received in the Checkout response/v1/checkout/{{id}}. Retrieve thecard._idfrom theconfigurations.card.cardfield. The response will look like this:
{ ... "configurations": { "card": { ... "card": "5cade83a35f9660226f21726" ... } }, ... }
- Consumer will be redirected to the
Rate this article: