3DS Setup SDK
To enable 3DS in your payment flow, you first need to request a setup id (three_d_secure_setup_id
). For each payment, you need to generate a new three_d_secure_setup_id
. To receive the three_d_secure_setup_id
you will use setup service endpoint.
Step 1: Add Yuno SDK
With the three_d_secure_setup_id
in hand, you need to include the Yuno SDK file in your webpage before closing the <head>
tag. See the example below:
<script src="https://sdk-web.y.uno/v1/static/js/main.min.js"></script>
Step 2: Start the data collection
To initiate the data collection necessary for the 3DS payment flow, you will use the Yuno.threeDSecure.setup()
function. To initiate the setup()
function, you will use the three_d_secure_setup_id
obtained in the previous step. The following table lists all the required parameters when initializing the 3DS with the Yuno SDK and their descriptions.
Parameter | Description |
---|---|
setupId | Refers to the three_d_secure_setup_id . |
publicApiKey | Refers to your Yuno's public-api-key . This information is on the Yuno's Dashboard. |
accountId | Refers to your Yuno's account-id . This information is on the Yuno's Dashboard. |
The next code block presents an example of initialization.
Yuno.threeDSecure.setup({
publicApiKey: '',
setupId: '',
accountId: ''
}).then(({status}) => {
//SUCCEEDED or ERROR
})
After executing the setup()
service, the Yuno system will receive the necessary device information. Thus, you can continue with the payment. Remember always to use thethree_d_secure_setup_id
to identify the device where the payment is being made.
Updated 2 months ago