Develop payments solutions without third-party cookies

Chrome for Developers · Intermediate ·🔧 Backend Engineering ·1y ago

Key Takeaways

This video teaches how to develop payments solutions without relying on third-party cookies

Full Transcript

[Music] Hey web developers, let's talk about third party cookies in your payment solutions. It's important to remember that third party cookies can actually come from the same party. Imagine you own multiple sites and need cookies to be shared between them. Your shop.example may use your shop payment.example example service and because these are two different sites, cookies shared between them are considered third party. Some solutions need to share information across websites. But third party cookies can be used to track user activity and can lead to privacy and security vulnerabilities. Because of these risks, third party cookies may be blocked by users, enterprise policies or browser design. Web developers need to make sure they support all the users, even those who don't have access to third party cookies. Let's take a look at how to ensure your payment solution works as expected for all your users. We generally only expect breakages in cases where third party cookies are used. Solutions that rely on first party cookies should not be impacted. Let's take a look at examples that do rely on third party cookies. Imagine you distribute a handy earnings dashboard widget, earnings. The widget can be embedded on different sites. Let's say the widget stores user settings such as widget appearance, currency, or frequency of notifications. These settings don't necessarily need to be shared across different embedding sites. The user wants to tailor the settings for each site. Say on dog sitting. They wanted to look one way, maybe get notifications less often, but on another site, they want a totally different look and notification schedule. But what happens if third party cookies are blocked? Because the earnings.example widget is embedded on docitting. It is considered to be in a crossside context. When the user tries to save their preferences, earnings. set a cookie but that is prevented by the browser because it's a third party cookie. Now another example imagine you have an online shoes store shoes.ample you also have a separate service shoes accounts.example where users manage their accounts and payment details. When the user wants to complete their purchase they may want to update their preferred payment method. Ideally, you'd let them to do that right there within a little widget embedded in your checkout page instead of redirecting them to the top level shoes. But when third party cookies are blocked, the user won't be able to load the embed as their session cookie is set by tople shoes accounts. And is not available in the embedded context. Here is another example. Imagine you distribute a payment solution paymentprovider. Other shops can rely on this solution and when it comes to a checkout, they render a checkout form provided by paymentprovider. When third party cookies are blocked, payment provider won't be able to access its partition storage. This means the widget cannot recognize returning users. As a result, user saved information such as preferred payment method or delivery address won't fill automatically and the user may have to re-enter their information. All right. And what about keeping payments safe online? Fraud detection. Imagine you distribute a fraud detection widget antibbot. The widget checks if your users are who they say they are. It only trusts users who've recently passed a challenge on other websites. If third party cookies are not available, the antibbot.example widget would not know if the user is trustworthy. So, the user will have to do the challenge again and again and again on every website they visit. Not the best user experience, right? Did any of these scenarios ring a bell? Are you using similar features on your website? Let's make sure your payment solution is streamlined and userfriendly for everyone regardless of their browser settings. To test your site, go to dev tools, open privacy and security panel, go to controls tab, and enable temporarily limit third party cookies. Make sure that all the relevant payment solutions work as expected. Here is a checklist. Does your pay with button work? Does it redirect you correctly? Does the payment page load? Can you complete the payment without any hiccups? Do you get redirected to the right place on the website? Can you access your dashboard and see all the payments? Try navigating around transaction history, payment details, any problems. Can you add, update, or delete payment methods? Does your fraud detection solution work? Does it add any extra steps for the users? Remember our earnings dashboard example? In this example, settings cookie only need to be accessed within the specific combination dog. Plus earnings. User settings data doesn't need to be shared within the top level context of earnings. Neither does the earnings.ample widget embedded on catsitting.example need to know which user settings are saved for the widget embedded on the dog sitting. For data that stays within the widget and the embedded site, add the partitioned attribute to your cookies and keep them isolated. Partitioned cookies known as chips allow you to opt a cookie into partition storage with a separate cookie jar per top level site. But what if you do need to share cookies between sites? Let's revisit our shoes. And its account management site shoes accounts.ample. If you own multiple related sites, you can benefit from related website sets or RWS. RWS is a way for a company to declare relationships between sites so that browsers that support RWS allow limited thirdparty cookie access for specific purposes. Your shoes accounts.example embed will be able to access its top level unpartitioned storage when embedded on one of the related sites. You can include as many CCTLDs and service domains as you like in a related website set, but associated domains are limited to a maximum of five. All right, but what if you distribute a payment solution that other companies rely on, just like in our payment provider. There are multiple options here. Let's start with a storage access API. If paymentprovider widget is embedded on shop.example Example, when third party cookies are blocked, it doesn't have access to its own and partitioned storage by default. With storage access API, the widget can prompt the user to grant storage access with user permission. Payment provider.example widget will load as expected. Sure, that would work, but you can make it even smoother with federated credential management or FTCM API. With FETSCM, users can sign in on sites that rely on your solution with payment provider account with a single tap. Say the user is visiting shop.example and signs into paymentprovider.example account with FTCM. First, FTECM lets you control the login prompt telling users exactly what data you are requesting. Second, an active FETCM session serves as a trust signal for the storage access API. So when paymentprovider.example widget requests access to its unpartitioned storage with storage access API, it will automatically get it without additional user prompts or gestures. The checkout form will be loaded as expected on the reliance sites that use FTCM to sign the user into your service provider. Now that you know how to unlock widget interactions, what about fraud detection? We also have an API for you. Private state tokens. Private state tokens enable trust in a user's authenticity to be conveyed from one context to another. With private state tokens, you can issue a cryptographically signed token with limited information that is stored in a user's browser. These tokens can then be redeemed on other sites to check if the user is trustworthy. Because of the limited information included, these tokens cannot be used to reidentify users across sites. So, there you have it. A whole bunch of APIs to help you provide a great payment experience for all your users, whether or not third party cookies are available. For more information, check out our payments guide or learn how privacy sandbox API can be useful for other use cases. If you want to learn more about each API, we've put the documentation links in the description. And now, enjoy coding. [Music]

