Overview of the Flow
Example with React application1
Frontend (React): On form submission, use Stripe’s createPaymentMethod method to convert the card details into a secure token (pm_…).
2
Frontend (React): Send this token and the card type to Dispatch API endpoint:
POST /customers/payment-methods
3
Backend (Dispatch API): We receive the token, use it with our Stripe backend SDK to verify a Payment Method and attach it to the customer in our system.