Payments Integration at Uber: a (Short) Case Study

Payments Integration:
a Short Case Study
Gergely Orosz
Engineering Manager, Amsterdam
Effortlessly
pay for Uber
Rider Payments Team
We build best in-class payment methods and
a magical digital payments experience for
riders. We enable the rest of Uber to leverage
this payments experience on the mobile and
the web.
Payments Integration at Uber: a (Short) Case Study
● Let’s Build
building the payments integration
● Let’s Go
testing & rolling out
● Let’s Harden
then the Real World happened
Agenda
Google Pay:
Client Side
Add Flow
If Google Pay is setup on the phone, this
step is low friction.
Google Pay:
Client Side
Charge (Exact Amount)
Flow
When riders owe a specific amount of
money for Uber, they need to settle that
amount before they can take a new trip.
Google Pay:
Client Side
Authorize Flow
Before taking a new trip with Google Pay,
riders need to authorize the estimated price
for the trip. This ensures the money will be
available for Uber to collect, once the trip
finishes.
Google Pay:
Client Side
Delete Flow
Riders can remove Google Pay from their list
of payment methods.
● Data for each type of payment a user has added
● Fields
○ User ID
○ Type
○ Custom fields per payments type
■ Display information
■ Metadata used for processing/charging
Payments Profile
Void
Refund a previous authorization to the user.
This can happen e.g. when the rider cancels
shortly after requesting.
Delete
Remove the payment profile from the rider’s
account. While it sounds straightforward, can
lead to interesting edge cases when doing
this e.g. while still on a ride.
Add
When adding Google Pay on the client side,
create a payment profile with all necessary
data for use.
Auth
Guarantee that a specific amount of funds
will be available for charging later by
authorizing this amount. Authorization is done
by the card issuer and funds can be held up
to seven days.
Google Pay:
Backend
Operations
Charge
Move a specific amount of money from the
user’s Google Pay account to Uber.
Capture
Collect a previous authorization and move the
money from the user’s Google Pay account
to Uber.
Google Pay: Auth Flow
Mobile Google SDK Uber.com Braintree
Get payment data
Nonce
Pickup request (with nonce)
Exchange nonce
Payment token
Auth with token
Auth result
Pickup result
Google Pay: Auth Flow (in Detail)
Uber.com
API
Risk Engine
Payments
Profile
Service
Braintree
Pickup request (with nonce)
Exchange nonce
Payment token
PSP Gateway
Decide trip risk
Risk check
Verify payment
profile (with nonce) Create (with nonce)
Payment token
Persist token
Payment profile verified
Google Pay: Auth Flow (in Detail)
Uber.com
API
Risk Engine
Payments
Profile
Service
Braintree
Operation result
PSP Gateway
Auth with token
Standardized auth data
Persist auth data
Payment profile verified
Auth
Decide trip risk
Sale operation with token
Auth complete
Trip request approved
Fetch token
Systems to Modify a Payment Flow
Risk Engine
Payments
Profile Service
Go Python
Core Systems (Current)
Uber.com API
NodeJS
PSP Gateway
Python
User Profile
Service
Go
● Switch payment on-trip
● Tipping
● Scheduled rides
● EATS order flow
● Promotions
● Uber for Business
● Default payment method fallback/selection
● Scheduled dunning of unsettled payments
● Uber Cash
Additional Use Cases
Move fast by unblocking
ourselves
- most teams at Uber, 2009-2017
Systems to Modify a Payment Flow
Risk Engine
Payments
Profile Service
Go Python
Core Systems (Current)
Uber.com API
NodeJS
PSP Gateway
Python
User Profile
Service
Go
Other Systems with Payments Business Logic
Tipping Service
Go
Promotions
Service
Python
Customer
Support
NodeJS
Marketplace
Matching
Service
Go
… and more!
Mostly Go, Java
Let’s do the right thing
and pay down our tech
& architecture debt.
- most teams at Uber, 2017 onwards
Systems to Modify a Payment Flow
Risk Engine
Payments
Profile Service
Go Python
Core Systems (Current)
Uber.com API
NodeJS
PSP Gateway
Python
User Profile
Service
Go
Other Systems with Payments Business Logic
Tipping Service
Go
Promotions
Service
Python
Customer
Support
NodeJS
Marketplace
Matching
Service
Go
… and more!
Mostly Go, Java
Nextgen Systems (WIP)
Payments Profile
Service v2
Java
Payments Auth
Service
Java
Uber.com API
Go
PSP Gateway v2
Java
Building a Payment Flow
● Adopting the API of the PSP is not the most difficult
● Systems fragmentation is the biggest challenge
● Let’s Build
building the payments integration
● Let’s Go
testing & rolling out
● Let’s Harden
then the Real World happened
Agenda
Sandbox Testing
Most PSPs have this (including Braintree).
Makes development faster/easier.
Testing
Testing with Real Cards
Once we think it’s ready, time to give it a test
with a real card/payment method.
Debugging
There are many systems where payments
data/results need to be tracked. Dedicated
tooling helps.
Develop Against Prod Data (Cerberus)
Send requests from a dev machine to production. Do this in a guarded,
transparent and easy way.
Initial version: supporting only read only endpoints.
Route Prod Traffic to Dev (Deputy)
The “reverse” of Developing Against Prod.
Route production messages to local dev machines. Requires installing
a middleware on the service (aka “deputize”)
Production Service
Access Control Gateway
Proxy
Client
Dev
Service
Virtual machine
Cerebus
Dev Service
Access Control Gateway
Proxy
Client
Forwarding
Service
Virtual machine
Cerebus
Prod
Service
Deputy
Middleware
Develop in Production*
* Safely
Everything is an
Experiment
We measure how changes affect key
business metrics. Things we typically care
about are rate of trip taking, first paid trips.
Rollout
Choosing the First
Experiment Region
Not too large, not too small.
Business requirements (upfront pricing &
previously no Android Pay)
And the first country is...
Rollout Plan
Decide well in advance
One city, 1%, 10%, 50%, 90%
Decide key metrics to track. For Google Pay:
core metrics + Acceptance Rate,
Uncollected Rate
Rollout: Acceptance Rate
Rollout: Uncollected Rate
● Cautious rollout paid off. Data was worse than expected.
● Double checked sampling & hypothesis.
● Rolled back.
● Investigated root cause with with Google Pay. Fixed the issue on both ends.
● Resumed rollout. Rinse & repeat.
Rollout
● Let’s Build
building the payments integration
● Let’s Go
testing & rolling out
● Let’s Harden
then the Real World happened
Agenda
Anything that can go
wrong, will go wrong.
- Murphy
Monitoring
See what is going on with the system, at any
given time.
We built monitoring dashboards segmented
by:
● payment type
● operation
● city/region
Our monitoring dashboards are based on
Grafana.
Monitoring & Alerting
Alerting
When something is out of the ordinary, fire a
pager.
We use machine learning for anomaly
detection and alerting. We have global, as
well as local (country level) alerts setup.
Mitigation & Production
Logs
Once an alert fires, we quickly determine if
there is a likely outage happening. We have
tools to see the latest changes and mitigate
to roll back
We use Elasticsearch and Kibana
dashboards to visualize/browse our
(scrubbed) prod logs.
Monitoring & Alerting
Let’s talk about fraud.
Fraud is a problem that
never keeps us up at
night.
- said no one everyone building a payments system
Real-world
fraud: a story
Cast
● Location Spoofing
● Unsupported Region
● Silent Failure Error
● Untested Edge Case
● Whatsapp Economy
● Youtube
● Human Creativity
● Blameless Postmortem
Operational Monitoring vs
Fraud Monitoring
They are very different concepts. Need
different tools and approaches.
Real-world
fraud learnings
● Let’s Build
building the payments
integration
● Let’s Go
testing & rolling out
● Let’s Harden
then the Real World happened
Summary
Gergely Orosz
@GergelyOrosz
1 of 36