Original Description

Want to ensure a smooth payment experience for every user, whether or not third-party cookies are available? If your payments rely on third-party cookies, you might be missing out. This video shows you how to identify and address third-party cookie dependencies, and transition to alternative APIs to support payment flows even where cookies are restricted. Resources: Find out more about building identity solutions without third-party cookies → goo.gle/ps-payments Other use cases → goo.gle/ps-guides Feedback and support for Privacy Sandbox → https://goo.gle/ps-support Chapters: 0:00 What's happening with third-party cookies? 1:05 Which solutions won’t be impacted? 1:15 Which payments user journeys may be affected? 4:21 How can I audit my site for third-party cookies and test user journeys for breakage? 5:26 What technologies can I use to support payments user journeys affected by third-party cookie restrictions? 9:20 Where can I find out more and get support? Watch more What is the Privacy Sandbox? → http://goo.gle/ps-videos Subscribe to Chrome for Developers → https://goo.gle/ChromeDevs #ChromeForDevelopers #Chrome #PrivacySandbox #ThirdPartyCookies #Payments Speaker: Natalia Markoborodova Products Mentioned: Chrome, Privacy Sandbox
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Chrome for Developers · Chrome for Developers · 0 of 60

← Previous Next →
1 Polymer Performance Patterns (The Polymer Summit 2015)
Polymer Performance Patterns (The Polymer Summit 2015)
Chrome for Developers
2 Polymer Power Tools (The Polymer Summit 2015)
Polymer Power Tools (The Polymer Summit 2015)
Chrome for Developers
3 Chrome Dev Summit 2014 – Chrome Case Studies
Chrome Dev Summit 2014 – Chrome Case Studies
Chrome for Developers
4 Web Directions Code 2015 round up
Web Directions Code 2015 round up
Chrome for Developers
5 Maintainable Code - HTTP203
Maintainable Code - HTTP203
Chrome for Developers
6 iron-ajax… wat?! -- Polycasts #26
iron-ajax… wat?! -- Polycasts #26
Chrome for Developers
7 The Guardian - Supercharged
The Guardian - Supercharged
Chrome for Developers
8 ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
Chrome for Developers
9 #AskPolymer: Rob answers all the questions ever -- Polycasts #27
#AskPolymer: Rob answers all the questions ever -- Polycasts #27
Chrome for Developers
10 The Future of JavaScript - HTTP203
The Future of JavaScript - HTTP203
Chrome for Developers
11 Data Binding 101 -- Polycasts #28
Data Binding 101 -- Polycasts #28
Chrome for Developers
12 The Guardian part 2 - Supercharged
The Guardian part 2 - Supercharged
Chrome for Developers
13 The Future of Web Audio: with Chris Wilson and Chris Lowis
The Future of Web Audio: with Chris Wilson and Chris Lowis
Chrome for Developers
14 Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome for Developers
15 Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Chrome for Developers
16 #AskPolymer: How do you make the show? -- Polycasts #29
#AskPolymer: How do you make the show? -- Polycasts #29
Chrome for Developers
17 Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Chrome for Developers
18 Binding to Objects -- Polycasts #30
Binding to Objects -- Polycasts #30
Chrome for Developers
19 Player FM - Supercharged
Player FM - Supercharged
Chrome for Developers
20 Where’s the Designer? #AskPolymer -- Polycasts #31
Where’s the Designer? #AskPolymer -- Polycasts #31
Chrome for Developers
21 Jake Beats Wikipedia - HTTP203
Jake Beats Wikipedia - HTTP203
Chrome for Developers
22 Supercharged Observers! -- Polycasts #32
Supercharged Observers! -- Polycasts #32
Chrome for Developers
23 Jai's Web blog - Supercharged
Jai's Web blog - Supercharged
Chrome for Developers
24 Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Chrome for Developers
25 What about internationalization? #AskPolymer -- Polycasts #33
What about internationalization? #AskPolymer -- Polycasts #33
Chrome for Developers
26 Developing for Billions (Chrome Dev Summit 2015)
Developing for Billions (Chrome Dev Summit 2015)
Chrome for Developers
27 Google+ Performance Improvement Comparison
Google+ Performance Improvement Comparison
Chrome for Developers
28 Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Chrome for Developers
29 Progressive Web Apps (Chrome Dev Summit 2015)
Progressive Web Apps (Chrome Dev Summit 2015)
Chrome for Developers
30 Instant Loading with Service Workers (Chrome Dev Summit 2015)
Instant Loading with Service Workers (Chrome Dev Summit 2015)
Chrome for Developers
31 Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Chrome for Developers
32 Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Chrome for Developers
33 Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Chrome for Developers
34 Polymer - State of the Union (Chrome Dev Summit 2015)
Polymer - State of the Union (Chrome Dev Summit 2015)
Chrome for Developers
35 Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Chrome for Developers
36 Introduction to RAIL (Chrome Dev Summit 2015)
Introduction to RAIL (Chrome Dev Summit 2015)
Chrome for Developers
37 DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
Chrome for Developers
38 RAIL in the real world (Chrome Dev Summit 2015)
RAIL in the real world (Chrome Dev Summit 2015)
Chrome for Developers
39 #ChromeDevSummit talks are up - W00T! -- Polycast #34
#ChromeDevSummit talks are up - W00T! -- Polycast #34
Chrome for Developers
40 V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
Chrome for Developers
41 Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Chrome for Developers
42 Owning your performance: RAIL (Chrome Dev Summit 2015)
Owning your performance: RAIL (Chrome Dev Summit 2015)
Chrome for Developers
43 HTTP/2 101 (Chrome Dev Summit 2015)
HTTP/2 101 (Chrome Dev Summit 2015)
Chrome for Developers
44 Leadership Panel (Chrome Dev Summit 2015)
Leadership Panel (Chrome Dev Summit 2015)
Chrome for Developers
45 Build Processes, Totally Tooling Tips (S2, Ep 5)
Build Processes, Totally Tooling Tips (S2, Ep 5)
Chrome for Developers
46 Accessibility (Chrome Dev Summit 2015)
Accessibility (Chrome Dev Summit 2015)
Chrome for Developers
47 Binding to Arrays -- Polycasts #35
Binding to Arrays -- Polycasts #35
Chrome for Developers
48 HTTP2 - HTTP203
HTTP2 - HTTP203
Chrome for Developers
49 Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome for Developers
50 Call For Submissions - Supercharged
Call For Submissions - Supercharged
Chrome for Developers
51 Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Chrome for Developers
52 Testing AJAX with Web Component Tester -- Polycasts #37
Testing AJAX with Web Component Tester -- Polycasts #37
Chrome for Developers
53 Slack: Extended Xmas Special - Supercharged
Slack: Extended Xmas Special - Supercharged
Chrome for Developers
54 Browser testing with Travis & Sauce Labs -- Polycasts #38
Browser testing with Travis & Sauce Labs -- Polycasts #38
Chrome for Developers
55 Optimize for production with Vulcanize -- Polycasts #39
Optimize for production with Vulcanize -- Polycasts #39
Chrome for Developers
56 Highlights from Chrome Dev Summit 2015
Highlights from Chrome Dev Summit 2015
Chrome for Developers
57 Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome for Developers
58 Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Chrome for Developers
59 How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
Chrome for Developers
60 Colors – DevTools Tonight #0 (Pilot)
Colors – DevTools Tonight #0 (Pilot)
Chrome for Developers

Related Reads

Chapters (6)

What's happening with third-party cookies?
1:05 Which solutions won’t be impacted?
1:15 Which payments user journeys may be affected?
4:21 How can I audit my site for third-party cookies and test user journeys for break
5:26 What technologies can I use to support payments user journeys affected by third-
9:20 Where can I find out more and get support?
Up next
/dev/push: An Open Vercel Alternative to Ship Your Apps Quickly
Ian Wootten
Watch →