#brandon_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1331373068026773586
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- brandon_code, 3 hours ago, 15 messages
I have a request ID here if it helps
req_A2UQqSydFSG6K0
Hello
In order to re-use a PaymentMethod after it's been saved, you can use this endpoint to attach it to a customer - https://docs.stripe.com/api/payment_methods/attach
Once the payment method has been attached, you can re-use it.
Is that not what the setup_future_usage is supposed to do?
"setup_future_usage": "off_session",
You're using a different flow where you're using setup_future_usage after the payment method has already been tokenized.
Are you setting customer session secret when you collect the payment method?
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#enable-saving-the-payment-method-in-the-payment-element
no we're not using a customer session
Gotcha. Since you're using defer intent flow (where you create PaymentIntent after collecting the payment method details), you can implement customer sessions API. That would let you attach the payment method to a customer
So is the customer session essential for this to stop this problem from occuring?
Yup
and can the customer session just be used strictly for this key? ie not showing the features to the customer? ie:
payment_method_redisplay: 'enabled',
payment_method_save: 'enabled',
payment_method_remove: 'enabled',```
I think so? Not 100% sure what you mean by that but you can test it out in test mode pretty quickly