Recommended

DevOps Challenges and Best Practices by
DevOps Challenges and Best PracticesDevOps Challenges and Best Practices
DevOps Challenges and Best PracticesBrian Chorba
1.8K views44 slides
A Practical Template for Product Thinking by Google PM by
A Practical Template for Product Thinking by Google PMA Practical Template for Product Thinking by Google PM
A Practical Template for Product Thinking by Google PMProduct School
1.5K views20 slides
Technology Stack by
Technology StackTechnology Stack
Technology StackSV.CO
4.5K views25 slides
An Introduction to Maven by
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
13.9K views40 slides
Project report | Major Project | Engineering | Devansh Koolwal by
Project report | Major Project | Engineering | Devansh KoolwalProject report | Major Project | Engineering | Devansh Koolwal
Project report | Major Project | Engineering | Devansh KoolwalDevansh Koolwal
471 views19 slides
Design Jams! How to run creative sessions with the people who use your product. by
Design Jams! How to run creative sessions with the people who use your product.Design Jams! How to run creative sessions with the people who use your product.
Design Jams! How to run creative sessions with the people who use your product.UXPA International
1.4K views63 slides

More Related Content

What's hot

CI/CD on Google Cloud Platform by
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformDevOps Indonesia
4.5K views21 slides
Jenkins-CI by
Jenkins-CIJenkins-CI
Jenkins-CIGong Haibing
750 views39 slides
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer... by
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...Simplilearn
594 views51 slides
React Native by
React NativeReact Native
React NativeFatih Şimşek
963 views18 slides
On Call Process (PDF) by
On Call Process (PDF)On Call Process (PDF)
On Call Process (PDF)JOE RUSSO
4.2K views5 slides
Overview of React.JS - Internship Presentation - Week 5 by
Overview of React.JS - Internship Presentation - Week 5Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5Devang Garach
1.8K views34 slides

