FROM CACHE - en_header

Billing api - recurring 30 days + 14 days trial - currentPeriodEnd - never changes for next period

kalitas
Tourist
6 0 1

Hi,

Im using graphQL and create a subscriptions for 30 days recurring and 14 days trials:

this is shopify response:

 

            "trialDays": 14,
            "createdAt": "2020-06-24T13:59:33Z",
            "currentPeriodEnd": "2020-08-07T13:59:43Z",
            "id": "gid://shopify/AppSubscription/****",
            "name": "Unlimited Monthly",
            "status": "ACTIVE",
            "test": false,
            "lineItems": [
                {
                    "plan": {
                        "pricingDetails": {
                            "interval": "EVERY_30_DAYS",
                            "price": {
                                "amount": "19.0",
                                "currencyCode": "USD"
                            }
                        }
                    }
                }
            ]

 

 

as you can see the currentPeriodEnd is only for the end of the 14 trails days.

however today is 20 days later and still the currentPeriodEnd is never changed...

there are no other subscription for this store.. so how do i know what is the real currentPeriodEnd ?

what is the best way to know if the subscription is valid? (only the status)

Reply 1 (1)
wasifhossain
Shopify Partner
1 0 0

imho, currentPeriodEnd is correct in the above response:

 

currentPeriodEnd = createdAt (2020-06-24) + 14 days trial + 30 days interval = 2020-08-07

 

Note, It'd have been 2020-07-08 if Shopify applied trial days only; not 2020-08-07

 

So during the time of your reporting (2020-07-14), there were still time left before the field might had been updated.

 

Best,

Wasif