I am trying to create a weekly subscription for a project I am working on to be used as a low-cost 'trial' of the service (to avoid attracting free-member tire-kickers and uninterested subscribers).
I have set up the week subscription plan with 1-day trial in Stripe. I have created a different thread for original problem of failed subscriptions with trialDays() set to 0 or NULL (further details & errors can be seen here: https://laracasts.com/discuss/channels/laravel/cashier-stripe-issue-with-trialday-and-empty-trial-period-zero-days, but no answers yet). Since that thread I have been trying to set different values for trialDays() and have seen charges go through with any value of 4 or higher.
Can anyone explain to me or point me in the direction of an explanation for why i can not use NULL,0,1,2, or 3 for the trialDays() value? For a weekly subscription, I would prefer not to have a trial period at all (this throws errors) but i think a 4 day trial period for a weekly subscription is excessive. Any thoughts on how to get a 0 or 1-day trial working in Cashier/Stripe?
I have tried omitting the ->trialDays(#) method from the new subscription as well, but still get the error.
This is the error i receive for any ->trialDays() using Null, 0, 1, 2, or 3:
Stripe\Exception\InvalidRequestException
Invalid timestamp: must be an integer Unix timestamp in the future.
and this is my subscription :
$newMember = $user->newSubscription('eurotripr', $stripePlanId)->trialDays($numTrialDays)->create($stripeToken, [
'email' => $request['membership-email'],
]);
Thanks for anyone that can provide assistance - this is really causing me to lose sanity :)