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

Cannot use pending updates while swapping plans #969

Closed
driesvints opened this issue Jul 6, 2020 · 9 comments
Closed

Cannot use pending updates while swapping plans #969

driesvints opened this issue Jul 6, 2020 · 9 comments

Comments

@driesvints
Copy link
Member

  • Cashier Version: 12.0.0

Atm Cashier cannot use pending updates while swapping plans due to a bug in Stripe which prevents pending updates while deleting subscription items.

Reproducable by:

$subscription->pendingIfPaymentFails()->swap('new-plan');

This will delete the old subscription item and create a new one. Deleting subscription items isn't available atm in Stripe. I'm in contact with Stripe and following up.

@driesvints
Copy link
Member Author

Reminder to self: re-send laravel/docs#6090 when this is resolved.

@driesvints
Copy link
Member Author

Stripe let me know that they'd backlogged a fix for this so pending updates is unfortunately not going to happen atm for Cashier.

@driesvints driesvints pinned this issue Aug 3, 2020
@Sans84
Copy link

Sans84 commented Sep 27, 2022

@driesvints
Now using the Stripe API I can swap the plan using a pending update. But I still can't use $subscription->pendingIfPaymentFails()->swap('new-plan'). Now I get the error: "When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[0][tax_rates] is not supported."

@driesvints
Copy link
Member Author

Unfortunately not... I filtered out the tax_rates from the request but I still get the error from this issue:

Stripe\Exception\InvalidRequestException: When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[1][deleted] is not supported.

@jamesh-purr
Copy link

Hey @driesvints

Why was this issue closed? The issue still exists when trying to use pending payments on subscription updates?

@driesvints
Copy link
Member Author

It is currently not possible to use pending payments in cashier because of the above mentioned limitation in the Stripe API. We've closed this because we cannot pursue a fix but we'll keep this pinned in the repo.

@jamesh-purr
Copy link

Hey @driesvints

Thanks for getting back to me. I got this from stripe support which appears to be in their api?

https://stripe.com/docs/billing/subscriptions/pending-updates#canceling-changing

It just seems that updating subscription itself via api should be fine. The issue regarding tax rates I ran into just like above.

Would that not suggest this is an issue with the code structure/the way updates are processed in cashier than a stripe api issue? Apologies if I am misunderstanding what you mean by a stripe api limitation.

@driesvints
Copy link
Member Author

Changing anything to the way stripe recommends will have a significant impact in the way Cashier works. We cannot do that. They need to support deleting subscription items during pending updates.

@jamesh-purr
Copy link

Hey @driesvints

Thats fair enough. Looks like i need to live through some more pain for the saas im doing haha. Thanks for getting back to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants