#GregFromFactomos-webhook-qs
1 messages · Page 1 of 1 (latest)
have you looked into using metadata to store that info on the payment intent itself?
https://stripe.com/docs/payments/payment-intents#storing-information-in-metadata
Not possible car the payment is from a Stripe Payment Link : https://checkout.stripe.com/pay/cs_test_a1SRI3IFzmNeKNCh9TBRc2VSaL825BblReKgpkRfF2exZgeyM7qc0B2ZXN#fidkdWxOYHwnPyd1blpxYHZxWjA0TkBBaGlDbUltamd3TlRAZn8yU3NLMWF%2FZzVTYVRJdmN1VmFJfWdxSj00X09jbW02MFxPT3FBQW81akFCX2JvQndjM1BATXUwfXU9N3FscXU8Uz12QDVkNTV1YzZodXxuNScpJ3VpbGtuQH11anZgYUxhJz8ncWB2cVpmSzc9RGpjZzRmclYwRlAydnYnKSd3YGNgd3dgdyc%2FJ21xcXV2PyoqZm1gZm5qcHErdnF3bHVgK2ZqaConeCUl
I get the billing address from the payment_intent.succeeded event, but I want to retrieve the details of the product
in this case : Replay Masterclass 29/12
and there are nothing in the event referring to the product
The only data I've found is the receipt url : https://pay.stripe.com/receipts/acct_1KEDmlFhLhobrKQE/ch_3KEDyKFhLhobrKQE1yT6G8dm/rcpt_Ku28zPHN5ufmYAq1k9Who9K2zHk3dP4
this web page has the string I need, but not very reliable to use this page and parse it
Hello! If you listen for checkout.session.completed events you can get the Checkout Session ID, then fetch that Checkout Session with line_items expanded to see what was purchased during that session: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
Awesome!
Just a last question, the checkout.session.completed event arrives before or after the payment_intent.succeeded ?
The order is not guaranteed. See here for more details: https://stripe.com/docs/webhooks/best-practices#event-ordering