3D Secure

You can integrate your e-commerce application directly to our platform-agnostic 3D 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.

Verify That the Service Is Accessible

bool isOnline = client.threeDSecureService().monitor();

Enrollment Lookup

Submit an enrollment lookup request
EnrollmentChecks enrollmentLookups = EnrollmentChecks.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(100)
                .currency("CAD")
                .customerIp("204.91.0.12")
                .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36")
                .card()
                    .cardNum("4107857757053670")
                    .cardNum("3569990000000009")
                    .cardExpiry()
                        .month(10)
                        .year(2018)
                        .Done()
                    .Done()
                .acceptHeader("text/html,application/xhtml+xml,application/xml;q\u003d0.9,image/webp,*/*;q\u003d0.8")
                .merchantUrl("https://www.google.com")
                .Build();
EnrollmentChecks response = client.threeDSecureService().submit(enrollmentLookups);
Look up an enrollment lookup using an ID
EnrollmentChecks enrollmentChecks = client.threeDSecureService().submit(EnrollmentChecks.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(100)
                .currency("CAD")
                .customerIp("204.91.0.12")
                .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36")
                .card()
                    .cardNum("4107857757053670")
                    .cardExpiry()
                        .month(10)
                        .year(2018)
                        .Done()
                    .Done()
                .acceptHeader("text/html,application/xhtml+xml,application/xml;q\u003d0.9,image/webp,*/*;q\u003d0.8")
                .merchantUrl("https://www.google.com")
                .Build());
EnrollmentChecks response = client.threeDSecureService().get(enrollmentChecks);

Authentication

Submit an authentication request
EnrollmentChecks enrollmentChecks = client.threeDSecureService().submit(EnrollmentChecks.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(100)
                .currency("CAD")
                .customerIp("204.91.0.12")
                .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36")
                .card()
                    .cardNum("4107857757053670")
                    .cardExpiry()
                        .month(10)
                        .year(2018)
                        .Done()
                    .Done()
                .acceptHeader("text/html,application/xhtml+xml,application/xml;q\u003d0.9,image/webp,*/*;q\u003d0.8")
                .merchantUrl("https://www.google.com")
                .Build());

Authentications response = client.threeDSecureService().submit(Authentications.Builder()
                .merchantRefNum(enrollmentChecks.merchantRefNum())
                .paResp(enrollmentChecks.paReq())
                .enrollmentId(enrollmentChecks.id())
                .Build());
Look up an authentication using an ID
EnrollmentChecks enrollmentChecks = client.threeDSecureService().submit(EnrollmentChecks.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(100)
                .currency("CAD")
                .customerIp("204.91.0.12")
                .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36")
                .card()
                    .cardNum("4107857757053670")
                    .cardExpiry()
                        .month(10)
                        .year(2018)
                        .Done()
                    .Done()
                .acceptHeader("text/html,application/xhtml+xml,application/xml;q\u003d0.9,image/webp,*/*;q\u003d0.8")
                .merchantUrl("https://www.google.com")
                .Build());
Authentications response = client.threeDSecureService().submit(Authentications.Builder()
                .merchantRefNum(enrollmentChecks.merchantRefNum())
                .paResp(enrollmentChecks.paReq())
                .enrollmentId(enrollmentChecks.id())
                .Build());
Authentications auth_response = client.threeDSecureService().get(response);
Look up an authentication and corresponding enrollment lookup
EnrollmentChecks enrollmentChecks = client.threeDSecureService().submit(EnrollmentChecks.Builder()
               .merchantRefNum(System.Guid.NewGuid().ToString())
               .amount(100)
               .currency("CAD")
               .customerIp("204.91.0.12")
               .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36")
               .card()
                   .cardNum("4107857757053670")
                   .cardExpiry()
                       .month(10)
                       .year(2018)
                       .Done()
                   .Done()
               .acceptHeader("text/html,application/xhtml+xml,application/xml;q\u003d0.9,image/webp,*/*;q\u003d0.8")
               .merchantUrl("https://www.google.com")
               .Build());
Authentications response = client.threeDSecureService().submit(Authentications.Builder()
                .merchantRefNum(enrollmentChecks.merchantRefNum())
                .paResp(enrollmentChecks.paReq())
                .enrollmentId(enrollmentChecks.id())
                .Build());
Authentications auth_response = client.threeDSecureService().get(response, true);
Did you find this page useful?