#OneShot - payment intent + product

1 messages ยท Page 1 of 1 (latest)

desert nacelle
#

The PaymentIntent objects themselves don't have a concept of our price/product objects, so you can still use the prices that you created if you would like. You just have to add them up yourself

jagged shell
#

Hi, thanks for replying

#

I actually don't want to use subscriptions for now

#

But just charge for regular product

#

Is it possible to create the customer, attach the product and then start the payment flow?

desert nacelle
#

Can you tell me a bit more about what you mean by attaching the product to a customer and starting the payment flow?

jagged shell
jagged shell
glass crag
#

Hi ๐Ÿ‘‹ jumping in as my teammate needs to step away. Bear with me a moment while I get caught up.

jagged shell
#

Thanks

glass crag
#

There are a couple options:

As my teammate mentioned, you could create one-off invoices. This will be the approach that most closely matches the subscription flow that you were looking at.
https://stripe.com/docs/api/invoices/create
https://stripe.com/docs/invoicing

You can also create Payment Intents directly. When doing this you can retrieve the Product/Price from Stripe to determine the amount so you can still reference your existing objects.

You could also use Checkout Sessions if a hosted checkout experience fits your flow.
https://stripe.com/docs/checkout/quickstart

jagged shell
#

Creating the invoice, would i be able to go to my custom payment flow and have the user pay for it?

I'm currently using the react stripe library, using the payment element

glass crag
#

Yeah, the invoice would still generate a Payment Intent the way an invoice for a subscription would. Then you pass that intent through your flow.

jagged shell
#

Oh i think that should work

#

Thanks for that

#

I have another quick question

#

Regarding to taxes, is there a way to get the tax amount from stripe on my custom checkout?

glass crag
jagged shell
#

Thanks, i think the second one is the one i'm looking for