#mclowrider_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/1488892105504849932
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The customer session setup in the backend
var options = new CustomerSessionCreateOptions
{
Customer = customerId,
Components = new CustomerSessionComponentsOptions(),
ExtraParams = new Dictionary<string, object>
{
["components[payment_element][enabled]"] = true,
["components[payment_element][features][payment_method_redisplay]"] = "enabled",
["components[payment_element][features][payment_method_save]"] = "enabled",
["components[payment_element][features][payment_method_save_usage]"] = recurringPaymentsRequired ? "off_session" : "on_session",
["components[payment_element][features][payment_method_remove]"] = "disabled",
["components[mobile_payment_element][enabled]"] = true,
["components[mobile_payment_element][features][payment_method_save]"] = "enabled",
["components[mobile_payment_element][features][payment_method_remove]"] = "disabled",
["components[mobile_payment_element][features][payment_method_redisplay]"] = "enabled",
["components[mobile_payment_element][features][payment_method_allow_redisplay_filters]"] = new[] { "always", "limited", "unspecified" }
}
};
Hello! Which doc are you following?
Thanks! So you're rendering the PaymentSheet with a CustomerSession but you aren't seeing the Customer's saved payment methods? How were you able to test removing saved payment methods?
The remove button doesnt show when the client switches to a customer session
Based on the customer session config above
I see. Does the Customer have saved payment methods with allow_redisplay: always? https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay
If you share the Customer ID, I can also verify.
One payment method redisplays but only ones created when the customer uses a session secret. Older one dont show
cus_NOkNSbpaHkk93a
I see that the Customer has 6 card payment methods attached to it and 4 have allow_redisplay: always but 2 have allow_redisplay: unspecified meaning it wasn't set and won't be shown. Are these the ones you're missing?
- pm_1RX0WgB6RcW2vRiFvwNCWcia
- pm_1PucG7B6RcW2vRiFSXMlRlja
It only showed the payment mthods saved with the customer session
Can you share those IDs?
Sorry trying to find them
You could list the Customer's PaymentMethods on the server side where allow_redisplay: always to see which should show as saved payment methods: https://docs.stripe.com/api/payment_methods/customer_list?lang=php#list_customer_payment_methods-allow_redisplay
(paymentMethodID: "pm_1TEu6lB6RcW2vRiFuthyVWNy") is added from payment sheet with client secret.
(paymentMethodID: "pm_1TE63KB6RcW2vRiFlro00cLY") is added from payment sheet with ephemeral key.
Only the first one shows up when lisitng the payment method
There are four other created before the Payment Sheet was introduced a while back. They don't show up either
Hopefully this helps
So the only PaymentMethod you're seeing when rendering the PaymentSheet with a CustomerSession for that Customer is pm_1TEu6lB6RcW2vRiFuthyVWNy?
Yes i think so? Or was it the other way around
It might e the other way around actually
More importantly, only one of those payment methods show up when the session secret is used
We need to see payments methods created with the session and others too.
here is a request id for a session created a bit ago req_0HwfGuk4l4x9IV
Just so you see the session component setup
Both the PaymentMethod IDs you shared have allow_redisplay: always so I would expect both to show...
- One was set when the PaymentIntent was confirmed https://dashboard.stripe.com/acct_1Eqgp1B6RcW2vRiF/test/logs/req_6wiCjtca7YoDpw
- The other was set in a PaymentMethod update https://dashboard.stripe.com/acct_1Eqgp1B6RcW2vRiF/test/logs/req_X9ZwHZTx7GpdcR
And the session setup is correct?
FYI i'm taking over for my colleague here, gimme a bit to get caught up
It looks right - payment_method_redisplay is enabled and customer is set. But hopefully solanum can provide fresh eyes once they're caught up ๐
Thanks jazz
this might require some more in depth testing on our side, if needed do you mind if we convert this to a case and follow up over email?
I dont mind ๐๐พ
If it helps, the mobile client here is an iOS app.
Please contact me using my company email if possible
Do you mind if I DM that email to you?
nah we have a process for this! you'll get a DM in a bit
Great. Thanks ๐๐พ
hm actually the process is having issues right now
can you fill this out and let me know once that's done?
try clicking the contact support button on the right
it should skip you past the normal chat bot, let me know if you have any issues