Re: Prorata Subscription

Prorata Subscription

andrew_shakes
Shopify Partner
4 0 0

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-appli...

It returns confirmation_url

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1451 238 497

Hi @andrew_shakes 👋

 

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!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

andrew_shakes
Shopify Partner
4 0 0

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-appli...


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

 

Thanks

ShopifyDevSup
Shopify Staff
1451 238 497

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. 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog