SlideShare a Scribd company logo
REDESIGNING PAYPAL APIS
FOR SCALE AND SIMPLICITY
Praveen Alavilli, Deepak Nadig
THE PAYPAL CONTEXT

PayPal …
–  137 million active accounts
–  193 markets in 26 currencies
– 

2012: Total Payment Volume was $145 billion

– 
– 
– 
– 
– 
– 

Q3 2013
Total Payment Volume of $44 Billion
At $5580 TPV / second
Growing 25% YoY
729 million transactions
8 million payments every day

In a dynamic environment
–  300+ features per quarter
–  We roll 100,000+ lines of code every two weeks
PAYPAL PLATFORM EVOLVED
TO SUPPORT INTEGRATION NEEDS
2001 Instant Payment Notification

2004 Transaction, Mass Pay API

2005 Direct Payment API, Express Checkout

PayPal API

2007 Payment APIs (NVP)

2009 Adaptive APIs (SOAP/XML, NV, JSON)

PayPal Capabilities
2013 Payment APIs (REST)
REALITY WAS…
Async APIs
Client Apps
Client APIs
Mobile Apps
Backend

Web APIs
PayPal
Platform

Other
Platforms

SOAP
APIs

Web Apps
Batch
APIs
Shopping
Carts

Hosted
Solutions
PAYPAL APIS HAD BECOME …
PAYPAL APIS ARE GETTING HERE …
REDEFINED DEVELOPER PLATFORM

Reestablish credibility with the external developer community by building
simple & consistent APIs with easy discovery and integration
that extend our reach into the richer industry ecosystem

Multiple developer portals

https://developer.paypal.com

Overlapping, inconsistent APIs

Clear, consistent APIs

Learn from large documents

Learn from simple HTML, Tools

Complex sign-up

Simple as-needed sign-up

Incomplete, unreliable Sandbox

Complete, reliable Sandbox

7
STARTED FROM BASIC PRINCIPLES …

Who are the end users?
•  customer segments, expectations
Who are the developers ?
•  developers, merchants, system integrators
How should we design our API ?
•  sync, async, batch, errors
How should we ease learning ?
•  docs, API explorers, HATEOAS console, …
How should we simplify integration ?
•  familiar standards, SDKs, support, …
ELEMENTS OF SUCCESS

ü  API Standards
ü  API Design Process
ü  Developer Experience
API STANDARDS
API Standards
External & Internal
•  Resource model
•  REST semantics
•  URI format
•  Environments
•  Versioning
•  Namespaces
•  Extensibility
•  Response codes
•  Patterns
•  Idempotency
•  Web linking
•  Filters
•  Deletion of resources
•  Pagination
•  Message formats
•  Data model
•  Common data types
•  Serialization
•  Security
•  Application identification
•  Errors
•  Error codes
•  Identification of PayPal SDK's calls

based on http://restcookbook.com/
REPRESENTATION & PATTERNS

•  Using the JSON data model
•  JSON serialization right now
•  Specifying common, standard, I18Nready data types
 {	
   "intent": ”sale",	
   "payer":{	
      "payment_method":"urn:payment_method:credit_card",	
      "first_name":"",	
      "last_name":"",	
      "funding_instrument":{	
         "credit_card":{	
            "number":1234123412341234,	
            "type":"",	
            "exp_month":12,	
            "exp_year":2015,	
            "cvv2":123	
         }	
      }	
   },	
   ”transactions":[	
      {	
         "amount":{	
            "total":1.0,	
            "currency":"USD"	
         },	
         "payee":{	
            "id":""	
         }	
      }	
   ]	
}	

•  Relying on standard patterns as
much as possible
•  Specifying standard patterns to
complement those:
•  Transaction processing and
avoiding duplication
•  Selection of subset for item lists
•  Error message format
•  (DRY) Don’t repeat yourself in your
implementation, but don’t worry
about repeating yourself in your API
design.
PATTERNS

•  Controller Pattern
•  https://api.paypal.com/v1/payments/payments/123/refund
•  View/Filter Pattern
•  https://api.paypal.com/v1/wallet/@me/funding-instruments/cards
•  HATEOAS
201 Created HTTP/1.1	
Content-Type: application/json	
	
