Typica

Card Payment Now Available

Over the years, a lot of people have told me either in person or by email that they intended to send some money in support of the ongoing development of Typica. The vast majority of these people never followed through on that and I've long suspected that the reason for this is that I just haven't made it easy enough. Writing a check? Addressing an envelope? Dropping it in the mail? It's the 21st Century. Who does any of that stuff anymore? Typica also has a large international user base and it can be more challenging for people in other countries to send money this way. To put this in perspective, I can count on fingers the number of people who have helped cover some of the costs associated with Typica development over the past decade and as of when I'm writing this, there has been no outside financial support at all so far this year, though there have certainly been support and feature requests as well as costs.

In an effort to make it easier for people to support the development of Typica financially, I decided to add to the site a little way to pay what you want with a credit card. You can try that out here. Let me know if that doesn't work (screenshot the failure) so I can fix it in case I messed something up.

When putting this together, it was very important to me that my server would never receive the credit card number. Just like I didn't want Typica sending me other people's roasting data, I don't want this site to be a viable target for anybody looking to steal credit card information.

I decided to go with Stripe for payment processing because the integration documentation looked clear enough to figure out, they have a nice looking payment form that would save me the work of building that, it's designed so that my server never gets your credit card number, and there aren't any costs beyond the processing fees so if everybody ignores the new form it's not an ongoing expense.

The way this works is you put in the amount that you want to pay and click the button. That runs a bit of JavaScript in your web browser that does some simple validation, converts the amount entered into cents, and brings up Stripe's checkout form. Here you can enter your payment information and hit another button to confirm that you want to make the charge. When you do that, your web browser communicates with Stripe's servers which sends back a token. That token and the requested payment amount is then sent to my server. A program on my server then sends a request to Stripe with the token and amount to indicate an intention to charge the card, processes the response, and produces a receipt indicating if that charge attempt was successful or, if it wasn't, why it failed.

A secondary reason for doing this is because I'm also considering using this service to allow my shop's web site to take coffee orders. Taking orders for specific products and charging when those ship is a little more complicated, but setting things up here was a good learning experience toward working on that.