#santosh2585

1 messages ยท Page 1 of 1 (latest)

pale ravenBOT
deft sand
#

I don't understand the question. Which parameters are you referencing?

ionic obsidian
#

Hello Ynnoj
I am creating invoice and adding the line items in the invoice. The products that I am adding in the invoice line items while fetching invoice from api the product id I am receiving is a different one ?

deft sand
#

Can you sahre an example

ionic obsidian
#

Yeah sure
Wait a min please don't close this thread

deft sand
#

Sure

ionic obsidian
#

Hello Ynnoj

deft sand
#

Hi!

ionic obsidian
#

This is the invoice I had generated invoice id : in_1NPfDUSF9C1b0htOFuSpBUiO

Here I had attached two products namely

  1. Test Product Three and its id :: prod_O7KHa1h1KWLHJO
  2. Test Product Four (id) : prod_O7KIP0SLkLHkLZ

and the invoice that I get after fetching this invoice id from the api is this

if You will see the product details under the line items the product id is different from the actual product id of the products.

So how this product id is getting different value ?

deft sand
#

That Invoice has 2 items:

  • price_1NPfDUSF9C1b0htOMfcIomO1 which belongs to prod_O7w7sXOOInYRnn
  • price_1NPfDUSF9C1b0htOqVdfE0Fm which belongs to prod_O7w7geBzDnMGLT
#

Your code that is creating this items is not using the parameters/values you think it is

ionic obsidian
#

So if product x have two prices then it will have two different product id ?

#

The thing is I am taking product id from /product api and when I am taking the same product in the invoice as line items I don't know maybe because of different price on the same product the product id is getting different ?

deft sand
ionic obsidian
#

But in my product that test product four or three I have 2-3 prices so if I will check in my product list
One product is having multiple prices ??
How is this happening ?

deft sand
#

I'm not sure what you're asking me

torn moon
#

๐Ÿ‘‹ taking over for my colleague. please try to elaborate your question

ionic obsidian
#

Hello Tarzan

ionic obsidian
#

See I have three products in the product list of stripe.
While creating invoice I am selecting the product to attach the invoice line items.

But since I am attaching a product from product list and it have a unique product id and once invoice is created and When I am fetching that invoice the product id that I am getting is of different product ?

#

Can you please tell me how the product id I am getting in the above invoice is different?

torn moon
#

which explains the relationship with products and prices

ionic obsidian
#

I got that a single product can have different prices,
Although see I have a product x and it has 3 prices, so when I will associate this product in invoice based on the price the product id will change ?

torn moon
#

no