SlideShare ist ein Scribd-Unternehmen logo
1 von 26
REDESIGNING PAYPAL APIS
FOR SCALE AND SIMPLICITY
Praveen Alavilli, Deepak Nadig
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/redesign-PayPal-APIs-scalesimplicity

InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Presented at QCon San Francisco
www.qconsf.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
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
Watch the video with slide synchronization on
InfoQ.com!
http://www.infoq.com/presentations/redesignPayPal-APIs-scale-simplicity

Weitere ähnliche Inhalte

Mehr von C4Media

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoC4Media
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileC4Media
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020C4Media
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like OwnersC4Media
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideC4Media
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 

Mehr von C4Media (20)

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy Mobile
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Redesigning PayPal APIs for Scale and Simplicity

  • 1. REDESIGNING PAYPAL APIS FOR SCALE AND SIMPLICITY Praveen Alavilli, Deepak Nadig
  • 2. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /redesign-PayPal-APIs-scalesimplicity InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month
  • 3. Presented at QCon San Francisco www.qconsf.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. 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
  • 5. 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)
  • 6. 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
  • 7. PAYPAL APIS HAD BECOME …
  • 8. PAYPAL APIS ARE GETTING HERE …
  • 9. 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
  • 10. 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, …
  • 11. ELEMENTS OF SUCCESS ü  API Standards ü  API Design Process ü  Developer Experience
  • 12. 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/
  • 13. 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.
  • 14. 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" } ] } }
  • 15. THE API DESIGN PROCESS Use-case analysis Feedback API Specification Capability Mapping Resource Modeling REMARKABLE SIMILARITIES WITH USER EXPERIENCE DESIGN PROCESS
  • 16. 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
  • 17. 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} …
  • 18. VERSIONING STRATEGY •  Backward compatibility is critical •  •  But, versioning supported https://api.paypal.com/v1/…
  • 19. 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!
  • 20. 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
  • 21. FEEDBACK •  Mechanisms •  Hackathons with internal and external developers •  Developer council •  Measure •  TTFHW •  Integration effort •  Errors
  • 22. DEVELOPER EXPERIENCE •  Documentation & Tools •  Sandbox •  Quick sign-up •  Integration monitoring and diagnostics •  Technical support
  • 24. 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
  • 26. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/redesignPayPal-APIs-scale-simplicity