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
Kibelaの決済の仕組み
Search
michiomochi
August 03, 2018
800
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kibelaの決済の仕組み
michiomochi
August 03, 2018
More Decks by michiomochi
See All by michiomochi
Visaのあれこれを継続的に対応していく体制づくり
michiomochi
0
120
Featured
See All Featured
Crafting Experiences
bethany
1
420
Navigating Weather and Climate Data
rabernat
0
580
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
How to Ace a Technical Interview
jacobian
280
24k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Designing for Timeless Needs
cassininazir
1
550
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
610
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
320
Thoughts on Productivity
jonyablonski
76
5.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Darren the Foodie - Storyboard
khoart
PRO
4
4.1k
Transcript
KibelaͷܾࡁͷΈ JP_Stripes (Stripe ϢʔβʔάϧʔϓʣTokyo Vol.8 גࣜձࣾϏοτδϟʔχʔ ಓ խՅ - @michiomochi
ಓ խՅ @michiomochi Michikawa Masayoshi ܦྺ 20164݄ Ϗοτδϟʔχʔೖࣾ Kibela։ൃதʂˡ ࠓ͜͜
20144݄ ํσεΫೖࣾ (Cookpadؔ࿈ձࣾ) 2011ʙ ͍ΖΜͳITاۀΛసʑͱ 20094݄ Ϧκʔτೖࣾ (ຊྉཧͬͯ·ͨ͠) גࣜձࣾϏοτδϟʔχʔ
Kibelaͱʁ https://kibe.la
Kibelaͱʁ • ʮݸਓͷൃ৴Λ৫ͷྗʹ͢Δʯͱ͍͏ίϯηϓτͷ ใڞ༗πʔϧ • ओʹձࣾͰΘΕΔ͜ͱΛఆͯ͠࡞͍ͬͯ·͢ • ՈؒͰͷใڞ༗ͱ͍ͯͬͯ͠Δྫ • 5໊·ͰແྉͰ͓͍͍͚ͨͩ·͢
• ͓ؾܰʹ͝ࢼ༻͍ͩ͘͞ʂ • ٕज़ίϛϡχςΟڭҭػؔͷඇӦརஂମͰͷར༻ ਓʹؔΘΒͣແྉͰ͓͍͍͚ͨͩ·͢
None
None
ࠓ͢͜ͱ • KibelaͷྉۚઃܭϙϦγʔ • KibelaͷྉܾۚࡁͷྲྀΕ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ ͔ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
StripeΛͬͯ৽نSaaSΛ্ཱͪ͛ͨ by @dex1t https://speakerdeck.com/dex1t/kibela-meets-stripe-stripewoshi- tutexin-gui-saaswoli-tishang-getahua-number-jp-stripes
ࠓ͢͜ͱ • KibelaͷྉۚઃܭϙϦγʔ • KibelaͷྉܾۚࡁͷྲྀΕ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ͔ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
KibelaͷྉۚઃܭϙϦγʔ ͲͷΑ͏ʹߟ͑ྉۚઃܭΛߦ͔ͬͨ
KibelaͷྉۚઃܭϙϦγʔ • ެฏʹ՝ۚ͢Δ • ΞΫηε͕ͳ͍Ϣʔβʔͷར༻ྉٻ͠ͳ͍ • খ͞ͳ৫ΛԠԉ͢Δ • 5໊ҎԼͷνʔϜͣͬͱແྉͰ͑Δ •
ٕज़ίϛϡχςΟڭҭػؔͷඇӦརஂମར༻ਓ ʹؔΘΒͣແྉ • ެฏʹબͯ͠Β͑ΔΑ͏ʹ͢Δ • ଞࣾͱൺֱݕ౼ͯ͠Β͏Α͏ʹ͢Δ ͲͷΑ͏ʹߟ͑ྉۚઃܭΛߦ͔ͬͨ
ࠓ͢͜ͱ • KibelaͷྉۚઃܭϙϦγʔ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ ͔ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ • KibelaͷྉܾۚࡁͷྲྀΕ
KibelaͷྉܾۚࡁͷྲྀΕ 1. νʔϜͷ࡞ 2. Freeϓϥϯ͔ΒStandardϓϥϯΞοϓάϨʔυ • 2ϲ݄ؒτϥΠΞϧظؒ 3. τϥΠΞϧظ͕ؒऴΘΔͱಉ࣌ʹݱࡏͷϢʔβʔͷྉܾۚ ࡁΛ࣮ߦ
4. ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ·ͱΊͯٻ 5. SubscriptionͷకΊ͕͖ͨΒΞΫηεͷͳ͔ͬͨϢʔβʔ ͷྉۚΛKibelaϙΠϯτͰؐݩ 6. 3ʹΓɺҎԼ܁Γฦ͠
ࠓ͢͜ͱ • KibelaͷྉۚઃܭϙϦγʔ • KibelaͷྉܾۚࡁͷྲྀΕ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ͔
ྉܾۚࡁΛͲͷΑ͏ͳΈͰ ࣮ݱ͍ͯ͠Δ͔ ҎԼͷ෦Λհ͠·͢ 4. ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ·ͱΊͯٻ 5. SubscriptionͷకΊ͕͖ͨΒΞΫηεͷͳ͔ͬͨϢʔβʔ ͷྉۚΛKibelaϙΠϯτͰؐݩ 1.
νʔϜͷ࡞ 2. Freeϓϥϯ͔ΒStandardϓϥϯΞοϓάϨʔυ 3. τϥΠΞϧظ͕ؒऴΘΔͱಉ࣌ʹݱࡏͷϢʔβʔͷྉܾۚ ࡁΛ࣮ߦ 6. 3ʹΓɺҎԼ܁Γฦ͠
ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ ·ͱΊͯٻ ͦͦͳͥ͜Μͳ͜ͱΛ͍ͯ͠Δͷ͔ • KibelaϢʔβʔʹΑΓٻֹ͕มΘΔ • ͭ·Γैྔ՝ۚͷαʔϏε • Ωϟογϡϑϩʔతʹɺ·ͨऔΓͬͺ͙ΕϦεΫΛճආ͢Δ
ͨΊʹઌ͍ʹ͍ͨ͠ • Ωϟογϡϑϩʔత = ͓͕ۚग़དྷΔ͚ͩૣ͘ೖ͖ͬͯͯ΄ ͍͠ • খ͍͞ձࣾʹͱͬͯݱۚΛૣ͘ड͚औΕΔͷඇৗʹେࣄ • ैྔ՝ۚαʔϏεͰઌ͍ʹ͢Δͷ͕ඞཁ
ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ ·ͱΊͯٻ • Ϣʔβʔ࡞ͱಉ࣌ʹݱࡏͷPlanͱಉ͡ٻֹͷInvoiceItem Λ࡞ • InvoiceItem࡞͚ͨͩ͠Ͱܾࡁ͞Εͳ͍ • ຖAM
9:00ʹInvoiceItem͕ͳ͍͔֬ೝ͠ɺ͋ΕInvoiceΛ ࡞͢ΔόονΛ࣮ߦ͢Δ • όονͷ࣮ߦʹKuroko2Λ࠾༻ • Invoice͕࡞͞ΕΔͱStripeଆͰҰఆ࣌ؒޙʹܾࡁ͕ߦΘΕ Δ ࣮ݱͷ͔ͨ͠
ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ ·ͱΊͯٻ
• web-based job scheduler / workflow engine. • ҰݴͰ͍͏ͱ͍͢͝cron •
δϣϒͷ࣮ߦΛ͏·͍۩߹ʹͬͯ͘ΕΔ • δϣϒͷ࣮ߦ։࢝ɺޭɺࣦഊΛϝʔϧSlackͰ௨͢ Δػೳ͕͋Δ • Web UI͕͋Δ • Web্Ͱδϣϒͷઃఆɺࣦഊͨ͠δϣϒͷϦτϥΠ͕Ͱ͖Δ • ܾࡁͷॏཁͳjobcronͰ࣮ߦ͢Δͷ৺ڐͳ͍ https://github.com/cookpad/kuroko2
https://github.com/cookpad/kuroko2
https://github.com/cookpad/kuroko2
ྉܾۚࡁΛͲͷΑ͏ͳΈͰ ࣮ݱ͍ͯ͠Δ͔ ҎԼͷ෦Λհ͠·͢ 5. SubscriptionͷకΊ͕͖ͨΒΞΫηεͷͳ͔ͬͨϢʔβʔ ͷྉۚΛKibelaϙΠϯτͰؐݩ 1. νʔϜͷ࡞ 2. Freeϓϥϯ͔ΒStandardϓϥϯΞοϓάϨʔυ
3. τϥΠΞϧظ͕ؒऴΘΔͱಉ࣌ʹݱࡏͷϢʔβʔͷྉܾۚ ࡁΛ࣮ߦ 4. ϢʔβʔՃͷʹՃΛཌͷAM 9:00ʹ·ͱΊͯٻ 6. 3ʹΓɺҎԼ܁Γฦ͠
KibelaͷྉۚઃܭϙϦγʔ • খ͞ͳ৫ΛԠԉ͢Δ • 5໊ҎԼͷνʔϜͣͬͱແྉͰ͑Δ • ٕज़ίϛϡχςΟڭҭػؔͷඇӦརஂମར ༻ਓʹؔΘΒͣແྉ • ެฏʹબͯ͠Β͑ΔΑ͏ʹ͢Δ
• ଞࣾͱൺֱݕ౼ͯ͠Β͏Α͏ʹ͢Δ ͲͷΑ͏ʹߟ͑ྉۚઃܭΛߦ͔ͬͨ • ެฏʹ՝ۚ͢Δ • ΞΫηε͕ͳ͍Ϣʔβʔͷར༻ྉٻ͠ͳ͍
SubscriptionͷకΊ͕͖ͨΒΞΫηεͷͳ͔ͬ ͨϢʔβʔͷྉۚΛKibelaϙΠϯτͰؐݩ • StripeʹAccount Balanceͱ͍͏ػೳ͕͋Δ • ܾࡁ͕ߦΘΕΔࡍʹ༏ઌతʹΘΕΔΫϨδοτ • KibelaϙΠϯτ =
Account Balance • SubscriptionͷకΊ͕͖ͯInvoice͕࡞͞ΕͨࡍʹStripe͔ ΒInvoice.created Webhook͕ඈΜͰ͘Δ • Invoice࡞͞Ε͙ܾͯ͢ࡁ͕࣮ߦ͞ΕΔΘ͚Ͱͳ͍ • ܾࡁ͕࣮ߦ͞ΕΔલʹInvoice.createdΛhookͯ͠Account BalanceΛ༩͢Δ ࣮ݱͷ͔ͨ͠
ࠓ͢͜ͱ • KibelaͷྉۚઃܭϙϦγʔ • KibelaͷྉܾۚࡁͷྲྀΕ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ ͔ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ ͳΜͰʁ • ·ͩΫϨδοτΧʔυΛ͑ͳ͍ձࣾੈͷதʹͨ͘͞Μ͋ Δ • ελʔτΞοϓΫϨδοτΧʔυΛ͑Δͱ͜Ζଟ͍ • ੲ͔Β͋Δେ͖ͳاۀ͑ͳ͍ͱ͜Ζଟ͍ •
ΫϨδοτΧʔυΛ͑ͳ͍ձࣾ ≒ େ͖ͳձࣾ ͳͷͰ͜͜Λ औΕΔ͜ͱച্ʹେ͖͘ܨ͕Δ • ͭΒͯ͘Δ͔͠ͳ͍
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ ࣮ݱํ๏ खಈ…ʁ
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ Docs: https://stripe.com/docs/billing/invoices
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ ࣮ݱํ๏ • SubscriptionͷbillingઃఆΛAutomatically ʙ͔ΒEmail ʙมߋ͢Δ • ܾࡁํ๏(ΫϨδοτΧʔυ)͕ొ͞Ε͍ͯͳͯ͘༗ྉProduct มߋͰ͖ΔΑ͏ʹͳΔ •
ࣗಈͰܾࡁ͕ߦΘΕͳ͘ͳΔ • SubscriptionͷకΊʹͳΔͱInvoice͕࡞͞ΕΔ • ࡞͞ΕͨInvoiceΛݟͯٻॻΛ࡞͓͠٬༷ૹ • Stripe͔ΒϝʔϧͰૹΔ͜ͱ͕Ͱ͖Δ • ͕ɺॻྨͰ͘Εͱ͍͏ͱ͜Ζ͋Γͦ͏… • ৼΓࠐ·Ε͔ͨΛۜߦޱ࠲Λݟͯ֬ೝ • खಈʁ • ৼΓࠐ·Ε͍ͯͨΒInvoiceΛMark as paid
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢ ͍͍ͱ͜Ζ • ٻॻ͍ʹؔͯ͠Stripe্ཧ͕ग़དྷΔ • ாථ͕StripeͰҰݩཧͰ͖Δ • ͜Ε͕ग़དྷͳ͍ͱStripeͱผͰཧ͢Δඞཁ͕͋ΓͭΒ͍ͱ͜Ζ ͩͬͨ ͳΜͱ͔͍ͨ͠ͱ͜Ζ
• ݱঢ়ɺۜߦʹৼΓࠐ·Εͨ͜ͱͷ֬ೝ͕खಈ͔͠ͳ͍ʁ • billingઃఆ͕Email ʙͷInvoice͕࡞͞Εͨ͜ͱΛͪ͜Β͕ݕ͢Δ ํ๏ • Slack௨ͱ͔͋Δͱخ͍͚͠Ͳ…
ࠓͨ͜͠ͱ • KibelaͷྉۚઃܭϙϦγʔ • KibelaͷྉܾۚࡁͷྲྀΕ • ྉܾۚࡁΛͲͷΑ͏ͳΈͰ࣮ݱ͍ͯ͠Δ ͔ • ٻॻ͍ʹରԠ͠Α͏ͱ͍ͯ͠·͢
͍͞͝ʹ ϏοτδϟʔχʔΤϯδχΞΛେืूதͰ͢ʂʂʂ ҰॹʹKibelaΛ࡞Γ·ͤΜ͔ʁ ڵຯ͕͋Δํ࠙ձͰ͔͚ͯ͠Β͑Δͱ͏Ε ͍͠Ͱ͢ʂ