We are using Stripe payment processing for our customer\'s subscriptions. When users change plans, we want them to be charged immediately for the prorated difference. Stripe
You can use webhooks in Stripe. After creating an invoice, you can charge the invoice right away (invoice now). If the invoice payment fails, you can use a webhook to rollback to the old account.
Check this guide for more information about Stripe Subscriptions: https://www.truespotmedia.com/testing-webhooks-in-stripe-with-php/