How it works...

This is the Stripe charging process:

  1. The user fills in the payment form and clicks on the Submit button.
  2. The frontend (your Ionic app) will call API to Stripe using the Stripe object and send along all the payment information.
  3. Stripe will return a token ID, which is basically a way to confirm that everything is correct and you can charge the card now.
  1. The frontend will use the token ID to send to its backend (without the credit card information) to authorize the charge.
  2. The backend will call another Stripe API to say I'm going to charge now. Stripe will return the success event to the backend at this point.
  3. The backend will then return the success event to the frontend.
  4. The frontend should render a new page, such as the ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.