#cnguyen
1 messages · Page 1 of 1 (latest)
On the PI, we can add a customer and a pm but it's not mandatory
What is the best way to handle a payment ?
1 - Create the customer => cus_XXX
2 - Create the payment method with the Stripe Element => pm_XXX
3 - Then attach the cus_XXX to the pm_XXX
4 - THen do the PI with the pm_XXX and the cus_XX
etc
https://stripe.com/docs/payments/save-during-payment is the canonical flow
1/ create Customer
2/ create PI and set Customer and setup_future_usage
3/ confirm PI
This will automatically take a payment and attach the PaymentMethod to the Customer
I want that the pm is attached to the customer