How do I determine the date the user will be charged on next during a trial period, as no charged through date is returned in the creation or retrieve subscription api?
Initially I was just doing this manually based on the cadence, but when I checked my dashboard my date and the date shown on the subscription, were a day apart so I’m hoping there’s a way to parse this information so its always in sync.
The Subscriptions API will charge the customer according to the plans cadence. The charge through date is the date that the subscription will end and if not set then the subscription will continue indefinitely till canceled. If you want to calculate the trial period of a subscription you’ll need to call RetrieveCatalogObject with the plan_id. Once you have the plan and the subscription you can determine the date the customer will be charged based on the start_date and the trials cadence and periods.
Maybe the API should provide a trial_end_date field or something so that this isn’t an issue or hard/impossible to calculate accurately. Its not like its not available since its visible in the dashboard.