Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Stripe Credit Card Flow
Search
Ross Boucher
April 03, 2014
Programming
92
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stripe Credit Card Flow
What happens when you charge a credit card?
Ross Boucher
April 03, 2014
Other Decks in Programming
See All in Programming
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
230
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
190
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.6k
Event is what happens
moro
2
3.9k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
160
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
190
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
290
SODA - FACT BOOK(JP)
sodainc
1
40k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
810
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
300
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
410
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
Featured
See All Featured
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
From π to Pie charts
rasagy
1
440
Raft: Consensus for Rubyists
vanstee
143
7.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
Abbi's Birthday
coloredviolet
4
11k
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
240
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Accessibility Awareness
sabderemane
1
290
Building the Perfect Custom Keyboard
takai
2
950
Transcript
What happens when you charge a credit card?
1 2 3 4 5 6 7 8 Browser Stripe
API Your Server Credit Card Network
GET https://api.stripe.com/v1/tokens?callback=stripe123& _method=POST&key=pk_live_abcd BROWSER REQUESTS: Stripe.createToken({ number: $('#paymentNumber'), // etc.
}, function callback(status, response){ // submit the rest of the form }); JAVASCRIPT:
HTTP/1.1 200 OK ... { "id": "tok_1234", // this is
how we will refer to the Stripe token "card": { "last4": "4242", "type": "Visa", ... } } STRIPE API RETURNS:
POST https://yoursite.com/submit stripe_token=tok_1234&foo=bar... BROWSER REQUESTS:
POST https://api.stripe.com/v1/charges Authorization: Bearer sk_live_wxyz card=tok_1234&amount=500¤cy=usd&description=foo YOUR SERVER REQUESTS:
Sending authorize request (conv fdc_1234): MTI:100 (Authorization Request) 002 Primary
Account Number : "42xxxxxxxxxx42" 004 Amount of Transaction : 500 007 Transmission Date/Time : 2013-02-04 02:15:20 UTC 012 Time, Local Transmission : 2013-02-03 18:15:20 UTC 014 Card Expiration Date : "1503" 018 Merchant Category Code : "5399" 042 Merchant : "4451xxxxxxx" 049 Transaction Currency Code : 840 STRIPE REQUESTS: (binary wire protocol)
Response: MTI:110 (Authorization Request Response) 004 Amount of Transaction :
500 007 Transmission Date/Time : 2013-02-04T02:15:20+00:00 025 Point of Service (POS) Condition Code : 59 037 Retrieval Reference Number : "z8yYxxxxxxxx" 039 Response Code : "00" [Approved (for capture)] 044 Additional Response Data : "Y" [Address and 5-digit ZIP Match] CREDIT CARD NETWORK RESPONDS: (binary wire protocol)
HTTP/1.1 200 OK { "id": "ch_1234", "paid": true, // the
charge was successful "object": "charge", "amount": 500, ... } STRIPE RESPONDS
HTTP/1.1 200 OK <html> <body> <h1>Thank you for paying!</h1> </body>
</html> YOUR SERVER RESPONDS:
1 2 3 4 5 6 7 8 Browser Stripe
API Your Server Credit Card Network
Payments for Developers