#marina_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/1430130410049769565
๐ 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.
- marina_code, 1 hour ago, 4 messages
hey there! thanks for this example
it looks like the only other card saved to the customer (Visa ****1111; pm_1ORHeZCZU75Bkw8vTKlRQ92u) was saved in 2023, and was collected outside of the Payment Element
this means that it has allow_redisplay: 'unspecified', and isn't currently able to be displayed in the Payment Element
https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay
https://docs.stripe.com/payments/save-customer-payment-methods#display-existing-saved-payment-methods
to resolve this, the second link above provides two options to allow this card to be displayed
I add payment_method_allow_redisplay_filters with array but it's now working.
๐ Hey, taking over here, just taking a look
Can you share the full snippet of code as you have it now?
$features = [
'payment_method_redisplay' => $showSavedPaymentMethods ? 'enabled' : 'disabled',
'payment_method_remove' => $showSavedPaymentMethods ? 'enabled' : 'disabled',
'payment_method_save' => $showSavedPaymentMethods ? 'enabled' : 'disabled',
'payment_method_allow_redisplay_filters' => ['always', 'limited', 'unspecified'],
];
if ($features['payment_method_save'] === 'enabled') {
$features['payment_method_save_usage'] = 'off_session';
}
$customerSessionParams = [
'customer' => $customer->getCustomerId(),
'components' => [
'payment_element' => [
'enabled' => true,
'features' => $features
],
],
];
try {
$customerSession = $this->stripeClient->customerSessions->create($customerSessionParams);
And can you share the request ID for the session creation (req_xxx)? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Looks like that's for a different customer than the original message. Which customer are you intending to use, and what payment methods are being shown, and what ones are you expecting to see but are not shown?