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
76
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.4k
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
300
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
160
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
110
Podcast配信で広がったアウトプットの輪~70人と音声発信してきた7年間~/outputconf_01
fortegp05
0
180
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
200
非同期・イベント駆動処理の分散トレーシングの繋げ方
ichikawaken
1
250
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
12
7.2k
トイルを超えたCREは何屋になるのか
bengo4com
0
120
CREがSLOを握ると 何が変わるのか
nekomaho
0
360
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
First, design no harm
axbom
PRO
2
1.2k
WCS-LA-2024
lcolladotor
0
510
How STYLIGHT went responsive
nonsquared
100
6k
Test your architecture with Archunit
thirion
1
2.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
Are puppies a ranking factor?
jonoalderson
1
3.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Navigating Team Friction
lara
192
16k
[SF Ruby Conf 2025] Rails X
palkan
2
880
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Λ͑ Χʔυܾࡁ͘Β͍ͳΜͱ͔ͳΔ
͓͠·͍