What's hot(20)

How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer... by Simplilearn
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
Simplilearn594 views
On Call Process (PDF) by JOE RUSSO
On Call Process (PDF)On Call Process (PDF)
On Call Process (PDF)
JOE RUSSO4.2K views
Overview of React.JS - Internship Presentation - Week 5 by Devang Garach
Overview of React.JS - Internship Presentation - Week 5Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5
Devang Garach1.8K views
Anil_Testing_Trainer by Anil Kumar
Anil_Testing_TrainerAnil_Testing_Trainer
Anil_Testing_Trainer
Anil Kumar1.5K views
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas... by Andreas Grabner
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Andreas Grabner2.3K views
SOFTWARE ENGINEERING - FINAL PRESENTATION Slides by Jeremy Zhong
SOFTWARE ENGINEERING - FINAL PRESENTATION SlidesSOFTWARE ENGINEERING - FINAL PRESENTATION Slides
SOFTWARE ENGINEERING - FINAL PRESENTATION Slides
Jeremy Zhong7.9K views
Agile Estimation for Fixed Price Model by jayanth72
Agile Estimation for Fixed Price ModelAgile Estimation for Fixed Price Model
Agile Estimation for Fixed Price Model
jayanth7244.7K views
ContinuousSecurity, Beyond Automation.pdf by Neelu Tripathy
ContinuousSecurity, Beyond Automation.pdfContinuousSecurity, Beyond Automation.pdf
ContinuousSecurity, Beyond Automation.pdf
Neelu Tripathy103 views
Customer First Creating data-driven products with a human touch by Deliveroo ... by Product School
Customer First Creating data-driven products with a human touch by Deliveroo ...Customer First Creating data-driven products with a human touch by Deliveroo ...
Customer First Creating data-driven products with a human touch by Deliveroo ...
Product School2.9K views
Smooth Collaboration With UX Designers by Zalando Sr PM by Product School
Smooth Collaboration With UX Designers by Zalando Sr PMSmooth Collaboration With UX Designers by Zalando Sr PM
Smooth Collaboration With UX Designers by Zalando Sr PM
Product School398 views

Similar to Payments Integration at Uber: a (Short) Case Study

Creating an Uber Clone - Part XXXI - Transcript.pdf by
Creating an Uber Clone - Part XXXI - Transcript.pdfCreating an Uber Clone - Part XXXI - Transcript.pdf
Creating an Uber Clone - Part XXXI - Transcript.pdfShaiAlmog1
263 views20 slides
Monetizing your Applications with PayPal X Payments Platform by
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments PlatformPayPalX Developer Network
1.3K views51 slides
Monetizing your Applications with PayPal X Payments Platform by
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platformguest72b121
893 views51 slides
Integration of payment gateways using Paypal account by
Integration of payment gateways using Paypal account Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account Phenom People
10.2K views19 slides
Monetize with PayPal X Payments Platform by
Monetize with PayPal X Payments PlatformMonetize with PayPal X Payments Platform
Monetize with PayPal X Payments Platformguest72b121
15.1K views143 slides
SRS for Google Pay(Gpay) by
SRS for Google Pay(Gpay)SRS for Google Pay(Gpay)
SRS for Google Pay(Gpay)SiddharthKumar220
9.9K views19 slides

Similar to Payments Integration at Uber: a (Short) Case Study(20)

