The Ins and Outs of Payment

Keeping it quick for this update because I want to get back to development! The good news is: I've established CloseBrace subscription plans with Stripe and written the code necessary to let a user pick their plan, submit their payment info and, on success, get correctly signed up for CloseBrace pro. This involves a bit of back-n-forth with the Stripe API, but it's fairly straightforward.

Somewhat less straightforward: listening for Stripe's various events, such as a subscription cancellation due to a credit card expiring, and similar. That's what I'm working on now. It's coming along, but there are a lot of events to pay attention to (fortunately for most of them all I have to do is go "OK, 200, thanks" and not actually do anything). I am borrowing liberally from existing code here, and using existing NPM modules, in order to speed things up, but it still needs custom code work to wire it into Keystone.

Fortunately I'm most of the way there -- events are getting recognized and am in the process of testing my first response to such an event. First one's always the toughest, so it should go smoothly from there! Once I get event monitoring and response running, all that's left is letting the user edit their subscription, either to cancel or change plans.

That's all for now. More on Friday!

Author image
Founder and creator of CloseBrace
Providence, RI, USA Website