Enabling security code verification with your own form
Background |
---|
Before starting this tutorial, make sure you understand the following topics from the Quick start section:
|
You can enable security code verification while saving a card token with the iframe, with your own form, or through the API.
-
Prepare the Iframe
Follow steps 1-6 of the Creating a save card page with your own form tutorial.
-
Request a One-time-use Token
Request an e-commerce one-time-use token. Include the object
"processingOptions": { "verifyCvc": true }
in the body of your request. (This is part of step 7a of the Creating a save card page with your own form tutorial, with the addition of theverifyCvc
parameter in theprocessingOptions
object.)curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "processingOptions": { "verifyCvc": true } }'
-
Post Card Information to Nexio
Follow step 7b of the Creating a save card page with your own form tutorial.
In the request, be sure to also include the card security code (as the
securityCode
parameter) as entered by the user.curl -X POST https://api.nexiopaysandbox.com/pay/v3/saveCard \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "token": "eb50a022-d6de-4244-a1e6-dcb8522b2d19", "card": { "cardHolderName": "John H Doe", "encryptedNumber": "cu3yRktaYFK2LUC6DpNK289tYDsGRCi7cO+GeG0hkeYFvT7Y8/oY5r53obMz6Q/BZ38gk2u2Ufwy8ojBcX2sfNjG5jplGTXA4NNlSIUjMFfiHe1sff1JFpThoiW/IIlifGlbWu+S1/9pqWPTzJ2+DcjwohbHzsDahhYewFhXgC8qsK0ypi/Shlp+CwRITyIvbVXESD0xz3YOTRHeZLlChvVqN8z4ZzN8nm0MXkmT1wcpYI73bH4KdnPwNU3s7XxvP/ernQP73SHHAOKSLlz4F6AEHFjJiCoXzeLF7LwEjRdxDJ0sKVXbRk3i9BGh+8Nle2VYgjpUWtk2763QkvZiQQ==", "expirationMonth": "12", "expirationYear": "20", "securityCode": 927 } }'
-
Listen for Nexio's Response
Follow step 8 of the Creating a save card page with your own form tutorial.
See the CVC Response page for more information about the possible results included in the response.
Updated 8 months ago