stripe / stripe-java

Java library for the Stripe API.

Home Page:https://stripe.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade Stripe Subscription

Saurabh48 opened this issue · comments

Is your feature request related to a problem? Please describe.

Hi,
I am using Stripe-Java for my spring boot project.
first, I created a customer and plan on stripe.
then I created the subscription on stripe and from the return stripe object, I got the status 'incomplete' and 'client_secret'.
then I used this 'client_secret' token to load the payment page from stripe, then i filled the test card details (4242 4242 4242 4242) on that payment page and procced. Then my subscription has updated and I got the subscription status 'active'.

But now I'm trying to upgrade the subscription and it throws the error that
' This customer has no attached payment source or default payment method. Please consider adding a default payment method'.

But as mentioned above, I have added the test card details on the stripe payment page when subscription was created and made active at first time.

Then why this error is there ?

please help me in that issue.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Hey @Saurabh48 ! Github issues should be limited to bugs with the stripe-java library itself. Your ask is more an integration support question better directed at our support team instead so I'm going to close it out. You can contact them here: https://support.stripe.com/contact

To unblock you though the problem is likely that you didn't configure the Subscription the right way. I recommend carefully going through our docs here first. What you need to do is set payment_settings[save_default_payment_method]: 'on_subscription ' (docs) so that when you complete that first payment, that underlying payment method created will be the default for future payments. If you do have follow up questions, please reach out to our support team!