#Steven Gauerke

1 messages · Page 1 of 1 (latest)

wary timberBOT
viral trout
unkempt bobcat
#

thats what I'm doing but it auto started on my customer ID because I had a payment method

#

$args = array(
'customer' => $customer_id,
'items' => [[
'price' => $price_id,
]],
'payment_behavior' => 'default_incomplete',
'payment_settings' => ['save_default_payment_method' => 'on_subscription'],
'expand' => ['latest_invoice.payment_intent'],
'trial_period_days' => $trial_end
);

#

I dont want to set collection_method to send_invoice....thats not what I want.

#

When creating a subscription with a trial period, no payment method is required for the customer. An immediate invoice is still created, but for $0.

#

However, when I checked that subscription, It showed my default payment method already assigned to it

viral trout
#

Oh, you have a trial period, yeah. You can't have an incomplete Subscription with a trial. If you create the Subscription without a trial period it should work fine.

#

Stepping back a bit, what kind of flow are you trying to build?

unkempt bobcat
#

ok so i have some customers already in stripe with a subscription thats free. so theres no PM on there. Some customers DO have a PM. And then some customers dont even exist yet. So without having to create 3 different flows, I was following the Build s subscriptions integration without the checkout session. It says create customer first....well if they exist already, then I have the customer ID. Next is to create the subscription. I also added the trial days. Now here's what DOES work.....if the customer already in stripe is just on the standard subscription (free on and do NOT have a PM), then the flow works fine. Its just those that have a default PM already.

#

I guess I can take that PM ID and look it up and tell the customer that's what we are going to charge

#

But then they can't create a new PM if they wanted. Can I just remove the PM from that subscription if there is one and always ask to create a new one?

viral trout
#

To clarify, in the flow for Customers without a Payment Method, what do you do with the incomplete Subscriptions?

unkempt bobcat
#

for those without, then I use stripe elements to get a payment intent then I update that subscription with the new payment intent

#

or should I just create a default PM upfront as a Payment Intent and pass it when I Create the subscription?

viral trout
#

Do all of these Subscriptions have a trial period?

unkempt bobcat
#

no just the one I'm trying to create

#

So "technically" only people on the standard (free) subscription or new customers would get this

#

But its possible someone had a paid subscription in the past

#

I saw this

#

default_payment_method
optional
ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer’s invoice_settings.default_payment_method or default_source.

#

So I need to set a default payment method.

viral trout
#

Yeah, I think the part I'm trying to wrap my head around is why you want these all to be incomplete. If the Subscription doesn't require payment why don't you want it to move to active immediately?

unkempt bobcat
#

Primarily because I dont want to have to lookup an existing customers methods and let them pick from it. I'd rather just have EVERYONE enter card details

#

But the example in your docs has me create the subscription BEFORE creating the stripe elements to collect card info

viral trout
#

Having everyone enter their payment info even if they already have it on file with you will significantly impact your conversion rate. Are you sure that's the approach you want to take?

unkempt bobcat
#

well only about 1% will already have payment info on file. So I could care less

#

They are getting 30 days free. They can suck it up and enter card info again if they want 30 days free

viral trout
#

I see. So for the Customers who have payment info already on file, is that payment info being used for anything?