Learn Django

Understanding Stripe

According to its website, Stripe is "A set of unified APIs and tools that instantly enable businesses to accept and manage online payments." The company makes it really easy to build web and mobile applications that accept payments from customers.

You may be wondering how Stripe works. After all, users enter their credit card information on the CRM Easy form and click submit. How does that information get to Stripe for processing?

Our application interacts with Stripe through a web service. At a high level, you can think of a web service as a special URL. For example, let's say that Stripe's web service runs at http://api.stripe.com/payments/. If you access this URL in browser nothing will happen. That's because it isn't meant for users to access like that. Instead, it's meant as a tool for developers to use. What does that mean?

That URL is listening for a special kind of request. Specifically, it is looking for HTTP POST requests. These requests must have a very specific payload of data. It must contain the developer's private key, a customer ID, and an amount to charge the customer. If the URL receives a valid payload, it can then try to process the credit card. Once it does that, it sends the results of the credit card transaction back to the developer who made the initial request. Those results could be "successfully charged credit card", or perhaps "credit card expired".

Stripe & the CRM Easy App

Here's an overview of how Stripe is used in this project.

Track your progress with a free account