#junior_dev

1 messages · Page 1 of 1 (latest)

tepid parrotBOT
frosty spear
#

👋 SetupIntents can't be used to charge the PaymentMethod a specific amount
You'd likely need a payment intent for that.

Can you provide more information about your usecase?

Saving the PaymentMethod details during payment might be a better flow for your usecase
https://stripe.com/docs/payments/save-during-payment?platform=web

vestal jewel
#

Regarding the PaymentIntent, it seems we have to use the Element component to retrieve the payment method. Is it possible to have a "Hosted" version like during the SetupIntent ?

frosty spear
#

Not sure I completely follow, are you looking at a specific step in the guide?

#

Are you referring to Stripe Checkout vs Custom flow?

vestal jewel
#

That's my use case
I want to bill a new (or existing customer) for a specified amount. And I want to save (if not already saved) the payment-method for futur usages.
I would like to retrieve a link (like for the setupIntent but with an amount) that redirect my user to the Hosted Checkout page

#

And thanks for your time

vale venture
#

👋

#

So you will need to know ahead of time whether the Customer is new or existing as these would be two different flows.

#

That would save the PaymentMethod for a future payment.

vestal jewel
#

Yeah that's what I though, but I still have 2 issues with these flow.

For the Checkout Session, I want to customize the page and only shows the Payment_method forms without the line_items on the sides. Can we customize it or is it not possible ? (I saw that you can add custom fields but not about removing them)

For the PaymentMethod, I don't want to use the custom Web Component to retrieve the Payment-Method, I would rather use the hosted checkout you guys made already 🙂

Anyways, thanks for your time and reactivity, really appreciate that

vale venture
#

You can't remove line_items in a Checkout Session, no.

#

With Checkout you can send them through a Checkout Session again and pass the Customer ID. As long as the PaymentMethod was properly set up before then it will pre-fill that info

vestal jewel
#

Regargind the Checkout session with a Customer ID specified. Does the customer can then Edit the prefilled card details ?
What I mean is, If the customer already exists, with let's say CARD N°1, then the CARD N°1 details will be prefilled, but does the customer can then replace it with CARD N°2 infos ?

vale venture
#

Pretty positive yes. Don't actually remember 100% off the top of my head but should be pretty easy to just run a quick test to find out.

vestal jewel
#

I see, thanks for the feedback and the help 🙂