Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
CAMPHOR-DAY 2021 - Stripe 概観
asamas
March 27, 2021
Programming
0
430
CAMPHOR-DAY 2021 - Stripe 概観
CAMPHOR-DAY2021のスライドです
asamas
March 27, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
OIDC仕様に準拠した Makuake ID連携基盤構築の裏側
ymtdzzz
0
540
Rによる大規模データの処理
s_uryu
2
630
Rust、何もわからない...#6発表資料
ryu19
0
120
Makuakeの認証基盤とRe-Architectureチーム
bmf_san
0
570
低レイヤーから始める GUI
fadis
18
9.3k
Swift Observation
shiz
4
290
domain層のモジュール化 / MoT TechTalk #15
mot_techtalk
0
110
はてなリモートインターンシップ2022 フロントエンドブートキャンプ 講義資料
hatena
0
120
ちょうぜつ改め21世紀ふつうのソフトウェア設計
tanakahisateru
7
6.4k
2023年にクル(かもしれない)通信ミドルウェア技術(仮)
s_hosoai
0
200
フロントエンドで 良いコードを書くために
t_keshi
3
1.6k
What's new in Shopware 6.5
shyim
0
110
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
50k
Statistics for Hackers
jakevdp
785
210k
Facilitating Awesome Meetings
lara
33
4.6k
From Idea to $5000 a Month in 5 Months
shpigford
374
44k
Debugging Ruby Performance
tmm1
67
11k
A Tale of Four Properties
chriscoyier
149
21k
Why You Should Never Use an ORM
jnunemaker
PRO
49
7.9k
Rebuilding a faster, lazier Slack
samanthasiow
69
7.5k
The Mythical Team-Month
searls
210
40k
Building a Modern Day E-commerce SEO Strategy
aleyda
6
4.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
152
13k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
214
12k
Transcript
Stripe 概観 @asamas
⾃⼰紹介 Twitter︓@asamas95 Github︓@asamas 京都府⽴医科⼤学
Stripe • オンライン決済システム • カード決済など複数の複数の 決済⼿段を代⾏ • カード情報を⾮保持・⾮通過 で処理可能
Stripeのサービス ・ Payment ︓ 普通の決済 ・ Billing ︓ 請求書を発⾏する決済 ・
(Connect ︓ プラットフォームの作成) Stripeには主に3つのサービスがある
Stripe Payment • Stripe Checkout︓stripeの⽤意しているページに遷移して決済 • Charges API︓開発終了 • Payment
Intents API︓現在推奨されているapi Charges Payment Intents 開発状況 開発終了 開発中 セキュリティ SCA⾮対応 SCA対応 対応している ⽀払い⼿段 Source API/Card Payment Method API
Payment Intents API • Payment Intent Objectを 中⼼にAPIが⽣えている • Create
• Update • Confirm • Cancel paymentIntentObject例
Stripe Element/StripeJS • カード情報をサーバーを介さずに直接やりとりするためのフロ ント向けライブラリ • StripeJS︓カード情報をstripeに送信する • Element︓カード情報⼊⼒フォーム •
React対応 Stripe Element 例
Stripe Payment – paymentのステップ1 DMJFOU TFSWFS TUSJQF Client_secretを要求
Stripe Payment – paymentのステップ2 DMJFOU TFSWFS TUSJQF Client_secretを要求 Payment_intentの 作成
Stripe Payment – paymentのステップ3 DMJFOU TFSWFS TUSJQF Client_secretを要求 Payment_intentの 作成
Payment_intent Object
Stripe Payment – paymentのステップ4 DMJFOU TFSWFS TUSJQF Client_secretを要求 Payment_intentの 作成
Payment_intent Object Client_Secret
Stripe Payment – paymentのステップ5 DMJFOU TUSJQF Client_Secret,カード情報
Stripe Billing • 使⽤可能な決済パターン • 1回限りの⽀払い • サブスクリプション • 従量課⾦制
etc… • 請求書(Invoice)ページはstripeが作ってくれる
Stripe Billing – Stripe Dashboard
Stripe Billing - Invoice API • Invoice Objectを 中⼼にAPIが⽣えている •
Create • Retrieve • Update • Delete • Finalize etc.
Stripe Billing – Invoiceのwork flow https://stripe.com/docs/billing/invoices/overview
Stripe Billing - Invoiceページ
Stripe Billing – ⽀払い後
Stripe Webhook
Stripe Webhook
Stripe Webhook
Stripe - Event • Stripeでなにか処理が⾏われる度に Eventがwebhookに⾶ばされる • すべてのeventを処理するのは⼤変 なので、stripe dashboardで必要な
eventだけ取得する Event ⼀例 • invoice.created • invoice.deleted • invoice.finalization_failed • invoice.finalized • invoice.paid • invoice.payment_action_required • invoice.payment_failed • invoice.payment_succeeded • invoice.sent • invoice.upcoming • invoice.updated • invoice.voided
まとめ • Stripe の主なサービスの紹介 • Payment • Billing • (Connect)
• Stripeの処理はwebhookでとってくる • 資料 https://stripe.com/docs https://stripe.com/docs/api https://stripe.com/docs/js