Add 3DS authentication to pay for an order endpoint
North America—United States and Canada
To create an additional security layer for CNP transactions, add the 3DS authentication method to the Pay for an order endpoint. When you turn on 3D Secure, the cardholder must validate every transaction with a secure personal identification number (PIN) that their card issuer sends to their phone or associated devices.
Prerequisites
- Create an ecommerce app integration in the Global Developer Dashboard. See Get started with the Global Developer Dashboard.
- Generate a card token. You need to generate a new card token for each payment.
Steps
- Send a POST request to the
v1/orders/{orderId}/pay
endpoint to pay for an order. - Enter the required parameters in the request—
orderId
andsource
. - Under the
threeds
object, select CLOVER insource
attribute to indicate the source of the 3-D Secure (3DS) authentication. - For Clover 3DS authentication, in the
threeds
object, enterbrowser_info
as follows: - Under the
browser_info
object, enter values in the following fields:browser_accept_header
—Browser's accepted header.browser_ip
—Browser's internet protocol (IP) address.browser_javascript_enabled
—Indicates whether the browser is JavaScript-enabled.browser_java_enabled
—Indicates whether the browser is Java-enabled.browser_language
—Browser's defined language.browser_screen_height
—Browser's defined screen height.browser_screen_width
—Browser's defined screen width.browser_tz
—Timezone of the client browser.browser_user_agent
—Browser's defined user agent.browser_http_origin
—Origin of the HTTP browser.
The response provides information related to the order items, authentication source, and the 3DS validation result.
Request and response example—3DS authentication when paying for an order
curl --location 'https://scl-sandbox.dev.clover.com/v1/orders/VTQP12D7JQY8E/pay' \
--header 'Authorization: Bearer 03cd622e-7d65-48ff-a52a-6d554819fdf7' \
--header 'Content-Type: application/json' \
--data '{
"source": "clv_1TSTSL4impN9CXWPVqMvUMMM",
"capture": false,
"threeds": {
"source": "CLOVER",
"browser_info": {
"browser_accept_header": "text/html,application/xml",
"browser_http_origin": "www.clover.com",
"browser_ip": "0.0.0.0",
"browser_java_enabled": true,
"browser_javascript_enabled": true,
"browser_language": "en",
"browser_color_depth": "24",
"browser_screen_height": "1000",
"browser_screen_width": "1920",
"browser_tz": "300",
"browser_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_0_0) AppleWebKit/0.0 (KHTML, like Gecko) Chrome/0.0.0.0 Safari/0.0"
}
}
}'
{
"id": "VTQP12D7JQY8E",
"object": "order",
"amount": 400,
"amount_preauthorized": 400,
"currency": "USD",
"charge": "5H72V694MBS7A",
"warning_message": "No stored credentials supplied on multipay token",
"created": 1724321597000,
"ref_num": "423500505410",
"auth_code": "OK5303",
"items": [
{
"quantity": 2,
"amount": 200,
"description": "item1"
}
],
"source": {
"address_city": "sunnyvale",
"address_line1": "415 N Mathilda",
"address_line1_check": "pass",
"address_state": "CA",
"address_zip": "95120",
"address_zip_check": "pass",
"brand": "DISCOVER",
"cvc_check": "pass",
"exp_month": "09",
"exp_year": "2024",
"first6": "601100",
"last4": "0009"
},
"status": "created",
"threeds": {
"validation_result": "AUTHENTICATION_SUCCESSFUL",
"liability_protection_status": "PROTECTED"
}
}
Related topics
Updated about 13 hours ago