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
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
AmebaブログはKMPから卒業します
kmars0605
0
180
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
Next.js: The final boss of Web Performance
guaca
0
250
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
540
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
We Are The Robots
honzajavorek
0
400
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Crafting Experiences
bethany
1
380
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