I wrote an article here about what I feel is the most important through this development. [Personal development] The development process was the most important ~ A money-making service that allows you to monetize your blog with just one tag ~
The other day, I released a service called ** plog **.
How to use it is posted on YouTube.
Recently, blog monetization services such as note and zenne with paid articles have become popular. It's a very good service, but I thought it was ** platform-dependent revenue, and above all, the fees were high ... **.
So, ** I came up with a platform-independent paid blog monetization service and launched the alpha version the other day. ** **
The overall rough image looks like this.
-** ① Give me a 100 yen payment form ** I want a form for any article! And request from client to server
-** ② Give me a 100 yen payment form based on the information **
post /v1/payment_intents
Request a payment form using stripe api
-** ③ Return the original payment form ** Payment Intents information is returned
-** ④ Return Client Secret ** Obtain Client Secret from the returned payment intent and return it to Client
-** ⑤ Purchase paid articles ** Ask the user to enter credit card information etc. and press the payment button
-** ⑥ Settlement implementation **
When the user presses the purchase button for a paid article, use the `stripe.confirmCardPayment (clientSecret, data ?, options?)`
Stripe.js function to request Stripe to make a payment.
-** ⑦ Information is stored when payment is completed with Webhook ** When the payment is completed normally using Stripe's webhook, the information and various items that were settled normally are stored in the DB and completed.
It is a flow like.
** Made with MVP in mind **, so it's very easy to make.
The subject is from here, and plog uses Stripe to operate the service. There were some confusions when using Stripe, so I will summarize it as well as organizing my head.
I'm trying to use Stripe, but I like which Charges Checkout Payment Intents can be used! People who think
Results You can look at the official Stripe API, Since docs is a little heavy to read, I will summarize it as an image that gives you an overall feeling.
First of all, the payment patterns are roughly divided into these three, and you can use the means that suits your purpose.
Charges API https://stripe.com/docs/payments/charges-api
The Charges API is an old payment API that does not process bank requests for card authentication. Instead, try the new payment API and integration.
Was it a standing position like the advancement of Payment Intents? First of all, it is officially said like this, so it seems better not to use it.
After using it easily, you can do almost anything you want with Payment Intents, so if you are going to use charge, I think it's okay to use Payment Intents.
Stripe Checkout
It seems that it can be used when you want to make a payment using the almost fixed template provided by Stripe. However, since the payment screen is redirected to the Stripe side, it seems difficult to do something special at the time of payment.
Also, if you want to enter data other than the data required for Stripe, it is easier to create a payment form yourself, so It seems more convenient to use Payment Intents.
PaymentIntents API
If you want to customize the payment form by yourself like this, it seems better to use Payment Intents.
↓ I have the fastest way to implement it while looking at this docs. https://stripe.com/docs/payments/accept-a-payment?integration=elements
Webhook
The Webhook provided by Stripe was very useful, as I learned later.
When the payment is completed, when the payment fails, etc. You can specify various triggers to incorporate the implementation.
In the case of plog, when the payment is completed, the purchaser information etc. is made permanent in the DB.
plog is also a kind of low code tool, Like Stripe, it is possible to easily introduce the difficult and troublesome part of payment with low code. I was very grateful to the developers.
In addition, I wrote an article here about what I feel is the most important through this development. [Personal development] The development process was the most important ~ A money-making service that allows you to monetize your blog with just one tag ~
** A money-making service that allows you to monetize your blog with just one tag ** ** It was a plog. ** ** https://plog.cash/
Recommended Posts