#khornfucius2
1 messages · Page 1 of 1 (latest)
Hi there,
The link you are sharing is about customizing appearance,
But once you collected the PaymentMethod in this step,
https://stripe.com/docs/payments/save-and-reuse?platform=web&html-or-react=react#web-collect-payment-details
You should call your backend in order to update the customer's default credit card:
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
No need for webhook here
Thanks so much for your reply!
I'm under the impression that the collection of payment details will occur via a webhook on the backend once the user hits the submit button after entering their details.
Or should the payment details be returned to the frontend, then sent to the backend for updating?
Or should the payment details be returned to the frontend, then sent to the backend for updating?
You need to follow this flow, without webhook. A complete example in this step how to collect the PaymentMethod from the frontend to the backend:
https://stripe.com/docs/payments/save-and-reuse?platform=web&html-or-react=react#web-submit-payment-details
got it, thanks very much!
Another question - i'm working on the backend, but the frontend is not up. Is it possible to mock a response from the frontend with card details so that i can process on the backend?
Yes
you can use one of this cards:
https://stripe.com/docs/testing?numbers-or-method-or-token=payment-methods#cards
like pm_card_visa without having a frontend to generate a PaymentMethod by setting card numbers
How does this work pertaining to setupIntents as opposed to paymentIntents? it's not the same as creating a paymentIntent with card details right?
I don't understand the Q