Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe: Allow subscription without payment method

We're using stripe as a payment gateway.

I'm trying to subscribe a customer to a plan. This plan has a 30 days trial period. So, we're delaying customer adds a source (payment method) details on its profile.

Nevertheless, when I'm trying to subscribe it to a plan, stripe is getting me this message:

This customer has no attached payment source.

Is there any way to allow customer has no payment sources along trial period?

like image 390
Jordi Avatar asked Feb 02 '17 09:02

Jordi


1 Answers

I ran into the same problem as @Jordi. My plan had a default trial period, but I was still getting the error mentioned in the question.

Instead of setting trial_end as @Ywain suggests, I set trial_from_plan to true when creating the subscription. That way I didn't have to set and/or calculate the length of the trial in my API call.

like image 57
AAAton Avatar answered Sep 19 '22 05:09

AAAton