#bhanu-help

1 messages · Page 1 of 1 (latest)

foggy grail
#

Hi there!

#

Snufkin had to step away

#

Can you summarize your issue/question here? I'd be happy to help

old sparrow
#

When I'm rendering the payment element I am passing 'intent' => $this->user->createSetupIntent() and then $intent->client_secret. I am not creating subscription and then get client secret

#

So what I need to do next?

#

Do I need to create subscription after call stripe.confirmPayment

foggy grail
#

Are you just collecting payment method details from a customer or are you trying to create a Subscription for them while they are in your flow?

old sparrow
#

I am trying to create subscription

#

and payment method also

#

because when subscription ends so it will be automatically renew as well

foggy grail
#

Gotcha and does your Subscription involve a trial?

old sparrow
#

no

#

There are only 3 subscriptions

#

1 month, 6 months, 12 months

foggy grail
#

Okay gotcha

#

So in this case you don't need to be creating a SetupIntent at all

old sparrow
#

customers can upgrade their subscription but can't downgrade

foggy grail
#

This will ensure that the PaymentMethod used to make the initial payment is saved to the Customer and will be used for renewal payments

#

After you create the Subscription the Subscription will return an Invoice which will have a PaymentIntent. You use that PaymentIntent's client secret to render Payment Element

old sparrow
#

And what about what I have already the client_secret that I get from the paymentIntent according to laravel?

#

$this->user->createSetupIntent()

#

This one

#

I am getting client_secret from this function $this->user->createSetupIntent()

#

So i don't need to create subscription first

#

Or i am doing wrong way

#

?

foggy grail
#

Sorry helping several folks at once

#

Yeah you want to create the Subscription itself

#

Not a SetupIntent

#

A SetupIntent would only be used if you weren't actually starting a Subscription until sometime in the future when the customer isn't in your flow

old sparrow
#

ok got it

#

And what about when I need to update customer card details if customer card has expired or something

foggy grail
#

There are a couple ways to handle that

old sparrow
#

Like?

foggy grail
#

Sorry 🙂

#

Jumping around between threads

#

So the first way is you can get Stripe to send emails for you

#

That page in your Dashboard allows you to set up these emails

#

Another way would be to integrate the Customer Portal.

old sparrow
#

I need to integrate the customer portal on our website

#

where customer can update their card details

#

Which API I need to call for this?

#

and js method

foggy grail
old sparrow
#

I already saw this document

#

I need to create on our portal

foggy grail
#

I'm not sure what you mean by that?