#RHSDev - Checkout

1 messages · Page 1 of 1 (latest)

idle helm
#

Hello! What do you mean by "continue payment" exactly?

thorn herald
#

I want to buy products from stripe backend and for that I am using node server

#

const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price: "price_1LXVDCGhV9qlpej3DU5bGSXH",
adjustable_quantity: {
enabled: true,
minimum: 1,
maximum: 10
},
quantity: quantity,
},
],
mode: 'payment',
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
});

#

Do I have to do this or I can handle product payment inside the app directly?

idle helm
#

You can do it in your app directly and not use Checkout if you wish.

thorn herald
#

Can I use this to buy products in multiple quantity?

#

I want to link products with this payment, I'm sorry if I sound too naive.

idle helm
#

When you say "products" do you mean Stripe Products specifically, or just the generic concept of products?

thorn herald
#

Stripe products

#

price_1LXVDCGhV9qlpej3DU5bGSXH

#

with the id

idle helm
#

I recommend you use Checkout for that, but it sounds like you don't want to use Checkout for some reason? Can you provide more details about your ultimate goal?

thorn herald
#

My ultimate goal is to buy this product with checkout session within the app

#

Without going to the webpage

idle helm
#

Checkout is a Stripe-hosted payment page on the web, so it sounds like Checkout doesn't fit your requirements.

#

Just to confirm, you don't want to open Checkout in a web view within your app, correct?

thorn herald
#

I tried getting paymentIntent from checkout session it gave me error "You can not perform this action on paymentIntents created by checkout"

thorn herald
idle helm
#

Yeah, so you can't use Checkout. Really your only viable option is to create a one-off Invoice with the Products/Prices on it and then use the React Native SDK to confirm the Invoice's Payment Intent.

thorn herald
#

I'm trying to do it for more than 7 hours right now

idle helm
thorn herald
#

Also is it possible to get transaction id after paymentIntent success?

idle helm
#

Which transaction ID?

thorn herald
#

1 Minute

idle helm
#

It is not transaction-specific. A single Payment Method, if attached to a Customer, can be used for multiple payments.

thorn herald
#

Okay

#

Thank you very much for your help