Handling grace periods for failed service-level downgrades

I'll preface by saying I'm very new to working with Apple subscriptions and my question is probably quite silly, but I can't find any information on this topic. What I am currently stumped about is the handling of grace periods for service-level downgrades that have experienced billing failure.

As an example, the user wants to downgrade from Product B to Product A. The products are in different service levels and have different durations, so the downgrade is scheduled for the next renewal. When that time comes, billing fails and our server receives a DID_FAIL_TO_RENEW notification.

How should such a case be handled? If a grace period is in place, should that grace period apply to the original subscription (to Product B), the new subscription (to Product A) or both?

Thanks in advance

Handling grace periods for failed service-level downgrades
 
 
Q