Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A stripe customer cannot have more than 100 stripe payment methods #325

Open
rabbitbike opened this issue Feb 9, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@rabbitbike
Copy link

rabbitbike commented Feb 9, 2024

Solidus Version
solidus 4.3
solidus_stripe 5.0.2

To Reproduce

Create a test where a user tries to process over 100 payments.

I am using MiniTest instead of RSpec and have a solidus_stripe_customer fixture with a set stripe_customer_id.
So this test user is not recreated for each test and keeps using the same stripe_customer_id.
We have been running tests using this user in CI for the last few days and the tests are now failing.

Current Behavior

It seems like stripe has a limit of 100 stripe payment methods per stripe customer.
We have just migrated to v5 and currently we don't have such customers yet, so we are not facing an issue with actual customers at this moment.

But in our tests, we have one test customer with one stripe_customer_id that creates multiple payments.
We have hit the limit of 100 payment methods for that test customer, and the tests are now failing with Customer cus_******* already has the maximum number of payment methods attached.

Desired Behavior

Some customers may choose not to save their payment methods in wallet_payment_sources, but still keep shopping multiple times. Though it's unlikely that such customers to hit the limit any time soon, we would like to allow them to keep shopping even after 100 orders or payment attempts.

Additional context

I would like to ask what should be the best way to ensure that customers can keep adding payment methods without hitting the limit. Should I remove old payment methods that are not saved in wallet_payment_sources, or should I create a new stripe customer_id when the limit is reached? I would love to learn the most effective strategy for handling this.

One other thing I would like to mention is that I have set "off_session" for future payment preference for all payments. I'm not sure if that affects how payments are counted for a user.

Please correct me if my assumptions are wrong or let me know if there is some options to set that I'm missing when creating stripe payment_methods or payment_intents.

Thank you🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant