#ferra
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_624zOEI4CR3U1U
Yeah that won't work. You'll need to update the Elements instance to reflect the desired s_f_u value too: https://stripe.com/docs/js/elements_object/update#elements_update-options-setupFutureUsage
Oh ok I'll try that. This process (with a checkbox "save my card" along with the card form) is pretty common, that's too bad you don't have this example documented?
Yep, we don't. Believe there's work ongoing to add native support for this sometime in the near future
Thank you, it's working like a charm!
Hmm in fact I have a problem
It seem that this does not work:
elements.update({setupFutureUsage: null})
(when unchecking)
while does does work:
elements.update({setupFutureUsage: 'off_session'});
(when checking)
You can't set it to null, you'll need to pass and empty string ('')
ok ty
This is what I got:
Invalid value for elements.update(): setupFutureUsage should be one of the following strings: off_session, on_session. You specified: .
Maybe you just need to omit that parameter completely from the Elements object if not saving then
Yes but when I check the box, I set this parameter. Then I have to delete it if the box is unchecked
Normally you can unset values with an empty string. I've not really tried the new deferred intent flow, FYI
Sure, yep. So you can just call elements.update() and pass in all the other parameters, minus setupFutureUsage
It's not required so that should meet the requirements
that's pretty overkill to delete just one option 😮
Yep, valid. Not really a happy path for what you're trying to do right now (but we're working on that)
ok
Did that work?