#Alpha-kr

1 messages · Page 1 of 1 (latest)

bronze quiverBOT
glacial axle
#

Hello, you can pass that identifier in as metadata, though you may have to retrieve the checkout session in your webhook event handler code to be able to see it again. I forget if metadata is included with the initial event data https://stripe.com/docs/api/metadata

lavish wadi
#

In sumary I have something like a global product that my users can buy but this global product is related with another entity, that is I need away to indentify the related entity and I dont want to create the same product with the same price for each entity

#

did I make myself clear?

#

it's like a relation one to many

glacial axle
#

I think that makes sense. So yes, in this case metadata would probably be a great way to indicate which entity the product is for here

lavish wadi
#

yes but there are many entities

#

related to only one product in stripe

#

I mean for example I have 3 entities but theses for stripe is one product because is the same image, price etc

glacial axle
#

Gotcha, I more meant setting metadata on the checkout session or payment intent, not on the product itself

lavish wadi
#

yes

#

but it has to be dinamic

#

for example I buy product A but this product is related with entity A entity B and entity C

#

in the checkout Im paying product A but I need to know what entity is buying too

glacial axle
#

Do you know what entity is involved when you create the Checkout Session?

lavish wadi
#

yes

#

but how can I know when the payment is completed?

glacial axle