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
370
CAMPHOR-DAY 2021 - Stripe 概観
CAMPHOR-DAY2021のスライドです
asamas
March 27, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
Get Ready for Jakarta EE 10
ivargrimstad
0
2.1k
Oracle REST Data Service: APEX Office Hours
thatjeffsmith
0
740
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
0
220
Mobile Product Engineering
championswimmer
0
300
Managing Error Messages with your Oracle Database REST APIs
thatjeffsmith
0
120
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
130
Client-Side Field-Level Encryption for Apache Kafka Connect @ VoxxedDays Luxembourg 2022
hpgrahsl
0
110
io22 extended What's new in app performance
veronikapj
0
340
"What's new in Swift"の要約 / swift_5_7_summary
uhooi
1
310
Springin‘でみんなもクリエイターに!
ueponx
0
210
BASE BANKチームの技術選定と歴史 / how to decide technology selection for startup
budougumi0617
0
840
Airflowはすごいぞ!
hankehly
0
370
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
261
25k
A better future with KSS
kneath
225
15k
How to Ace a Technical Interview
jacobian
265
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
315
19k
Automating Front-end Workflow
addyosmani
1351
200k
Fashionably flexible responsive web design (full day workshop)
malarkey
396
62k
Build your cross-platform service in a week with App Engine
jlugia
219
17k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
KATA
mclloyd
7
8.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
15
36k
Gamification - CAS2011
davidbonilla
75
3.9k
Infographics Made Easy
chrislema
233
17k
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