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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
shimomo
September 12, 2018
Technology
78
0
Share
JP_Stripes 福岡 Vol.4 - 新入社員がカード決済に取り組んだ話
shimomo
September 12, 2018
More Decks by shimomo
See All by shimomo
JP_Stripes Connect 2019 - 新卒エンジニアの苦悩
shimomo
0
1.5k
Other Decks in Technology
See All in Technology
SLI/SLO、「完全に理解した」から「チョットデキル」へ
maruloop
5
560
AI対話分析の夢と、汚いデータの現実 Looker / Dataplex / Dataform で実現する品質ファーストな基盤設計
waiwai2111
0
640
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
480
データモデリング通り #5オンライン勉強会: AIに『ビジネスの文脈』を教え込むデータモデリング
datayokocho
0
290
20260515 ログイン機能だけではないアカウント管理を全体で考える~サービス設計者向け~
oidfj
1
750
AsyncStreamでマルチブロードキャストを実装する
1mash0
1
120
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
170
論文紹介:Pixal3D (SIGGRAPH 2026)
tenten0727
0
220
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
230
可視化から活用へ — Mesh化・Segmentation・アライメントの研究動向
gpuunite_official
0
220
開発サイクルのボーダーレス化に伴う組織変革から学んだこと / Organizational Transformation Amid the Borderless Development Cycle
mii3king
0
200
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
The Language of Interfaces
destraynor
162
26k
How GitHub (no longer) Works
holman
316
150k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Designing for Timeless Needs
cassininazir
1
220
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Prompt Engineering for Job Search
mfonobong
0
300
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
The SEO identity crisis: Don't let AI make you average
varn
0
460
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Technical Leadership for Architectural Decision Making
baasie
3
360
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Λ͑ Χʔυܾࡁ͘Β͍ͳΜͱ͔ͳΔ
͓͠·͍