#Pain Payment Methods

1 messages ยท Page 1 of 1 (latest)

shy marten
#

Hi ๐Ÿ‘‹
I'm not clear what you mean about add an option for collecting payment. The process documented there is intended to collect payment at the same time it saves the Payment Method

naive surge
#

Because I want them to be able to use it initially to pay for something, but also have an option that allows the user to save their card (when adding the card)

#

e.g. Instead of this message I wish to add a toggle myself so the end-user can decide whether to save it or not

naive surge
shy marten
#

Okay so the setting that triggers this is the setup_future_usage='off_session',

#

You could change this and update the Payment Intent based on a toggle switch

#

But you would need to create the toggle switch and the server<-> client communication

naive surge
#

What I was thinking initially to do is:

Create the payment intent as usual for the stripe elements
Add a Toggle below
If they decide to save, I simply save the payment method to the customers account

shy marten
naive surge
#

Oh I confused myself again, I thought I'd have to update the clientSecret (not sure why I keep thinking that).

#

Yeah, that'd work pretty good.

#

Just to confirm, using this checkout flow I will have to listen to the webhook callbacks, correct?

shy marten
#

No. This would save the PM to the customer as part of the payment process. It would still be a good idea to listen to webhooks but they are not mandatory

naive surge
#

Sorry, to clarify - for the payment success.

#

Not saving the cards ^

shy marten
#

Oh yes, you would want to do that as a best practice

naive surge
#

Got it, that answers everything; thank you as always.

shy marten
#

Happy to help ๐Ÿ™‚