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
決済のその先へ、顧客DBとして考えるStripe / Beyond payments, Stripe as a customer DB
Search
shiro seike
PRO
October 17, 2023
Programming
0
250
決済のその先へ、顧客DBとして考えるStripe / Beyond payments, Stripe as a customer DB
JP_Stripes 大阪 Vol.7 - 新サービス開発・収益化を加速するStripe活用法
https://jpstripes.connpass.com/event/294284/
shiro seike
PRO
October 17, 2023
Tweet
Share
More Decks by shiro seike
See All by shiro seike
サーバーレスらしさを意識した AWSにおける開発手法 / Development methodologies in AWS that are serverless-like
seike460
PRO
1
52
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
120
フルサーバーレスアーキテクチャの運用を重ねた先に見える価値 / The value that can be seen beyond the operation of a full serverless architecture
seike460
PRO
0
23
決断するための勇気、そのためのBacklog / Courage to make decisions, Backlog for that.
seike460
PRO
4
2.1k
Backlog API x Generative AI
seike460
PRO
0
86
「サーバーレス」ってなんだろう みんなでワイガヤ談義 / What is "serverless?" Wigaya discussion with everyone
seike460
PRO
0
34
とにかくHTTP3をライトニングに話す / Anyway, I'll talk to Lightning about HTTP3.
seike460
PRO
0
130
PHP Serverless Pattern
seike460
PRO
0
12
Other Decks in Programming
See All in Programming
GitHub Copilotのススメ
marcy731
1
220
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
410
Git Rebase
bkuhlmann
11
1.6k
VS Code をプロダクトにどう取り込むか
onomax
1
650
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.7k
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
220
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
970
Code Reviews
bkuhlmann
4
900
What We Can Learn From OSS
inouehi
0
430
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.5k
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.1k
Java 22 Overview
kishida
1
190
Featured
See All Featured
Building Your Own Lightsaber
phodgson
100
5.7k
Design by the Numbers
sachag
274
18k
Bash Introduction
62gerente
605
210k
Designing for humans not robots
tammielis
248
25k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
13
8.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
Transcript
DB Stripe JP_Stripes 大 Vol. 7 ・ Stripe 用 2
0 23 . 10 . 17 @seike 4 60 1
自己 @seike 46 0 - - @seike 46 0 -
AWS Community Builder Serverless - Fusic - / 門 - / - - PHP Japan - JAWS Days AWS Dev Day - Serverless Days Tokyo - - JP_Stripes - PHP 2023 行 長 - JAWS Festa 行 - Cloudflare Meet-up Fukuoka Serverless Meetup Fukuoka Fukuoka.php Fukuoka.go 2
Agenda 1 . 2 . 3 . 4 . DB
Stripe 3
01
https://fusic.co.jp/works/ 4 7 用 自 自 手 行 行 自
行 x SaaS 5
PHP Web 用
02
- Windows 人 手 自 行 - 用 行 Linux
- - - 用 用 - Stripe 用 入 8
入力 Email 入力 Stripe Payment Links 築 9
10
03
12 入力 行 Amazon S 3 Stripe Payment Links Stripe
行 Web hook 用 築
Web Amazon S 3 13 入力 OrderID 自 UUID 生
- API OrderID 生 - OrderID - OrderID JSON - OrderID.kaiseki OrderID.json OrderID Key 築 Amazon S 3 … Cloudfront … CDN AWS Lambda … FaaS
Event( ) -> Amazon S 3 14 行 JSON OrderID.json
-> OrderID OrderID -> OrderID.kaiseki 入 力 用 行 AWS Fargate … Amazon EventBridge …
http 15 Amazon S 3 入力 Email Stripe Payment Links
Payment Link 入 OrderID -> client_reference_id Email -> prefilled_email Email 人 OrderID Amazon SES … Email
Payment Links 16 Stripe 行 Payment Links 築 client_reference_id =
OrderID prefilled_email = Email 行 Webhook 築
築 築 17 Web hook 用 築 Payload OrderID Email
入 OrderID 築 生
Stripe 用 Webhook Webhook 言 SDK 非 18 <?php \Stripe\Stripe::setApiKey(
‘ sk_test_hoge … hoge'); $endpoint_secret = ‘ whsec_hoge … hoge ; $payload = @file_get_contents('php://input'); $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; $event = null; try { $event = \Stripe\Webhook::constructEvent( $payload, $sig_header, $endpoint_secret ); } catch(\UnexpectedValueException $e) { // Invalid payload http_response_code( 400 ); exit(); } catch(\Stripe\Exception\SignatureVerificationException $e) { // Invalid signature http_response_code( 400 ); exit(); }
04 DB
DB Stripe DB API AWS 高 DB 20 Stripe 用
21 Stripe Email OrderID Email OrderID OrderID 文 Stripe 築
Email 面
Stripe 22 AWS Amplify 用 Stripe DB 用 - Payment
Links 文 - Email AWS Amplify …
PaymentLink -> CheckOut 23 Email PaymentLink CheckOut 示
Stripe 用 24
Email 25
Email 用 26
customer 用 27
Checkout Session clientReferenceId = OrderID 28
URL 用 行 29
面 30 Email = Email 面 AWS Amplify
二 31
AWS Amplify Cognito 32 Next.js Email AWS Amplify 用 Amazon
Cognito 用 面 Amazon Cognito …
API Stripe 33 Amazon Cognito Email Stripe sessions 文 ->
OrderId
Stripe Stripe Session -> OrderId 34 Stripe ID Session OrderID
文
35 Next API NEXT_PUBLIC env Stripe AWS Lambda build
API Lambda
Stripe 用 DB DB SaaS 非 用 SaaS 手 36
Thank You We are Hiring ! https://recruit.fusic.co.jp/