Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mackerel and Stripe / Qiita x Stripe Meetup

81e8ac1d3a766b3d9880cd08d9a7aba4?s=47 astj
PRO
April 12, 2019

Mackerel and Stripe / Qiita x Stripe Meetup

81e8ac1d3a766b3d9880cd08d9a7aba4?s=128

astj
PRO

April 12, 2019
Tweet

Transcript

  1. Mackerel and Stripe 2019/04/12 Qiita x Stripe Meetup Asato WAKISAKA

    (Hatena)
  2. Asato WAKISAKA (GitHub: @astj) ͸ͯͳ ΞϓϦέʔγϣϯΤϯδχΞ Mackerel ։ൃνʔϜ (2016/08~) Mackerel

    ςοΫϦʔυ (2018/05~)
  3. Mackerel

  4. None
  5. None
  6. None
  7. None
  8. • 2014೥ϦϦʔεͷʮαʔόʔ؂ࢹαʔϏεʯ • ೔ʑΞΫςΟϒʹ։ൃத • ܧଓతͳ৽ػೳϦϦʔε • ແྉͰ΋ར༻Մೳ • ϑϧػೳʹ͸༗ྉϓϥϯͷܖ໿͕ඞཁ

  9. None
  10. Mackerel ͱܾࡁ

  11. • ຖ݄ͷར༻࣮੷ʹԠͨ͡ैྔ՝ۚ • ར༻͍ͯ͠Δϗετ୆਺ʢͳͲʣͷҠಈฏۉ • ελϯμʔυϗετ1୆/1݄͋ͨΓ1800ԁ • ܾࡁखஈ: جຊతʹΫϨδοτΧʔυ •

    => ΫϨδοτΧʔυܾࡁʹ Stripe
  12. Stripe Mackerel Stripe.js v2 Mackerel JS Token Customer Token CardNumber,

    etc Token
  13. 3/1 4/1 ݄͝ͱͷ୆਺Ҡಈฏۉ

  14. Stripe Payments Mackerel Charge.create( amount: 2*1800, customer: "XXX" ) ݄ॳόον

  15. • ϘϦϡʔϜσΟεΧ΢ϯτͳͲಛผ৚݅͋Γ • ੥ٻॻ෷͍͋Γ • ࠓ͸ΫϨδοτΧʔυͱ͸ผޱͰूܭ

  16. Mackerel ͱܾࡁαʔϏε

  17. • ݱࡏ͸ΫϨδοτΧʔυܾࡁ͸ Stripe ܦ༝ • ࣮͸ Stripe ͕3ࣾ໨ (2019/02~)

  18. • αʔϏεϩʔϯν࣌఺ • ಛʹUSDܾࡁͰ Stripe ΋બ୒ࢶʹ • JPYܾࡁͷΈͱͷ൑அ: WebPay Λબ୒

    • (2014: Stripe ͷ೔ຊਐग़લ) 2014
  19. • WebPay αʔϏεऴྃ • ಉ͡ࠒ Stripe ೔ຊ্཮ • JCB ܾࡁ͕ඞཁ:

    PayJp Λબ୒ • 2018೥࣌఺Ͱ໿10%͕ JCB 2016~2017
  20. • Stripe JCB ରԠʂʂʂʂʂ • ຬΛ࣋ͯ͠ Stripe ΁Ҡߦ 2018~19

  21. ܾࡁαʔϏεΛҠߦ͢Δ

  22. • See Stripe docs ! • https://stripe.com/docs/ security/data-migrations

  23. • ৽αʔϏεͰͷܾࡁϩδοΫ࣮૷ • ސ٬σʔλͷҠ؅ • ܾࡁઌͷ੾Γ׵͑ • ϨϙʔςΟϯάͷ࠶ߏங

  24. • ࠔΔ͜ͱ͸ͦΜͳʹͳ͔ͬͨ • ϓϦϛςΟϒͳػೳͰ࣮ݱ͍ͯͨ͠ • ෳ਺ͷܾࡁαʔϏεΛಉ࣌ʹѻ͏͜ͱ͕ Մೳͳઃܭʹͳ͍ͬͯͨ ΤϯυϢʔβʔ޲͚ͷػೳҠߦ

  25. • (چސ٬ id) => (৽ސ٬ id) ͷϚοϐϯά͕ඞཁ • αʔϏεؒͰσʔλҠߦ =>

    ϚοϐϯάΛड͚औΔ • ࣄۀऀؒͷεέδϡʔϧௐ੔͕ඞཁɹ • ҠߦޙܾࡁͰ͖ͳ͘ͳͬͨͷ͸1%ఔ౓ ސ٬σʔλͷσʔλҠߦ
  26. ৽نސ٬ 1BZ+Q طଘސ٬ 1BZ+Q ܾࡁ 1BZ+Q

  27. ৽نސ٬ 4USJQF طଘސ٬ 1BZ+Q ܾࡁ 4USJQF1BZ+Q

  28. ৽نސ٬ 4USJQF طଘސ٬ NJHSBUJPO ܾࡁ QFOEJOH

  29. ৽نސ٬ 4USJQF طଘސ٬ 4USJQF ܾࡁ 4USJQF

  30. • ച্ɺೖۚͷαΠΫϧ͕มԽ͢Δ • ΧʔυϒϥϯυʹΑͬͯ΋ҟͳΔʂ • όοΫΦϑΟεͱௐ੔ɺ࣮૷ όοΫΦϑΟεͱͷ࿈ܞ

  31. • Ҡߦ͸੔ཧͷ޷ػͱଊ͑Δ • Ϩϙʔτ಺༰ɾ࣌ظΛ࠶ઃܭ͢Δ

  32. • ʮച্ΛకΊΔλΠϛϯάͰച্ͷ಺༁͕஌Γ͍ͨʂʯ • => Stripe ଆͷܾࡁҰཡ • ʮͦͷച্͕͍ͭೖۚ͞ΕΔ༧ఆͳͷ͔ʯΛؚΊΔ • ʮೖۚͷλΠϛϯάͰͦͷೖۚͷ಺༁͕஌Γ͍ͨʂʯ

    • => Stripe ଆͷೖۚ಺༁ ʮ͍ͭɺͲͷ਺ࣈ͕ඞཁʁʯ
  33. ݄ച্"""ԁ ݄ೖۚ༧ఆQQQԁ ݄ೖۚ༧ఆRRRԁ ݄ച্###ԁ ݄ೖۚ༧ఆSSSԁ ݄ೖۚ༧ఆTTTԁ ݄ೖۚ:::ԁ ݄ച্RRRԁ ݄ച্SSSԁ ݄ೖۚ999ԁ

    ݄ച্PPPԁ ݄ച্QQQԁ
  34. • Ϛελσʔλ͸ Stripe ͷ API • ͳΜͰ΋औΕΔʂ • ඞཁͳ௥Ճ৘ใ͸ܾࡁ࣌఺ͰϝλσʔλʹؚΊΔ •

    ʮϗετ୆਺ʯʮ૊৫໊ʯetc • API ܦ༝ͰϨϙʔτΛ࡞੒ • ޙॲཧΛՃ͔͑ͯΒόοΫΦϑΟεʹఏग़
  35. Ҡߦ͠·ͨ͠

  36. Stripe Mackerel Stripe.js v2 Mackerel JS CardNumber, etc Token Token

    Token Customer ࠶ܝ
  37. Stripe Payments Mackerel Customer.charge( amount: 2*1800, customer: "XXX" ) ݄ॳόον

    ࠶ܝ
  38. • ࠓͷͱ͜ΖStripe ΛඇৗʹϓϦϛςΟϒʹ࢖͍ͬͯΔ • Stripe ར༻ͱ͍͏ελʔτϥΠϯʹ • ͳΔ΂ͦ͘ͷ··Ҡߦ͢Δ͜ͱΛ༏ઌ • ΑΓϦονͳιϦϡʔγϣϯʹ΋໪࿦ڵຯ͕͋Δʂʂ

    • Elements / Billing • ࣮ࡍ Elements ΁ͷҠߦΛ·͞ʹ࣮ࢪத
  39. • ܧଓతʹαʔϏεશମΛվળ͍ͯ͘͠ • ܾࡁػೳ΋"੟Ҭ" ʹ͠ͳ͍ • ϢʔβʔɺϏδωεɺόοΫΦϑΟε SaaS ఏڙऀͱͯ͠

  40. • ๛෋ͳػೳɾվળͷԸܙΛड͚͍ͯ͘ • ࠓޙͷ·͢·͢ͷύϫʔΞοϓʹظ଴ • ࠷ۙ͸੥ٻॻʹ஫໨͍ͯ͠·͢ SaaS ར༻ऀͱͯ͠

  41. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