#stickyjams_OGC
1 messages · Page 1 of 1 (latest)
previously i was doing a payment intent but there was a reason because it was a payment up front
now i want to do a 7 day free trial (collecting card details up front) to bill after the trial period
Hi, what have you tried so far? You can achieve this here: https://stripe.com/docs/billing/quickstart and offer the 7 day free
trial_period_days: 7
Once the free trials are up, the customer can be charged.
before i was using payment methods to set up the subscription with Laravel Cashier
but I already had the payment method because it was starting with a payment
when i was looking in the api i saw things about setting up subscriptions with no card
but I'd like to set it up with a card, and doing payment intent of 0 probably makes no sense?
Yes, setting up subscriptions with no card is an option. Can you share what integration document you're using? I see that you're using Laravel Cashier, have you reached out to them?
laravel cashier simply allowed me to easily make subscriptions using the payment method on file
I was using Stripe payment intents with Stripe's PHP package to get the payment method in the first place
With this, when you offer a free trial with the current flow is teh subscription not honoring the free trial?
I guess maybe I am looking to collect payment details?
sorry I am just confused as to what it is exactly that I am supposed to be doing to collect the payment details on the free trial
No problem, let's back up. Do you plan on using Laravel Cashier? Or are you seeking to build your own integration?
yes I was intending on using Laravel Cashier to create the subscription
but in order to do so, I need to send it the payment method from Stripe
which I was getting from the payload for payment_intent.succeeded
now, I'd like to make it so they pay nothing, and just do a free trial, but collect their payment details
I guess what I am looking for is the Setup Intents API
Since you're using Laravel Cashier here I'd recommend reaching out to them and asking this question as they own this, https://laravel.com/docs/9.x/billing
We are happy to help with any direct Stripe integration questions
yes
well it seems I can get the payment method using Setup Intents
which is what I need for Cashier
found that on that page, I was looking through Stripe API but not finding what I was looking for
was just confused as to how to get the payment details I suppose, anyhow, thanks
Yes, you can set this up on your end to Collect the Payment Methods from your customers via teh Setup Intent.
yes so I guess what I would do is do a Setup Intent, then use that payment method to setup a subscription with a 7 day trial
once Stripe confirms that the card details are good
Yes, via the Setup Intent, you'd collect the customers payment method and set off_session: true here, https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method:~:text=off-session payment%3A-,Set,causes the PaymentIntent to throw an error if authentication is required.,-Set the value so you can indicate that the customer is not in your checkout flow during this payment attempt for those subscriptions.
Then, from this, you can share the Payment Method with Laravel Cashier to charge the customer. I'm really curious why they would not allo payment method collection with the 7 day free trial subscriptions. This is our typical flow usually.
I'm not sure, I guess because they are just handling the PHP side and letting you get the other stuff with Javascript with Stripe?
I've been a bit lost trying to set this stuff up not so much in terms of the difficulty of implementation but more in terms of understanding what exactly needs to be done
usually Laravel is very clear about things as well, I would say, but I've spent probably way more time than was needed trying to set this up lol
I'm sorry to hear this. That can be tough -- as for next steps, if they do not handle payment method collection, then yes - the above Setup Intents is what you'd use.