Noel Rappin Writes Here

Take My Money! Accepting Payments on the Web

Posted on August 17, 2016

I love this cover, by the way. I love this cover, by the way.

My new book, Take My Money: Accepting Payments on the Web, is available today. If you have a Rails application that touches money, this book will help you. I hope that this book will help you build your payment application with less stress and fewer mistakes.

Here’s why I wrote it: My favorite books and blog posts to write are the ones that I wish I had been able to read when I was starting a new project.

A few years ago, I started working on a legacy rescue project. For the first time I was responsible for significant payment and financial management logic. The application already had API communication with a gateway, so I thought the hard part was already done.

I quickly found out that the API was the easy part. I had to manage inventory, validate data, handle refunds, prepare reports, and all the other things that stand between “taking a payment” and “running a business”. I had to make sure that a database failure after the credit card purchase didn’t cause a user to get charged without the payment registering in our system. Or that a payment gateway failure didn’t cause a user to get our service for free.

I looked for information on good practices in this area and found relatively little. So I fell back on general principles of software development. And I did some things right, and I made some mistakes.

And eventually, I wrote the things I did right, and I wrote down the mistakes, and how to avoid them. The resulting book, as I’ve mentioned, is called Take My Money: Accepting Payments on the Web, and it goes on sale in beta today, from the Pragmatic Press.

The topics in this book cover the literal core of business logic: taking payments, providing a good or service in return, managing money, reporting finances. Not only do these topics tend to involve the most complicated logic in the system, but people tend to react more strongly to bugs involving money then to, say, the search algorithm.

I’m really happy with how the book is turning out. It’s about payment gateways, sure, but also about data modeling and application design.

Table of Contents

Here’s the current table of contents, subject to change.

  1. Not Taking Payments on the Web (yet): Setting up the system, talking about data modeling and handling money as data.
  2. Take The Money: Interacting with Stripe and accepting our first payment.
  3. Client-Side Payment Authentication: Using stripe.js to prevent credit card information from ever touching your server.
  4. PayPal: ‘Nuff said.
  5. Failure is Totally an Option: How to react to data failures, gateway failures, database failures. How to structure your app to handle them.
  6. Subscriptions: Handling recurring payments
  7. The Administration Experience: Dave Thomas was gracious enough to let me interview him about the Pragmatic store. He told me that two-thirds of the Pragmatic Store code was administrative. Here we start to learn why.
  8. Administration Roles: Setting up authentication and then using authentication to do things only Admins should do, like refunds.
  9. Administration and Data Security: How do you maintain data integrity and still let administrators make changes. Some tips.
  10. Reporting: (Forthcoming)
  11. Making Payments and Paying Taxes (Forthcoming)
  12. Going to Production (Forthcoming)


comments powered by Disqus

Copyright 2024 Noel Rappin

All opinions and thoughts expressed or shared in this article or post are my own and are independent of and should not be attributed to my current employer, Chime Financial, Inc., or its subsidiaries.