What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Calculation of nextBillingDate on Subscription Contract ignores billing anchor

Calculation of nextBillingDate on Subscription Contract ignores billing anchor

smathur
Tourist
8 0 3

After trying multiple times, it appears to me that nextBillingDate on Subscriptions Contract is always calculated as per the logic below:

Checkout Date (in UTC DateTime) + billing intervalCount * billing interval - 5hrs

In this regards, can somebody please answer the following questions:

1) Calculation of nextBillingDate completely ignores any anchor specified in the billing/delivery policy. For example, consider a subscription plan with monthly billing/delivery, anchor specified as 15th day of month and cutoff as 0 days. If the plan is purchased on 2nd February, the nextBillingDate populated on Subscription Contract is 2nd March instead of 15th March. Isn't this behavior incorrect? Please explain.

2) What should happen when the nextBillingDate is reached? Does Shopify triggers anything? Is the Subscription App required to track this date and trigger a Billing Attempt when the nextBillingDate of a Subscription Contract is reached?

3) Once a Billing Attempt is triggered on the nextBillingDate of a Subscription Contract, who is responsible for calculating and updating the nextBillingDate to the next billing cycle?

Replies 3 (3)

jlalande
Shopify Staff (Retired)
19 4 13

Hello @smathur 👋,

1) Calculation of nextBillingDate completely ignores any anchor specified in the billing/delivery policy.
For example, consider a subscription plan with monthly billing/delivery, anchor specified as 15th day of month and cutoff as 0 days.
If the plan is purchased on 2nd February, the nextBillingDate populated on Subscription Contract is 2nd March instead of 15th March.
Isn't this behavior incorrect? Please explain.

We are currently investigating this, we will get back to you with an answer.

2) What should happen when the nextBillingDate is reached? Does Shopify triggers anything? Is the Subscription App required to track this date and trigger a Billing Attempt when the nextBillingDate of a Subscription Contract is reached?

Yes, the app is responsible to track, schedule, and automate billing attempts on a subscription contract when the date is reached.

3) Once a Billing Attempt is triggered on the nextBillingDate of a Subscription Contract, who is responsible for calculating and updating the nextBillingDate to the next billing cycle?

 The app has the responsibility to update the nextBillingDate on the contract. The first nextBillingDate is set by Shopify, but the subsequent ones are meant to be calculated and updated by the app.

To learn more visit the Shopify Help Center or the Community Blog.

d_tehrani
Shopify Partner
56 1 13

I'm encountering the same issue.

When I purchase a subscription with interval = 1 DAY, the nextBillingDate set by Shopify does not reflect the 24h interval.

Purchase subscriptpion on 2021-03-30T08:32:00 UTC, and nextBillnigDate is set to 2021-03-31T04:00:00 UTC.

Appreciate it if someone could tell me why this happens and how to deal with it.

HA-Divyank
Visitor
1 0 0

Is there any update for point 1, I'm facing the same issue, cut-off or any anchors are not being calculated for nextBillingDate