Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stripe Credit Card Flow
Search
Ross Boucher
April 03, 2014
Programming
1
89
Stripe Credit Card Flow
What happens when you charge a credit card?
Ross Boucher
April 03, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
2
550
クラウドに依存しないS3を使った開発術
simesaba80
0
150
愛される翻訳の秘訣
kishikawakatsumi
3
340
SwiftUIで本格音ゲー実装してみた
hypebeans
0
490
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
570
認証・認可の基本を学ぼう前編
kouyuume
0
270
Implementation Patterns
denyspoltorak
0
110
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
110
AIコーディングエージェント(skywork)
kondai24
0
200
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.5k
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.2k
WCS-LA-2024
lcolladotor
0
390
Agile that works and the tools we love
rasmusluckow
331
21k
Skip the Path - Find Your Career Trail
mkilby
0
27
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
300
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
90
A Soul's Torment
seathinner
1
2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
120
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
370
HDC tutorial
michielstock
0
260
The World Runs on Bad Software
bkeepers
PRO
72
12k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
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