Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Created April 29, 2014 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/11405678 to your computer and use it in GitHub Desktop.
Save JoshCheek/11405678 to your computer and use it in GitHub Desktop.
Is this how stripe works?

I think this is how Stripe works

  1. There is a form on my page which collects credit card information
  2. The user fills this out, it is sent via JavaScript to Stripe
  3. Stripe returns a status code and if it worked, a token
  4. The callback then submits the token to your server where you associate it to that user by passing it as the card when you create a customer via their api
  5. The customer has a customer id, which you need to associate to your user
  6. You can then charge the customer through the api using the customer id
  7. Presumably reponse has a payment id or something which you can then save in your db to record that the user has paid you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment