AppSubscription object is not updated when the discount duration limit is reached

Hello!

When retrieving data from an app’s active subscription via GraphQL, according to the documentation, the RemainingDurationInIntervals field reflects the remaining number of billing intervals to which the discount will be applied. Therefore, the expected behaviour is for this number to decrease for each billing cycle interval until it reaches 0 when the discount duration limit has elapsed.

However, in this example with my dev store, where I created a discounted monthly subscription with a duration limit of one billing cycle interval, after the first month has elapsed, the RemainingDurationInIntervals field still shows 1, when it should be 0, and ther currentPeriodEnd field is not updated.

This is JSON response from the GraphQL request:

{
    "data": {
        "node": {
            "createdAt": "2025-05-06T10:52:03Z",
            "currentPeriodEnd": "2025-06-05T10:52:39Z",
            "id": "gid://shopify/AppSubscription/27358724150",
            "name": "Professional",
            "status": "ACTIVE",
            "test": true,
            "trialDays": 0,           
            "lineItems": [
                {
                    "plan": {
                        "pricingDetails": {
                            "interval": "EVERY_30_DAYS",
                            "price": {
                                "amount": "4.99",
                                "currencyCode": "USD"
                            },
                            "discount": {
                                "value": {
                                    "amount": {
                                        "amount": "2.495",
                                        "currencyCode": "USD"
                                    }
                                },
                                "durationLimitInIntervals": 1,
                                "remainingDurationInIntervals": 1,
                                "priceAfterDiscount": {
                                    "amount": "2.49",
                                    "currencyCode": "USD"
                                }
                            }
                        }
                    }
                }
            ]
        }
    }

Is this due to a test charge or a development store charge? Or could it occur with any store and real charge?

We wanted to create discounted subscriptions for our app customers, but I need to ensure that once the discount period is reached, the price of subsequent charges will be the full price without a discount and it will be updated in the AppInstallation object.

Could someone help me with this?

Thank you

3 Likes

Hey @Rosanna_Del_Vecchio, what you are seeing does seem like a limitation of the billing API test charges. Currently, test app charges don’t actually create a billing record making it so you can’t test recurring billing behaviour.

The expected behavior with live charges is outlined here: Offer subscription discounts

Thanks!

Yes, this seems to be a limitation of test charges, although ideally, the behaviour of test charges would be the same as real charges, since their purpose is to test before going into production to avoid errors.

1 Like