Using a third-party 3DS provider to run transactions
Background |
---|
Before starting this tutorial, make sure you understand the following topics from the Quick start section:
|
You can use your own 3DS (three-domain secure) provider to run transactions. You do this directly through the API.
For information about running transactions with Nexio as 3DS provider, see Using 3DS to run transactions.
For information about running transactions without 3DS, see Creating a card checkout page with the iframe, Creating a card checkout page with your own form, and Running a card transaction with the API.
For more information about 3DS, see the following pages:
- 3DS requirements
- 3D Secure in the Getting Started section.
Running transactions using external 3DS provider
-
Complete Step 1 in the Creating a card checkout page with your own form tutorial by creating your checkout page and including a form element.
-
Add form fields to collect any necessary user and payment information.
The following information is required by Nexio:- Amount (
data.amount
) - Card information (either a saved card token or full card information).
Optionally, you can include the currency (data.currency
). If you do not specify a value for this parameter, the system defaults toUSD
.
See the Run card transaction endpoint for a complete list of possible parameters.
- Amount (
-
Send the payment information to your external 3DS provider.
Through the 3DS provider, the customer may get prompted to confirm they are being redirected for authentication. -
After the customer successfully authenticates, you get a response from the 3DS provider.
From the response, you must pass on at least the following parameters to Nexio for running the transaction:eci
; eithercavv
orxid
, depending on the card brand; andversion
. There may be other parameters returned from the 3DS provider. You should also pass those on. -
Send a
POST
request to the Run card transaction endpoint. Make sure to include the required parameters, including the following:data.amount
with the total for the transaction.tokenex.token
with the saved card token orcard.pan
and the expiration date information.external3ds.eci
is required. Send the value received from your 3DS provider.- Either
external3ds.cavv
orexternal3ds.xid
, depending on the card brand. One of the two is required. Send the parameter and value received from your 3DS provider. external3ds.version
,external3ds.enrolled
, and/orexternal3ds.pAResStatus
may be required, depending on your transaction gateway or connection. To maximize the likelihood of transaction approval, always send the value all parameters returned from the third-party 3DS provider, even if they are not required.- You may also need to include the currency (
data.currency
). If you do not specify a value for this parameter, the system defaults toUSD
. - Include any other parameters that you want (see the endpoint reference for potential parameters).
curl -X POST https://api.nexiopaysandbox.com/pay/v3/process \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "data": { "amount": 29.99 }, "tokenex": { "token": "6ee140a0-05d1-4958-8325-b38a690dbb9d" }, "external3ds": { "eci": "05", "cavv": "MzM2OGI2ZjkwYjYwY2FjODQ3ZWU=", "xid": "ZGUzNzgwYzQxM2ZlMWM0MzVkMjc=", "version": "2.2.0", "enrolled": "Y", "pAResStatus": "Y" } }'
-
Listen for Nexio's response. Use the response to create a success (such as a receipt) or failure page for the customer. You may also want to send a receipt to the customer via email.
Notes
- The response schema will be the same as that of a standard
POST
request to the Run card transaction endpoint. - The page does not generate a default confirmation page. We recommend using our response to create your own confirmation page.
- The response schema will be the same as that of a standard
Updated 5 months ago