#mtoledo2_payment-method-allow-redisplay

1 messages ¡ Page 1 of 1 (latest)

next rampartBOT
#

👋 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.

ebon sorrel
#

I am using the stripe react js sdk by the way

mystic tendon
#

Using Elements?

#

Not Checkout, right?

ebon sorrel
#

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

mystic tendon
#

If you are using the customer session on the frontend and have "payment_method_redisplay": "enabled" on it, then it should display payment methods

#

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

ebon sorrel
#

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

mystic tendon
#

Hm not sure offhand actually

#

Recommend trying it

next rampartBOT