{
	
"id":”1234134",	
"state":"approved",	
"transactions":{	
"authorization":{	
"id":”908098",	
"state":"authorized",	
"amount":{	
”total":1.0	
},	
"links":[	
{	
"rel":"self",	
"href":"https://api.paypal.com/v1/payments/authorization/908098"	
},	
{	
"rel":"paypal:capture",	
"href":"https://api.paypal.com/v1/payments/authorization/908098/capture"	
}	
]	
}	
}
THE API DESIGN PROCESS
Use-case
analysis

Feedback

API
Specification

Capability
Mapping

Resource
Modeling

REMARKABLE SIMILARITIES WITH
USER EXPERIENCE DESIGN PROCESS
USE CASE ANALYSIS

•  Actors, roles, relationships, scenarios
•  System boundaries
•  Functional and non-functional
requirements

•  Error conditions and Contingencies
•  Coarse grained or Fine grained
•  Expected behaviors
RESOURCE MODELING
•  Split business into functionality
•  Modeling to identify:
•  Entities
Resource
•  Actions on those:
HTTP methods and controller resources
•  Relationships and transitions
•  Events (web hooks)

Examples:
https://api.paypal.com/v1/payments/payment/{id}	
https://api.paypal.com/v1/payments/authorization/{id}	

…
VERSIONING STRATEGY

• 

Backward compatibility is
critical

• 
• 

But, versioning supported
https://api.paypal.com/v1/…
AUTHENTICATION & AUTHORIZATION

•  OAuth 2.0
•  User Approval/Consent
•  Token Granting
• 
• 

Public Clients
Confidential Clients

•  OAuth scopes to represent ability for an
application to:
•  Use certain functionality
•  Access and operate on a resource
• 

E.g, capture funds authorized previously, read
financial instrument from wallet,…

•  OAuth != Security
•  Always use SSL
•  Data at rest is always encrypted!
API SPECIFICATION

•  Human & machine
readable format
•  Several options:
•  Google Discovery
Document
•  Swagger
•  IODocs
•  WADL
•  API Blueprint
•  RAML
•  JSON Schema
•  GenIO:
https://github.com/paypal/
genio
FEEDBACK

•  Mechanisms
•  Hackathons with internal and
external developers
•  Developer council
•  Measure
•  TTFHW
•  Integration effort
•  Errors
DEVELOPER EXPERIENCE

•  Documentation & Tools
•  Sandbox
•  Quick sign-up
•  Integration monitoring and diagnostics
•  Technical support
DEVELOPER EXPERIENCE
SUMMARY

•  APIs are an important way for a company, like PayPal, to extend reach
•  Our APIs gathered entropy, which we addressed through good patterns
•  Basic principles to deliver a great developer experience
•  end users, developers, API design, learning, integration
•  Successful APIs come from
•  Familiar API standards
•  Good API design process
•  Simple and complete developer experience
•  While transformation of PayPal’s external platform is underway
•  The internal platform is going through a similar transformation
•  Goal is about business agility
•  Internal developer concerns are not that different
THANK YOU!
@ppalavilli @deepak_nadig

More Related Content

What's hot

SOA and API Convergence Strategy and Tactics
SOA and API Convergence Strategy and TacticsSOA and API Convergence Strategy and Tactics
SOA and API Convergence Strategy and Tactics
Chris Haddad
 
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
apidays
 
Evolution of API Management in the BBC
Evolution of API Management in the BBCEvolution of API Management in the BBC
Evolution of API Management in the BBC
Nordic APIs
 
Best Practices: The Role of API Management
Best Practices: The Role of API ManagementBest Practices: The Role of API Management
Best Practices: The Role of API Management
Akana
 
API Management - Why it matters!
API Management - Why it matters!API Management - Why it matters!
API Management - Why it matters!
Sven Bernhardt
 
API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2
WSO2
 
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
apidays
 
INTERFACE, by apidays - API Design is where culture and tech meet each other...
INTERFACE, by apidays  - API Design is where culture and tech meet each other...INTERFACE, by apidays  - API Design is where culture and tech meet each other...
INTERFACE, by apidays - API Design is where culture and tech meet each other...
apidays
 
API and SOA: Two Sides of the Same Coin?
API and SOA: Two Sides of the Same Coin?API and SOA: Two Sides of the Same Coin?
API and SOA: Two Sides of the Same Coin?
Akana
 
WSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and RoadmapWSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and Roadmap
WSO2
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie Mitra
CA API Management
 
Changing the game in hospitality integrations
Changing the game in hospitality integrationsChanging the game in hospitality integrations
Changing the game in hospitality integrations
luisw19
 
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
apidays
 
Transition from SOA to APIs for the App Economy - Bending the Spoon
Transition from SOA to APIs for the App Economy  - Bending the SpoonTransition from SOA to APIs for the App Economy  - Bending the Spoon
Transition from SOA to APIs for the App Economy - Bending the Spoon
Apigee | Google Cloud
 
Getting Started with the WSO2 manager
Getting Started with the WSO2  managerGetting Started with the WSO2  manager
Getting Started with the WSO2 managerWSO2
 
API Management
API ManagementAPI Management
API Management
Prolifics
 
Workshop: API Management
Workshop: API ManagementWorkshop: API Management
Workshop: API Management
WSO2
 
Lean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps CyclesLean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps Cycles
Nordic APIs
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
Nadeesha Gamage
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
Apigee | Google Cloud
 

What's hot (20)

SOA and API Convergence Strategy and Tactics
SOA and API Convergence Strategy and TacticsSOA and API Convergence Strategy and Tactics
SOA and API Convergence Strategy and Tactics
 
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
 
Evolution of API Management in the BBC
Evolution of API Management in the BBCEvolution of API Management in the BBC
Evolution of API Management in the BBC
 
Best Practices: The Role of API Management
Best Practices: The Role of API ManagementBest Practices: The Role of API Management
Best Practices: The Role of API Management
 
API Management - Why it matters!
API Management - Why it matters!API Management - Why it matters!
API Management - Why it matters!
 
API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2API Management 101: The New API Experience with WSO2
API Management 101: The New API Experience with WSO2
 
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
INTERFACE by apidays_Recommendations for API Governance and an API Economy Ce...
 
INTERFACE, by apidays - API Design is where culture and tech meet each other...
INTERFACE, by apidays  - API Design is where culture and tech meet each other...INTERFACE, by apidays  - API Design is where culture and tech meet each other...
INTERFACE, by apidays - API Design is where culture and tech meet each other...
 
API and SOA: Two Sides of the Same Coin?
API and SOA: Two Sides of the Same Coin?API and SOA: Two Sides of the Same Coin?
API and SOA: Two Sides of the Same Coin?
 
WSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and RoadmapWSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and Roadmap
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie Mitra
 
Changing the game in hospitality integrations
Changing the game in hospitality integrationsChanging the game in hospitality integrations
Changing the game in hospitality integrations
 
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
 
Transition from SOA to APIs for the App Economy - Bending the Spoon
Transition from SOA to APIs for the App Economy  - Bending the SpoonTransition from SOA to APIs for the App Economy  - Bending the Spoon
Transition from SOA to APIs for the App Economy - Bending the Spoon
 
Getting Started with the WSO2 manager
Getting Started with the WSO2  managerGetting Started with the WSO2  manager
Getting Started with the WSO2 manager
 
API Management
API ManagementAPI Management
API Management
 
Workshop: API Management
Workshop: API ManagementWorkshop: API Management
Workshop: API Management
 
Lean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps CyclesLean Method for Building Good APIs for Business – APIOps Cycles
Lean Method for Building Good APIs for Business – APIOps Cycles
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
 

Similar to Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013

Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017 Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017
simonredfern
 
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley Lab
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley LabPaypal Platform: Evolving for simplicity and reach - IBM Silicon Valley Lab
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley LabDeepak Nadig
 
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
WSO2Con EU  2015: Securing, Monitoring and Monetizing APIsWSO2Con EU  2015: Securing, Monitoring and Monetizing APIs
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
WSO2
 
Synergies across APIs and IAM
Synergies across APIs and IAMSynergies across APIs and IAM
Synergies across APIs and IAM
Sagara Gunathunga
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
ColdFusionConference
 
Providing Full Featured Payments (API) at Scale
Providing Full Featured Payments (API) at ScaleProviding Full Featured Payments (API) at Scale
Providing Full Featured Payments (API) at Scale
Praveen Alavilli
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
Christian Posta
 
A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019
Bill Doerrfeld
 
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
Deepak Nadig
 
APIs and Beyond
APIs and BeyondAPIs and Beyond
APIs and BeyondWSO2
 
apidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ngapidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ng
apidays
 
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
apidays
 
Open Banking & Open Insurance
Open Banking & Open InsuranceOpen Banking & Open Insurance
Open Banking & Open Insurance
Amazon Web Services
 
WAC Network APIs @ OverTheAir 2011
WAC Network APIs @ OverTheAir 2011WAC Network APIs @ OverTheAir 2011
WAC Network APIs @ OverTheAir 2011
Ricardo Varela
 
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
Nordic APIs
 
Adaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers ParadiseAdaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers Paradise
PayPal
 
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
Mashery
 
Introduction to the Globus Platform for Developers
Introduction to the Globus Platform for DevelopersIntroduction to the Globus Platform for Developers
Introduction to the Globus Platform for Developers
Globus
 
WSO2Con Asia 2014 - Building the API-Centric Enterprise
WSO2Con Asia 2014 - Building the API-Centric EnterpriseWSO2Con Asia 2014 - Building the API-Centric Enterprise
WSO2Con Asia 2014 - Building the API-Centric EnterpriseWSO2
 

Similar to Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013 (20)

Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017 Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017
 
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley Lab
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley LabPaypal Platform: Evolving for simplicity and reach - IBM Silicon Valley Lab
Paypal Platform: Evolving for simplicity and reach - IBM Silicon Valley Lab
 
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
WSO2Con EU  2015: Securing, Monitoring and Monetizing APIsWSO2Con EU  2015: Securing, Monitoring and Monetizing APIs
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
 
Synergies across APIs and IAM
Synergies across APIs and IAMSynergies across APIs and IAM
Synergies across APIs and IAM
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Providing Full Featured Payments (API) at Scale
Providing Full Featured Payments (API) at ScaleProviding Full Featured Payments (API) at Scale
Providing Full Featured Payments (API) at Scale
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019
 
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
Evolution of the PayPal API Platform: Enabling the future of Money at WooComm...
 
Smartone v1.0
Smartone v1.0Smartone v1.0
Smartone v1.0
 
APIs and Beyond
APIs and BeyondAPIs and Beyond
APIs and Beyond
 
apidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ngapidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ng
 
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
apidays LIVE Hong Kong 2021 - Enterprise Integration Patterns for OpenAPI Ini...
 
Open Banking & Open Insurance
Open Banking & Open InsuranceOpen Banking & Open Insurance
Open Banking & Open Insurance
 
WAC Network APIs @ OverTheAir 2011
WAC Network APIs @ OverTheAir 2011WAC Network APIs @ OverTheAir 2011
WAC Network APIs @ OverTheAir 2011
 
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
Introduction to The 6 Insights of API Practice (Bill Doerrfeld)
 
Adaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers ParadiseAdaptive Payments SDK - Magento Developers Paradise
Adaptive Payments SDK - Magento Developers Paradise
 
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
Mashery Presents: The Evolution of Distribution - Edwin Aoki, Chief Architect...
 
Introduction to the Globus Platform for Developers
Introduction to the Globus Platform for DevelopersIntroduction to the Globus Platform for Developers
Introduction to the Globus Platform for Developers
 
WSO2Con Asia 2014 - Building the API-Centric Enterprise
WSO2Con Asia 2014 - Building the API-Centric EnterpriseWSO2Con Asia 2014 - Building the API-Centric Enterprise
WSO2Con Asia 2014 - Building the API-Centric Enterprise
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013

  • 1. REDESIGNING PAYPAL APIS FOR SCALE AND SIMPLICITY Praveen Alavilli, Deepak Nadig
  • 2. THE PAYPAL CONTEXT PayPal … –  137 million active accounts –  193 markets in 26 currencies –  2012: Total Payment Volume was $145 billion –  –  –  –  –  –  Q3 2013 Total Payment Volume of $44 Billion At $5580 TPV / second Growing 25% YoY 729 million transactions 8 million payments every day In a dynamic environment –  300+ features per quarter –  We roll 100,000+ lines of code every two weeks
  • 3. PAYPAL PLATFORM EVOLVED TO SUPPORT INTEGRATION NEEDS 2001 Instant Payment Notification 2004 Transaction, Mass Pay API 2005 Direct Payment API, Express Checkout PayPal API 2007 Payment APIs (NVP) 2009 Adaptive APIs (SOAP/XML, NV, JSON) PayPal Capabilities 2013 Payment APIs (REST)
  • 4. REALITY WAS… Async APIs Client Apps Client APIs Mobile Apps Backend Web APIs PayPal Platform Other Platforms SOAP APIs Web Apps Batch APIs Shopping Carts Hosted Solutions
  • 5. PAYPAL APIS HAD BECOME …
  • 6. PAYPAL APIS ARE GETTING HERE …
  • 7. REDEFINED DEVELOPER PLATFORM Reestablish credibility with the external developer community by building simple & consistent APIs with easy discovery and integration that extend our reach into the richer industry ecosystem Multiple developer portals https://developer.paypal.com Overlapping, inconsistent APIs Clear, consistent APIs Learn from large documents Learn from simple HTML, Tools Complex sign-up Simple as-needed sign-up Incomplete, unreliable Sandbox Complete, reliable Sandbox 7
  • 8. STARTED FROM BASIC PRINCIPLES … Who are the end users? •  customer segments, expectations Who are the developers ? •  developers, merchants, system integrators How should we design our API ? •  sync, async, batch, errors How should we ease learning ? •  docs, API explorers, HATEOAS console, … How should we simplify integration ? •  familiar standards, SDKs, support, …
  • 9. ELEMENTS OF SUCCESS ü  API Standards ü  API Design Process ü  Developer Experience
  • 10. API STANDARDS API Standards External & Internal •  Resource model •  REST semantics •  URI format •  Environments •  Versioning •  Namespaces •  Extensibility •  Response codes •  Patterns •  Idempotency •  Web linking •  Filters •  Deletion of resources •  Pagination •  Message formats •  Data model •  Common data types •  Serialization •  Security •  Application identification •  Errors •  Error codes •  Identification of PayPal SDK's calls based on http://restcookbook.com/
  • 11. REPRESENTATION & PATTERNS •  Using the JSON data model •  JSON serialization right now •  Specifying common, standard, I18Nready data types  {    "intent": ”sale",    "payer":{       "payment_method":"urn:payment_method:credit_card",       "first_name":"",       "last_name":"",       "funding_instrument":{          "credit_card":{             "number":1234123412341234,             "type":"",             "exp_month":12,             "exp_year":2015,             "cvv2":123          }       }    },    ”transactions":[       {          "amount":{             "total":1.0,             "currency":"USD"          },          "payee":{             "id":""          }       }    ] } •  Relying on standard patterns as much as possible •  Specifying standard patterns to complement those: •  Transaction processing and avoiding duplication •  Selection of subset for item lists •  Error message format •  (DRY) Don’t repeat yourself in your implementation, but don’t worry about repeating yourself in your API design.
  • 12. PATTERNS •  Controller Pattern •  https://api.paypal.com/v1/payments/payments/123/refund •  View/Filter Pattern •  https://api.paypal.com/v1/wallet/@me/funding-instruments/cards •  HATEOAS 201 Created HTTP/1.1 Content-Type: application/json { "id":”1234134", "state":"approved", "transactions":{ "authorization":{ "id":”908098", "state":"authorized", "amount":{ ”total":1.0 }, "links":[ { "rel":"self", "href":"https://api.paypal.com/v1/payments/authorization/908098" }, { "rel":"paypal:capture", "href":"https://api.paypal.com/v1/payments/authorization/908098/capture" } ] } }
  • 13. THE API DESIGN PROCESS Use-case analysis Feedback API Specification Capability Mapping Resource Modeling REMARKABLE SIMILARITIES WITH USER EXPERIENCE DESIGN PROCESS
  • 14. USE CASE ANALYSIS •  Actors, roles, relationships, scenarios •  System boundaries •  Functional and non-functional requirements •  Error conditions and Contingencies •  Coarse grained or Fine grained •  Expected behaviors
  • 15. RESOURCE MODELING •  Split business into functionality •  Modeling to identify: •  Entities Resource •  Actions on those: HTTP methods and controller resources •  Relationships and transitions •  Events (web hooks) Examples: https://api.paypal.com/v1/payments/payment/{id} https://api.paypal.com/v1/payments/authorization/{id} …
  • 16. VERSIONING STRATEGY •  Backward compatibility is critical •  •  But, versioning supported https://api.paypal.com/v1/…
  • 17. AUTHENTICATION & AUTHORIZATION •  OAuth 2.0 •  User Approval/Consent •  Token Granting •  •  Public Clients Confidential Clients •  OAuth scopes to represent ability for an application to: •  Use certain functionality •  Access and operate on a resource •  E.g, capture funds authorized previously, read financial instrument from wallet,… •  OAuth != Security •  Always use SSL •  Data at rest is always encrypted!
  • 18. API SPECIFICATION •  Human & machine readable format •  Several options: •  Google Discovery Document •  Swagger •  IODocs •  WADL •  API Blueprint •  RAML •  JSON Schema •  GenIO: https://github.com/paypal/ genio
  • 19. FEEDBACK •  Mechanisms •  Hackathons with internal and external developers •  Developer council •  Measure •  TTFHW •  Integration effort •  Errors
  • 20. DEVELOPER EXPERIENCE •  Documentation & Tools •  Sandbox •  Quick sign-up •  Integration monitoring and diagnostics •  Technical support
  • 22. SUMMARY •  APIs are an important way for a company, like PayPal, to extend reach •  Our APIs gathered entropy, which we addressed through good patterns •  Basic principles to deliver a great developer experience •  end users, developers, API design, learning, integration •  Successful APIs come from •  Familiar API standards •  Good API design process •  Simple and complete developer experience •  While transformation of PayPal’s external platform is underway •  The internal platform is going through a similar transformation •  Goal is about business agility •  Internal developer concerns are not that different