Pixela’s subscription billing is built with Patreon webhook
I introduced in the article I wrote the other day, Pixela has a few features that only work with Patreon Patron.
Pixela’s Patron is a very small $1 monthly subscription, but it needs still a billing system. I think it’s normal to build a billing system using stripe, etc., but I want Pixela to be easy to use and continue to be easy to develop.
So I used Patreon’s webhook function to easily implement a billing system. In this article, I’ll go into a bit more detail on how to do this.
Integrate Patreon subscriptions into own service
Do you already know Patreon? Patreon is a crowdfunding platform.
My interest in Patreon started when I learned that I could get monthly subscription support from patrons. I wondered if I could take advantage of Patreon, I first read Patreon’s API Reference. It turns out that Patreon can make a Webhook request when Patron is newly registered and unregistered.
I thought that if Pixela had the following mechanism to take advantage of webhook, it would be able to hand over the handling of charges to Patreon’s platform;
- There is a new Patron registration. Webhook request is generated for Pixela.
- Pixela gets Patreon user information in the request’s payload when it receives a Webhook request.
- Generate registration code and record Pixela database.
- Send the registration code to Patron’s e-mail address in Payload.
- When Patron registers registration code with Pixela, it checks its validity.
I’ve done this, and so far it works fine as a billing system. If Patron leaves, just do the opposite. Isn’t it easy?
pros/cons
The advantage of this method is that it’s easy to build and I don’t have to worry about billing failures, refund processing, or withdrawal. I just want to focus on developing Pixela.
I also feel that the advantage is that Patrons can’t buy Pixela service directly. I love the people who support Pixela.
There are also disadvantages. There is no transaction management in this process flow (just only a simple retry), so if something goes wrong, the user should contact me. Now I allow it.
And the fee. I understand that Patreon is a great platform, but I may find this fee burdensome.
Conclusion
I found that Patreon can be used effectively in the creative activities of developing Web services (instead of YouTube and podcasts). I hope it will spread to many people.