3DSecure2
You can integrate your e-commerce application directly to our platform-agnostic 3D2 Secure API so your merchants can mitigate fraud while at the same time allowing the cardholders to enjoy additional security when using their cards online. Paysafe is compliant to 3D Secure version 1.0.2.
Click the links below to view our code samples.
Authentication
Process an authentication
$response = $this->getClient()->threeDSecureV2Service()->authentications(new Authentications(array(
'merchantRefNum' => uniqid($this->generateRandomString()),
'amount' => 99999999999,
'currency' => "USD",
'deviceFingerprintingId' => "dd45e08a-8eab-443a-a6f3-4361f92bc7d9",
'card' => array(
'cardExpiry' => array(
'month' => Date('n'),
'year' => Date('Y'),
),
'cardNum' => "4000000000000051",
'holderName' => "John Smith"
),
'merchantUrl'=> "https://mysite.com",
'authenticationPurpose' => "PAYMENT_TRANSACTION",
'deviceChannel' => "BROWSER",
'messageCategory' => "PAYMENT",
)));
Look up an authentication using an authentication ID
$response = $client()->threeDSecureService()->getAuthentication(new Authentications(array(
'id' => “e067d83f - add7 - 4b6b - 8884 - dfa8693dde1f”
)));
Process a complex authentication
$response = $this->getClient()->threeDSecureV2Service()->authentications(new Authentications(array(
'amount' => 99999999999,
'currency' => "EUR",
'mcc' => "0742",
'merchantName' => "Merchant Name Inc",
'merchantRefNum' => uniqid($this->generateRandomString()),
'merchantUrl'=> "https://mysite.com",
'card' => array(
'cardExpiry' => array(
'month' => Date('n'),
'year' => Date('Y'),
),
'cardNum' => "4000000000000051",
'holderName' => "John Smith"
),
'billingDetails' => array(
'city' => "New York",
'country' => "US",
'state' => 'AL',
'street' => "My street 1",
'street2' => "My street 2",
'zip' => "M5H 2N2",
'useAsShippingAddress' => 'false'
),
'shippingDetails'=> array(
'city' => "New York",
'country'=> "US",
'state' => "AL",
'street' => "My street 1",
'street2' => "My street 2",
'zip' => "CHY987",
'shipMethod' => "S"
),
'profile'=> array (
'cellPhone' => "+154657854697",
'email' => "example@example.com",
'phone' => "+154657854697"
),
'deviceFingerprintingId' => "dd45e08a-8eab-443a-a6f3-4361f92bc7d9",
'deviceChannel' => "BROWSER",
'requestorChallengePreference' => "NO_PREFERENCE",
'messageCategory' => "PAYMENT",
'transactionIntent' => "GOODS_OR_SERVICE_PURCHASE",
'authenticationPurpose' => "PAYMENT_TRANSACTION",
'maxAuthorizationsForInstalmentPayment' => 2,
'initialPurchaseTime' => "2019-01-21T14:47:31.540Z",
'billingCycle' => array(
'endDate' => "2014-01-26",
'frequency' => 1
),
'orderItemDetails' => array(
'preOrderItemAvailabilityDate' => "2014-01-26",
'preOrderPurchaseIndicator' => "MERCHANDISE_AVAILABLE",
'reorderItemsIndicator' => "FIRST_TIME_ORDER",
'shippingIndicator' => "SHIP_TO_BILLING_ADDRESS"
),
'purchasedGiftCardDetails' => array(
'amount' => 1234,
'count' => 2,
'currency' => "USD"
),
'userAccountDetails' => array(
'addCardAttemptsForLastDay' => 1,
'changedDate' => "2010-01-26",
'changedRange' => "DURING_TRANSACTION",
'createdDate' => "2010-01-26",
'createdRange' => "NO_ACCOUNT",
'passwordChangedDate' => "2012-01-26",
'passwordChangedRange' => "NO_CHANGE",
'paymentAccountDetails' => array(
'createdRange' => "NO_ACCOUNT",
'createdDate' => "2010-01-26"
),
'priorThreeDSAuthentication' => array(
'data' => "Some up to 2048 bytes undefined data",
'method' => "FRICTIONLESS_AUTHENTICATION",
'id' => "123e4567-e89b-12d3-a456-426655440000",
'time' => "2014-01-26T10:32:28Z"
),
'shippingDetailsUsage' => array(
'cardHolderNameMatch' => true,
'initialUsageDate' => "2014-01-26",
'initialUsageRange' => "CURRENT_TRANSACTION"
),
'suspiciousAccountActivity' => true,
'totalPurchasesSixMonthCount' => 1,
'transactionCountForPreviousDay' => 1,
'transactionCountForPreviousYear' => 3,
'travelDetails' => array(
'isAirTravel' => true,
'airlineCarrier' => "Wizz air",
'departureDate' => "2014-01-26",
'destination' => "SOF",
'origin' => "BCN",
'passengerFirstName' => "John",
'passengerLastName' => "Smith"
),
'userLogin' => array(
'authenticationMethod' => "NO_LOGIN",
'data' => "Some up to 2048 bytes undefined data",
'time' => "2014-01-26T10:32:28Z"
)
),
'browserDetails' => array(
'acceptHeader' => "*/*",
'colorDepthBits' => "24",
'customerIp' => "207.48.141.20",
'javascriptEnabled' => true,
'javaEnabled' => true,
'language' => "en-US",
'screenHeight' => 768,
'screenWidth' => 1024,
'timezoneOffset' => 240,
'userAgent' => "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)"
)
)));
Process an authentication with payment token
$response = $this->getClient()->threeDSecureV2Service()->authentications(new Authentications(array(
'amount' => 99999999999,
'currency' => "EUR",
'mcc' => "0742",
'merchantName' => "Merchant Name Inc",
'merchantRefNum' => uniqid($this->generateRandomString()),
'merchantUrl'=> "https://mysite.com",
'card' => array(
'paymentToken' => $this->generateSingleUseToken()
),
'billingDetails' => array(
'city' => "New York",
'country' => "US",
'state' => 'AL',
'street' => "My street 1",
'street2' => "My street 2",
'zip' => "M5H 2N2",
'useAsShippingAddress' => 'false'
),
'shippingDetails'=> array(
'city' => "New York",
'country'=> "US",
'state' => "AL",
'street' => "My street 1",
'street2' => "My street 2",
'zip' => "CHY987",
'shipMethod' => "S"
),
'profile'=> array (
'cellPhone' => "+154657854697",
'email' => "example@example.com",
'phone' => "+154657854697"
),
'deviceFingerprintingId' => "dd45e08a-8eab-443a-a6f3-4361f92bc7d9",
'deviceChannel' => "BROWSER",
'requestorChallengePreference' => "NO_PREFERENCE",
'messageCategory' => "PAYMENT",
'transactionIntent' => "GOODS_OR_SERVICE_PURCHASE",
'authenticationPurpose' => "PAYMENT_TRANSACTION",
'maxAuthorizationsForInstalmentPayment' => 2,
'initialPurchaseTime' => "2019-01-21T14:47:31.540Z",
'billingCycle' => array(
'endDate' => "2014-01-26",
'frequency' => 1
),
'orderItemDetails' => array(
'preOrderItemAvailabilityDate' => "2014-01-26",
'preOrderPurchaseIndicator' => "MERCHANDISE_AVAILABLE",
'reorderItemsIndicator' => "FIRST_TIME_ORDER",
'shippingIndicator' => "SHIP_TO_BILLING_ADDRESS"
),
'purchasedGiftCardDetails' => array(
'amount' => 1234,
'count' => 2,
'currency' => "USD"
),
'userAccountDetails' => array(
'addCardAttemptsForLastDay' => 1,
'changedDate' => "2010-01-26",
'changedRange' => "DURING_TRANSACTION",
'createdDate' => "2010-01-26",
'createdRange' => "NO_ACCOUNT",
'passwordChangedDate' => "2012-01-26",
'passwordChangedRange' => "NO_CHANGE",
'paymentAccountDetails' => array(
'createdRange' => "NO_ACCOUNT",
'createdDate' => "2010-01-26"
),
'priorThreeDSAuthentication' => array(
'data' => "Some up to 2048 bytes undefined data",
'method' => "FRICTIONLESS_AUTHENTICATION",
'id' => "123e4567-e89b-12d3-a456-426655440000",
'time' => "2014-01-26T10:32:28Z"
),
'shippingDetailsUsage' => array(
'cardHolderNameMatch' => true,
'initialUsageDate' => "2014-01-26",
'initialUsageRange' => "CURRENT_TRANSACTION"
),
'suspiciousAccountActivity' => true,
'totalPurchasesSixMonthCount' => 1,
'transactionCountForPreviousDay' => 1,
'transactionCountForPreviousYear' => 3,
'travelDetails' => array(
'isAirTravel' => true,
'airlineCarrier' => "Wizz air",
'departureDate' => "2014-01-26",
'destination' => "SOF",
'origin' => "BCN",
'passengerFirstName' => "John",
'passengerLastName' => "Smith"
),
'userLogin' => array(
'authenticationMethod' => "NO_LOGIN",
'data' => "Some up to 2048 bytes undefined data",
'time' => "2014-01-26T10:32:28Z"
)
),
'browserDetails' => array(
'acceptHeader' => "*/*",
'colorDepthBits' => "24",
'customerIp' => "207.48.141.20",
'javascriptEnabled' => true,
'javaEnabled' => true,
'language' => "en-US",
'screenHeight' => 768,
'screenWidth' => 1024,
'timezoneOffset' => 240,
'userAgent' => "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)"
)
)));
To obtain a deviceFingerprintingId, please check the Javascript SDK documentation.