Creating an Uber Clone - Part XXXI - Transcript.pdf by ShaiAlmog1
Creating an Uber Clone - Part XXXI - Transcript.pdfCreating an Uber Clone - Part XXXI - Transcript.pdf
Creating an Uber Clone - Part XXXI - Transcript.pdf
ShaiAlmog1263 views
Monetizing your Applications with PayPal X Payments Platform by guest72b121
Monetizing your Applications withPayPal X Payments PlatformMonetizing your Applications withPayPal X Payments Platform
Monetizing your Applications with PayPal X Payments Platform
guest72b121893 views
Integration of payment gateways using Paypal account by Phenom People
Integration of payment gateways using Paypal account Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account
Phenom People10.2K views
Monetize with PayPal X Payments Platform by guest72b121
Monetize with PayPal X Payments PlatformMonetize with PayPal X Payments Platform
Monetize with PayPal X Payments Platform
guest72b12115.1K views
SpringOne Platform 2019 by Junya Suzuki
SpringOne Platform 2019SpringOne Platform 2019
SpringOne Platform 2019
Junya Suzuki1.4K views
Mobile payments at Droidcon Eastern Europe by PayPal
Mobile payments at Droidcon Eastern EuropeMobile payments at Droidcon Eastern Europe
Mobile payments at Droidcon Eastern Europe
PayPal1.3K views
Monetizing your apps with PayPal API:s by Disruptive Code
Monetizing your apps with PayPal API:sMonetizing your apps with PayPal API:s
Monetizing your apps with PayPal API:s
Disruptive Code3.9K views
07 factors to consider while choosing an ecommerce payment gateway by SnehaDas60
07 factors to consider while choosing an ecommerce payment gateway07 factors to consider while choosing an ecommerce payment gateway
07 factors to consider while choosing an ecommerce payment gateway
SnehaDas6023 views
Scaling Experimentation & Data Capture at Grab by Roman
Scaling Experimentation & Data Capture at GrabScaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at Grab
Roman 459 views
Payments in Mobile Apps by Cleveroad
Payments in Mobile AppsPayments in Mobile Apps
Payments in Mobile Apps
Cleveroad243 views
AutoPay - Travel Payments by Phillip Tau
AutoPay - Travel PaymentsAutoPay - Travel Payments
AutoPay - Travel Payments
Phillip Tau432 views
Long running processes in DDD by Bernd Ruecker
Long running processes in DDDLong running processes in DDD
Long running processes in DDD
Bernd Ruecker8K views
Self checkout application presentation by AshwinBicholiya
Self checkout application presentationSelf checkout application presentation
Self checkout application presentation
AshwinBicholiya570 views
Frappé Open Day Presentations - April 2016 by Neil Lasrado
Frappé Open Day Presentations - April 2016Frappé Open Day Presentations - April 2016
Frappé Open Day Presentations - April 2016
Neil Lasrado808 views

More from Gergely Orosz

Mobile Architecture at Scale by
Mobile Architecture at ScaleMobile Architecture at Scale
Mobile Architecture at ScaleGergely Orosz
689 views78 slides
Continuous testing at scale by
Continuous testing at scaleContinuous testing at scale
Continuous testing at scaleGergely Orosz
1.3K views78 slides
Success on the Marketplace, App Store and Apps Marketplace by
Success on the Marketplace, App Store and Apps MarketplaceSuccess on the Marketplace, App Store and Apps Marketplace
Success on the Marketplace, App Store and Apps MarketplaceGergely Orosz
815 views63 slides
Wp7 performance challenges by
Wp7 performance challengesWp7 performance challenges
Wp7 performance challengesGergely Orosz
563 views28 slides
Developing for Windows Phone 7 by
Developing for Windows Phone 7Developing for Windows Phone 7
Developing for Windows Phone 7Gergely Orosz
903 views47 slides
An Introduction To Silverlight by
An Introduction To SilverlightAn Introduction To Silverlight
An Introduction To SilverlightGergely Orosz
765 views31 slides

More from Gergely Orosz(6)

