Now, the same customer decides to buy a new subscription, paying for it and then active.
@marcolino922 Then the customer has two subscriptions.
Shouldn't pending invoices be automatically canceled if the customer starts a new subscription? If so, how to fix this behavior?
No. Why should it? Stripe just handles subscriptions and capturing payments. If you’ve created two subscriptions for a customer, then that customer has two subscriptions. If a customer should only have one active subscription in your application, then that‘s your business logic; not Stripe’s.