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 API について
Search
gorou_178
October 21, 2016
Programming
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stripe API について
gorou_178
October 21, 2016
More Decks by gorou_178
See All by gorou_178
OAuth2 / OIDC / FAPI の理解をちょっと深めてみる
gorou_178
0
52
Spring Bootで作成したAPIテストのコスパを高めよう!
gorou_178
1
1.6k
「エンジニアのための ドキュメントライティング」書籍のすすめ / phpconfuk 2023
gorou_178
2
1.2k
EventBridgeの運用について
gorou_178
0
280
Stripe Appsと自サービスの連携作法
gorou_178
0
280
Laravelのsession設定を変えて 劇的にパフォーマンスを改善した話
gorou_178
0
2.3k
Stripeとアプリケーションの関係を可視化してみた
gorou_178
0
1k
Stripeでの増税対応
gorou_178
0
940
Stripe+PHPでセキュアで安全な決済機能を作る
gorou_178
0
2k
Other Decks in Programming
See All in Programming
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
SREの越境 / SRE Collaboration
y0hgi
1
190
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
550
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2k
App Intentsのビルドプロセスを支える技術
kntkymt
0
380
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
1.2k
Heart of Swift Concurrency
koher
0
820
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
460
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
What We Talk About When We Talk About XP
m_seki
2
630
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
290
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
How GitHub (no longer) Works
holman
316
150k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
A Soul's Torment
seathinner
8
3.6k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Building Applications with DynamoDB
mza
96
7.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Transcript
Stripe API ʹ͍ͭͯ גࣜձࣾ Πϊϕʔλʔɾδϟύϯ ݀Ҫ ྯ 2016.10.20
ࣗݾհ • גࣜձࣾΠϊϕʔλʔɾδϟύϯ • WebΤϯδχΞ • Twitter @gorou_178 • ϑΝΠϧసૹαʔϏεʮtenpuʯ
• WordPressͰαΠτߏங • AWSΛར༻ͨ͠αʔόߏஙɺอक
Stripe
10݄4 ຊͰਖ਼ࣜϩʔϯν
None
None
Stripe •ϚΠΫϩϖΠϝϯτܾࡁ •ରԠ௨՟ 130௨՟Ҏ্ •औҾֹʹରͯ͠3.6%͕खྉ •ੈքશମͷސ٬10ສࣾΛ͑Δ •ੈք26ϱࠃͰϩʔϯν
Stripe •Discover •JCB •Diners Club •Visa •Master Card •American Express
Stripe •ࢧ͍ํ๏ •ΫϨδοτΧʔυ •ϏοτίΠϯ •Alipay •ACHσϏοτ
Stripe •༻ڥར༻ਃඞཁ߲ͷೖྗ͚ͩͰྃ(Β͍͠) •WebPayͩͱ1िؒɺશͯͷΫϨδοτΧʔυར༻·Ͱ 1ϲ݄͔͔Δ •ͱΓ͙͋͑ͣ͑͢ΔͬΆ͍
StripeͬͯΔํʁ
WebPayͩΑͬͯํʁ
ͦͷଞͬͯΔํʁ
Stripe Checkout •CheckoutϘλϯΛαΠτ ʹઃஔ͢Δ͚ͩ •scriptλάΛషΔ͚ͩ
Stripe Checkout
Stripe API Libraries •Ruby •Python •PHP •Java •Node.js •Go •iOS
•Android
stripe-php •stripe/stripe-php •https://github.com/stripe/stripe-php
Stripe API •Customer: ސ٬ใ •Card: ΫϨδοτΧʔυใɻސ٬ʹରͯ͠ෳ࣋ͯΔ •Charge: ࢧ͍ɻސ٬ʹඥ͚ͭͯ̍ճݶΓͷ՝͕ۚͰ͖ Δ
Customer
Card •Χʔυใͷొ
Card •ΧʔυใΛCustomerʹඥ͚
Customer + Card •CheckoutϘλϯར༻ͨ͠߹ɺstripeToken͕post͞ΕΔ •tokenͰొ͢ΔͱCustomerͱCardΛҰॹʹొ͞ΕΔ
Stripe API •Plan: ఆظ՝ۚͷྉۚϓϥϯ •Subscription: ఆظ՝ۚɻސ٬ʹඥ͘
Plan •ఆظ՝ۚͷྉۚϓϥϯΛ࡞
Subscription •ఆظ՝ۚΛ࡞ •customerͱplanΛࢦఆ
webhook •webhook͑·͢
webhook •request bodyʹjsonͰࢦఆURLʹϦΫΤετ͕͋Δ •Event APIͰΠϕϯτID͕࣮ࡏ͢Δ͔֬ೝ͢Δ͜ͱ(ηΩϡϦςΟରࡦ) •IPΞυϨεϦετެ։͞Εͯ·͢ •https://stripe.com/docs/ips
ͦͷଞศརͦ͏ͳػೳ •Coupon: Ϋʔϙϯػೳ •ׂҾ or ׂҾֹ •ظؒ: ̍ճͷΈɺࢦఆ·Ͱɺͣͬͱ •CustomerSubscriptionʹΫʔϙϯίʔυΛࢦఆ
ͦͷଞศརͦ͏ͳػೳ •ఆظ՝ۚͷ࠶՝ۚͷઃఆͰ͖Δ
ͦͷଞศརͦ͏ͳػೳ •Χʔυใʹॅॴ͕ొͰ͖Δ •zipcodeͰෆਖ਼νΣοΫͱ͔ͯ͠ΔΒ͍͠ •customerʹҙͷmetadataઃఆͰ͖Δ •Product(ใ)ͷཧͰ͖Δ •ࡏݿɺαΠζɺͷը૾
ͦͷଞศརͦ͏ͳػೳ •receipts(ྖऩॻ)ͷૹ৴Ͱ͖Δ
·ͱΊ •StripeͰԁ͕͑ΔΑ͏ʹͳͬͨΑ •༻ڥ৹ࠪͪͳ͠Ͱ͑ΔΑ •StripeͰཧ·ͰͰ͖ͪΌ͏ •ʮԁܾࡁ͕Ͱ͖ͳ͔ͬͨͷͰʯWebPayΛͬͯΔ͚ͲɺҠ ߦΛܭըத
࣭
͋Γ͕ͱ͏͍͟͝·ͨ͠