Mobile Architecture at Scale by Gergely Orosz
Mobile Architecture at ScaleMobile Architecture at Scale
Mobile Architecture at Scale
Gergely Orosz689 views
Continuous testing at scale by Gergely Orosz
Continuous testing at scaleContinuous testing at scale
Continuous testing at scale
Gergely Orosz1.3K views
Success on the Marketplace, App Store and Apps Marketplace by Gergely Orosz
Success on the Marketplace, App Store and Apps MarketplaceSuccess on the Marketplace, App Store and Apps Marketplace
Success on the Marketplace, App Store and Apps Marketplace
Gergely Orosz815 views
Wp7 performance challenges by Gergely Orosz
Wp7 performance challengesWp7 performance challenges
Wp7 performance challenges
Gergely Orosz563 views
Developing for Windows Phone 7 by Gergely Orosz
Developing for Windows Phone 7Developing for Windows Phone 7
Developing for Windows Phone 7
Gergely Orosz903 views
An Introduction To Silverlight by Gergely Orosz
An Introduction To SilverlightAn Introduction To Silverlight
An Introduction To Silverlight
Gergely Orosz765 views

Recently uploaded

20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
45 views73 slides
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
29 views26 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
62 views54 slides
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
317 views86 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
38 views43 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
58 views21 slides

Recently uploaded(20)

Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely29 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue62 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue38 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue44 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue70 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue40 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray1042 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue75 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue26 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue37 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue89 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker48 views

