How to get trial days remaining
I'd like to get the customers remaining trial days and/or if the trial period has expired. Here is a var_dump of my customer:
array(25) { ["id"]=> string(36) "89f511e4-f818-11e1-a22b-40403c39f8d9" ["code"]=> string(6) "MEDIUM" ["name"]=> string(6) "Medium" ["displayName"]=> string(24) "Medium • 10.00 / Month" ["description"]=> string(0) "" ["isActive"]=> string(1) "1" ["isFree"]=> string(1) "0" ["paymentMethodIsRequired"]=> string(1) "0" ["trialDays"]=> string(1) "0" ["initialBillCount"]=> string(2) "30" ["initialBillCountUnit"]=> string(4) "days" ["initialInvoiceBillingDatetime"]=> string(25) "2013-01-03T09:59:01+00:00" ["billingFrequency"]=> string(7) "monthly" ["billingFrequencyPer"]=> string(5) "month" ["billingFrequencyUnit"]=> string(6) "months" ["billingFrequencyQuantity"]=> string(1) "1" ["nextInvoiceBillingDatetime"]=> string(25) "2013-02-03T09:59:01+00:00" ["setupChargeCode"]=> string(0) "" ["setupChargeAmount"]=> string(4) "0.00" ["recurringChargeCode"]=> string(14) "PLUS_RECURRING" ["recurringChargeAmount"]=> string(5) "10.00" ["onChangeInitialBillHandler"]=> string(4) "next" ["setupChargeBillHandler"]=> string(3) "now" ["onChangeSetupChargeBillHandler"]=> string(2) "no" ["createdDatetime"]=> string(25) "2012-09-06T11:46:47+00:00" }
You can see trialDays
is 0. If that is the amount
of days they have had of their trial that should be 8 days.
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 04 Dec, 2012 09:57 PM
Hi Billy -- That var_dump is just the plan information. The
trialDays
node is deprecated and is not relevant at all to new accounts. You want to look at the current pending invoice on the subscription (not in that var_dump). ThebillingDatetime
is the end of the trial when that invoiceisInitial
.Dean closed this discussion on 23 Jan, 2013 05:37 PM.