O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Issuing Refunds

One of the first things we need to allow administrators to do is refund purchases. In a way, refunds are a miniature of everything that caused me to want to write this book, which is to say that their apparent API simplicity covers a tremendous amount of business logic complexity.

Refunds are actually even easier in the Stripe API than purchases, since we don’t need to validate a credit card or other purchase method. In fact, we could choose to do refunds from the Stripe dashboard and just catch a webhook on our side to process the data.

But there are all kinds of issues we need to deal with:

  • Who can authorize a refund?
  • How does somebody authorize a refund?
  • Can we issue a partial refund? If so, does that mean we can allow multiple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required