#vanguard_webhooks
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/1252835294311481377
đ Have more to share? Add details, code, screenshots, videos, etc. below.
I am afraid you can't. The PaymentIntent object only contain the the amount
Is there any other way to distinguish the products being sold?
I have a Donation product and a Subscription product.
I would like to distinguish to know which email to send to the customer
Yes but how did you create the PaymentIntent? When you create it you only specify the amount parameter, correct?
You can inlcude your product details on metadata for example
it will come back in webhook event
I didn't create any payment.intent. I receive this json package when a customer completes a purchase
I added metadata but I couldn't find it in the json received
What do you mean? You don't create a PaymentIntent but you received payment_intent.succeeded webhook event?
Do I have to use another one then? invoice payment succeed?
yes, i receive payment_intent.succeeded webhook when customer buy a product
"id": "evt_3PTFLVGtbwU1NL0g1KLilJZ7",
yes, i create link payment
Oh is that PaymentLink? How do you create that PaymentLink?
Okie so please listen to checkout.session.completed event instead. Inside there you will find a payment_link field
Use Retrieve PaymentLink API and look at its line_items.data.price.product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in dashboard stripe
Yes, please refer my answer above
i will add this in my webhook
Maybe it's better to use:
checkout.session.async_payment_succeeded
to know when the payment was actually made successfully.
as payment may be refused later if I only use session completed.
the metadata started to appear, is this metadata from the product or the payment link?
to confirm
It's from the Payment Link I think