Payments Integration at Uber: a (Short) Case Study

  • 1. Payments Integration: a Short Case Study Gergely Orosz Engineering Manager, Amsterdam
  • 2. Effortlessly pay for Uber Rider Payments Team We build best in-class payment methods and a magical digital payments experience for riders. We enable the rest of Uber to leverage this payments experience on the mobile and the web.
  • 4. ● Let’s Build building the payments integration ● Let’s Go testing & rolling out ● Let’s Harden then the Real World happened Agenda
  • 5. Google Pay: Client Side Add Flow If Google Pay is setup on the phone, this step is low friction.
  • 6. Google Pay: Client Side Charge (Exact Amount) Flow When riders owe a specific amount of money for Uber, they need to settle that amount before they can take a new trip.
  • 7. Google Pay: Client Side Authorize Flow Before taking a new trip with Google Pay, riders need to authorize the estimated price for the trip. This ensures the money will be available for Uber to collect, once the trip finishes.
  • 8. Google Pay: Client Side Delete Flow Riders can remove Google Pay from their list of payment methods.
  • 9. ● Data for each type of payment a user has added ● Fields ○ User ID ○ Type ○ Custom fields per payments type ■ Display information ■ Metadata used for processing/charging Payments Profile
  • 10. Void Refund a previous authorization to the user. This can happen e.g. when the rider cancels shortly after requesting. Delete Remove the payment profile from the rider’s account. While it sounds straightforward, can lead to interesting edge cases when doing this e.g. while still on a ride. Add When adding Google Pay on the client side, create a payment profile with all necessary data for use. Auth Guarantee that a specific amount of funds will be available for charging later by authorizing this amount. Authorization is done by the card issuer and funds can be held up to seven days. Google Pay: Backend Operations Charge Move a specific amount of money from the user’s Google Pay account to Uber. Capture Collect a previous authorization and move the money from the user’s Google Pay account to Uber.
  • 11. Google Pay: Auth Flow Mobile Google SDK Uber.com Braintree Get payment data Nonce Pickup request (with nonce) Exchange nonce Payment token Auth with token Auth result Pickup result
  • 12. Google Pay: Auth Flow (in Detail) Uber.com API Risk Engine Payments Profile Service Braintree Pickup request (with nonce) Exchange nonce Payment token PSP Gateway Decide trip risk Risk check Verify payment profile (with nonce) Create (with nonce) Payment token Persist token Payment profile verified
  • 13. Google Pay: Auth Flow (in Detail) Uber.com API Risk Engine Payments Profile Service Braintree Operation result PSP Gateway Auth with token Standardized auth data Persist auth data Payment profile verified Auth Decide trip risk Sale operation with token Auth complete Trip request approved Fetch token
  • 14. Systems to Modify a Payment Flow Risk Engine Payments Profile Service Go Python Core Systems (Current) Uber.com API NodeJS PSP Gateway Python User Profile Service Go
  • 15. ● Switch payment on-trip ● Tipping ● Scheduled rides ● EATS order flow ● Promotions ● Uber for Business ● Default payment method fallback/selection ● Scheduled dunning of unsettled payments ● Uber Cash Additional Use Cases
  • 16. Move fast by unblocking ourselves - most teams at Uber, 2009-2017
  • 17. Systems to Modify a Payment Flow Risk Engine Payments Profile Service Go Python Core Systems (Current) Uber.com API NodeJS PSP Gateway Python User Profile Service Go Other Systems with Payments Business Logic Tipping Service Go Promotions Service Python Customer Support NodeJS Marketplace Matching Service Go … and more! Mostly Go, Java
  • 18. Let’s do the right thing and pay down our tech & architecture debt. - most teams at Uber, 2017 onwards
  • 19. Systems to Modify a Payment Flow Risk Engine Payments Profile Service Go Python Core Systems (Current) Uber.com API NodeJS PSP Gateway Python User Profile Service Go Other Systems with Payments Business Logic Tipping Service Go Promotions Service Python Customer Support NodeJS Marketplace Matching Service Go … and more! Mostly Go, Java Nextgen Systems (WIP) Payments Profile Service v2 Java Payments Auth Service Java Uber.com API Go PSP Gateway v2 Java
  • 20. Building a Payment Flow ● Adopting the API of the PSP is not the most difficult ● Systems fragmentation is the biggest challenge
  • 21. ● Let’s Build building the payments integration ● Let’s Go testing & rolling out ● Let’s Harden then the Real World happened Agenda
  • 22. Sandbox Testing Most PSPs have this (including Braintree). Makes development faster/easier. Testing Testing with Real Cards Once we think it’s ready, time to give it a test with a real card/payment method. Debugging There are many systems where payments data/results need to be tracked. Dedicated tooling helps.
  • 23. Develop Against Prod Data (Cerberus) Send requests from a dev machine to production. Do this in a guarded, transparent and easy way. Initial version: supporting only read only endpoints. Route Prod Traffic to Dev (Deputy) The “reverse” of Developing Against Prod. Route production messages to local dev machines. Requires installing a middleware on the service (aka “deputize”) Production Service Access Control Gateway Proxy Client Dev Service Virtual machine Cerebus Dev Service Access Control Gateway Proxy Client Forwarding Service Virtual machine Cerebus Prod Service Deputy Middleware Develop in Production* * Safely
  • 24. Everything is an Experiment We measure how changes affect key business metrics. Things we typically care about are rate of trip taking, first paid trips. Rollout Choosing the First Experiment Region Not too large, not too small. Business requirements (upfront pricing & previously no Android Pay) And the first country is... Rollout Plan Decide well in advance One city, 1%, 10%, 50%, 90% Decide key metrics to track. For Google Pay: core metrics + Acceptance Rate, Uncollected Rate
  • 27. ● Cautious rollout paid off. Data was worse than expected. ● Double checked sampling & hypothesis. ● Rolled back. ● Investigated root cause with with Google Pay. Fixed the issue on both ends. ● Resumed rollout. Rinse & repeat. Rollout
  • 28. ● Let’s Build building the payments integration ● Let’s Go testing & rolling out ● Let’s Harden then the Real World happened Agenda
  • 29. Anything that can go wrong, will go wrong. - Murphy
  • 30. Monitoring See what is going on with the system, at any given time. We built monitoring dashboards segmented by: ● payment type ● operation ● city/region Our monitoring dashboards are based on Grafana. Monitoring & Alerting Alerting When something is out of the ordinary, fire a pager. We use machine learning for anomaly detection and alerting. We have global, as well as local (country level) alerts setup. Mitigation & Production Logs Once an alert fires, we quickly determine if there is a likely outage happening. We have tools to see the latest changes and mitigate to roll back We use Elasticsearch and Kibana dashboards to visualize/browse our (scrubbed) prod logs.
  • 33. Fraud is a problem that never keeps us up at night. - said no one everyone building a payments system
  • 34. Real-world fraud: a story Cast ● Location Spoofing ● Unsupported Region ● Silent Failure Error ● Untested Edge Case ● Whatsapp Economy ● Youtube ● Human Creativity ● Blameless Postmortem
  • 35. Operational Monitoring vs Fraud Monitoring They are very different concepts. Need different tools and approaches. Real-world fraud learnings
  • 36. ● Let’s Build building the payments integration ● Let’s Go testing & rolling out ● Let’s Harden then the Real World happened Summary Gergely Orosz @GergelyOrosz

Editor's Notes

  1. Hands up if you are familiar with the concept of a payments profile.
  2. Put your hands up if you have been involved with fraud cases hands-on when building a system.