#mtoledo2_payment-method-allow-redisplay
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/1349400210639425698
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I am using the stripe react js sdk by the way
correct
elements and payment element
created a custome session with the following
stripe customer_sessions create \
--customer=cus_QbmG9sozCV3TK7 \
-d "components[payment_element][enabled]"=true \
-d "components[payment_element][features][payment_method_redisplay]=enabled" \
-d "components[payment_element][features][payment_method_save]=enabled" \
-d "components[payment_element][features][payment_method_save_usage]=on_session" \
-d "components[payment_element][features][payment_method_remove]=enabled"
used that and hardcoded it as part of the option for now to test things
did notice the Save payment details for future purchases got added so something is happening
but can't get it to pull the save payment methods
If you are using the customer session on the frontend and have "payment_method_redisplay": "enabled" on it, then it should display payment methods
However, it will only display payment methods where allow_redisplay is set to always on the payment method https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay
That customer has pm_1QykNjEnfH5zKLApijsczhh8 attached
But allow_redisplay is unspecified
So basically if the payment method was saved through the customer session payment_method_save feature, then it should show up
ahhh got it
And assuming I can't update a payment method to enable that for testing?
Would need to go through full checkout first then create session again
Hm not sure offhand actually
I do see that as an available param in the payment method update endpoint: https://docs.stripe.com/api/payment_methods/update#update_payment_method-allow_redisplay
Recommend trying it