Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
JP_Stripes 福岡 Vol.4 - 新入社員がカード決済に取り組んだ話
Search
shimomo
September 12, 2018
Technology
0
69
JP_Stripes 福岡 Vol.4 - 新入社員がカード決済に取り組んだ話
shimomo
September 12, 2018
Tweet
Share
More Decks by shimomo
See All by shimomo
JP_Stripes Connect 2019 - 新卒エンジニアの苦悩
shimomo
0
1.4k
Other Decks in Technology
See All in Technology
20250707-AI活用の個人差を埋めるチームづくり
shnjtk
2
1.4k
AI専用のリンターを作る #yumemi_patch
bengo4com
5
3.8k
自律的なスケーリング手法FASTにおけるVPoEとしてのアカウンタビリティ / dev-productivity-con-2025
yoshikiiida
1
11k
KubeCon + CloudNativeCon Japan 2025 Recap by CA
ponkio_o
PRO
0
280
KiCadでPad on Viaの基板作ってみた
iotengineer22
0
260
Glacierだからってコストあきらめてない? / JAWS Meet Glacier Cost
taishin
1
130
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
6
4.9k
MUITにおける開発プロセスモダナイズの取り組みと開発生産性可視化の取り組みについて / Modernize the Development Process and Visualize Development Productivity at MUIT
muit
1
11k
asken AI勉強会(Android)
tadashi_sato
0
160
ドメイン特化なCLIPモデルとデータセットの紹介
tattaka
2
560
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
1
4.9k
Model Mondays S2E03: SLMs & Reasoning
nitya
0
320
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Statistics for Hackers
jakevdp
799
220k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Designing for humans not robots
tammielis
253
25k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
We Have a Design System, Now What?
morganepeng
53
7.7k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Transcript
৽ೖࣾһ͕Χʔυܾࡁʹ औΓΜͩ JP_Stripes Ԭ Vol.4
ࣗݾհ • ࢤໟɹ༐Ұɹʢ͠ɹΏ͏͍ͪʣ • גࣜձࣾίϜɾΞϯυɾίϜ • ৽ଔೖࣾɹ1 • Stripeྺɹ1͔݄
৽ೖࣾһͰStripeΛ͑ Χʔυܾࡁ͘Β͍؆୯ʹ Ͱ͖ͪΌ͏ͬͯ
ͱStripeͷೃΕॳΊ
20187݄
͕ࣾൃͨ͠ݴ༿
ΧʔυܾࡁʹରԠ͠Ζʂ
ଞਓࣄ
͔͠͠
গਫ਼Ӷ
ͳΜ͔Μ͋ͬͯ ͕Δ͜ͱʹ
৽ೖࣾһʹ ܾࡁγεςϜΛߏஙͤ͞Δ ΠΧͨ͠ΠΧΕͨձࣾ
ఏࣔ͞Εͨ։ൃ݅
Stripe
ͦΕ͚ͩ
ͭ·Γ
ࣗ༝
͔͠͠
͔Βͳ͍͜ͱ͕ ͍ͬͺ͍
αʔϏεͷ ՝ۚϞσϧʁ
StripeͬͯԿʁ
ௐͨ
ֹ݄՝ۚΒ͍͠
ֹۚ = ୯Ձ × ར༻ऀ
ͱΓ͋͑ͣStripeͰ ͬͯΈΔ
Subscription
ݒ೦͕1ͭ
ࣄલʹ՝ֹۚΛ ઃఆ͢Δ͜ͱͰ͖ͳ͍
Ͳ͏͢Δʁ
ैྔ՝ۚʁ
͍
Webhook
Make adjustments to an invoice when it's created (but before
it's been paid)
ܾࡁલͷٻॻʹ ߲ΛՃ͢Ε͑͑Μ
ຖ݄0ԁͰܾࡁ͢Δ SubscriptionΛސ٬ຖʹઃఆ
ຖ݄0ԁͷٻॻ͕࡞
invoice.created ඈΜͰ͘Δ
Invoice Created "{ "data": { "object": { "id": "in_00000000000000", //
ٻॻͷID "object": "invoice", "amount_due": 0, "amount_paid": 0, "amount_remaining": 0, "currency": "jpy", "customer": "cus_00000000000000", // ސ٬ͷID
ٻॻͷ߲Λ࡞ InvoiceItem <?php \Stripe\InvoiceItem::create([ 'amount' => ʢ୯Ձ × ར༻ऀʣ, 'invoice'
=> ‘in_00000000000000', // ٻॻͷID 'customer' => ‘cus_00000000000000', // ސ٬ͷID 'currency' => 'jpy', 'description' => 'ֹ݄අ༻', ]);
ͬͨͥ
ͱ͍͏͜ͱͰ
WebhookΛ͑ ԿͰͰ͖Δؾ͕ͯ͘͠Δ
ͬͱྑ͍ํ๏͋ͬͨΒ ڭ͍͑ͯͩ͘͞
৽ೖࣾһͰStripeΛ͑ Χʔυܾࡁ͘Β͍ͳΜͱ͔ͳΔ
͓͠·͍