Prorata Subscription

I am trying to implement the prorata
https://shopify.dev/apps/billing/subscriptions#upgrades-and-downgrades
but not able to find much tech documentation about it Can you please help me to implement it with the help of shopify API?

I am creating the subscription for a customer with creating payment link after making payment on this link customer will be charged to the subscription Suppose customer started 30 day subscription on 1st of Jan and uninstall the shopify app after 10 days (10th of Jan), than come back on 15th of Jan and reinstall the app. In that case he has to rebuy the subscription but I can not charge him full 30 days as he as already paid for 30 days on 1st of Jan, and I am not able to implement this.

I am using this for the subscription https://shopify.dev/api/admin-rest/2023-01/resources/recurringapplicationcharge#post-recurring-application-charges

It returns confirmation_url

Hi [email removed]andrew_shakes :waving_hand:

At this time, to specify a replacement behaviour for recurring application charges, you’ll need to set the AppSubscriptionReplacementBehavior when creating the new charges (on the 15th) using the appSubscriptionCreate mutation.

Hope that helps!

Thanks for the reply.

There is no subscription after uninstall the app. Actually after re-install the app customer have balance amount at my end as they uninstall with-in paid billing cycle and I want to compensate the customer in new subscription with that balance amount at re-install.

I am using this to create the subscription always after re-install too.

https://shopify.dev/api/admin-rest/2023-01/resources/recurringapplicationcharge#post-recurring-application-charges

var recurringCharge = new RecurringCharge
{
Name = “xyz”,
Price = 100.00,
ReturnUrl = “planUrl”,
ConfirmationUrl = “ConfirmationUrl”,
Terms = “T&C”,
Test = true,
};

Thanks

If the app has been uninstalled, a prorated app credit is automatically generated for the merchant. With that, you can create a new recurring charge using appSubscriptionCreate mutation when the app is reinstalled regardless of the merchant’s app installation history.