#sticks_product-payment-intent
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1261329334560358525
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi there ๐ can you tell me more about how you've structured your Stripe integration?
Charges don't reference Product objects, so I need to understand how you're using those Products in order to give guidance on how to look for that association.
I need to see if they bought that product BEFORE creating a verification session.
How are you letting your customers purchase this product though? Are you using Payment Links, Checkout Sessions, Invoices, directly creating Payment Intents that aren't associated with the Product, or possibly something else?
Using stripe elements with a PI.
at least thats how I plan to
is there maybe a better way?
Payment Intents don't contain an association to Product objects. So you would need to add custom logic to track that association. For instance, you could use metadata on the Payment Intent object you create to store the ID of the Product that you want the payment to be associated with.
https://docs.stripe.com/metadata
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-metadata
ok sounds good. Thank you!
Any time!