#orangebanana_api
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/1298943573437448192
đ 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.
- orangebanana_api, 2 days ago, 17 messages
Some additional information:
- I need to migrate currently save payment methods in our database to be visible under Payment Element + customer session
- I want to display the payment methods from Payment Element under User > Profile > Payment methods for example
This is the successful migration to Payment Elements.
The saved payment methods displayed there are not what our customer saved previously
I think you should be able to yes
Do you saved pm_123 attached to a customer previously ?
if so you should be able to display them in PaymentElement using Customer session yes:
https://docs.stripe.com/payments/save-during-payment?platform=web&ui=elements#save-payment-methods
It was attached
await stripe.paymentMethods.attach(stripePaymentMethodId, {
customer: stripeCustomerId,
});
Also saved in database with some details
stripeCustomerId, stripePaymentMethodId, type, brand, last4
Great and were you able to display the PaymentMethod in your Payment Element ?
The problem is that those payments were not displayed
Can you share a Customer Id ?
cus_IrjisN4hpcVV5z it's this one from testing mode
And what is the PaymentMethod Id that is attached to them and you were exepcting to be visible in PaymentElement ?
Let me try again and see because I might have been on the wrong account
Tested again and it doesn't seem to be the wrong customer
This is the customer ID: cus_JDrLmJHtPt8Mlu
I have 2 payment methods from previous implementation before migrating to Payment element
But none are displayed
Payment method ids: pm_1QDOBDBaRfwWelZynub1zIoi, pm_1QDO9JBaRfwWelZyGgoT8vKo
Is it because they are on testing mode with testing payments?
You might need to update the allow_redisplay property of those PaymentMethods: https://docs.stripe.com/api/payment_methods/update#update_payment_method-allow_redisplay
You mean I should go through the entire saved payments and update them? Like a migration
Try it with a few, and if it helps - yes, you will need to update all of them.
I'll try that then
And for the 2nd question
Displaying the payment methods under user profile
This is from before migrating to Payment Elements. Which is the custom version
I don't think is possible to use Payment Element to display/save/remove payments without completing a payment, right?
If you set allow_redisplay=always on the existing PaymentMethods, you should be able to see them on the Payment Element.
I get that
But this would be on a page where the user only displays/add/removes a payment method
Not using it to pay for something
Oh, you mean use Payment Element to manage PaymentMethods?
Exactly
I don't think this is supported right now, unfortunately.
If you're using Subscriptions, you can use Billing Portal to manage Subscriptions/PaymentMethods: https://docs.stripe.com/customer-management
I'm using payment intents
Yeah, it's only possible during payment then.
Ok
Then I'll still use the previous implementation and try to set allow_redisplay=always
I'll try that and come back with an answer latest tomorrow
Thanks for your help
Happy to help.