#RHSDev-InvoiceItem

1 messages · Page 1 of 1 (latest)

empty thunder
#

What do you mean by using Invoice Item in PaymentIntent? InvoiceItem is for creating an Invoice

peak mango
#

I'm trying to buy products prom stripe

#

I want to buy products bud don't want to open webpage for it

empty thunder
#

Can you elaborate on your business use case? Why do you buy products "from Stripe"?

peak mango
#

const price = await stripe.prices.retrieve("price_1LXVDCGhV9qlpej3DU5bGSXH");
const customer = await stripe.customers.create({
name: "Jenny Rosen",
email: "jenny.rosen@example.com",
description: "My first customer",
});

const invoiceItem = await stripe.invoiceItems.create({
customer: customer.id,
price: price.id,
quantity: quantity,
});

#

This is how I create invoice in node

#

How can I link the invoice with a payment?

empty thunder
#

That's only creating an Invoice Item You still need to create an Invoice

#

When you have an Invoice and finalized it, you will have the PaymentIntent inside

peak mango
#

And I can use that to make payment?

empty thunder
#

Yes

#

confirm it client-side

peak mango
#

When I try to use that invoice item and finalize it it givems me error "StripeInvalidRequestError: No such invoice: 'ii_1LYNaWGhV9qlpej34amoKWWG'"

empty thunder
#

Invoice Item != Invoice

peak mango
empty thunder
#

You only created an Invoice Item. You haven't created an Invoice

peak mango
#

Okay

empty thunder
#

there is a step to create an Invoice

peak mango
#

Got it

#

I created invoice

empty thunder
#

And did you finalize it successfully?

peak mango
#

It is working

#

Thank you very much

#

Can this payment show here?

empty thunder
#

What page is that? Customer or Invoice?

peak mango
#

Payments > Payment Links

empty thunder
#

I don't follow. How is Payment Links related to your Invoice Item?

#

For Payment Links yes, latest payments would show there if that's what you are asking

peak mango
#

Yes, I have made a payment through paymentIntent of invoice

#

They are visible here

#

But not here

#

Is there any delay?

empty thunder
#

Well because Invoice is not really related to Payment Links. Why would you expect it shows up in Payment Link?

#

Payment Link is a different product, when you provide the customer just an URL and they pay on that Stripe hosted page

peak mango
#

Client want's it to show up there

#

So it's not possible without opening that page right?

empty thunder
#

opening the Stripe hosted page? Yes