#Whitechan
1 messages · Page 1 of 1 (latest)
The endpoints are payment_intent.succeeded
You'd use the metadata parameter when creating your Payment Intent: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The integration method is Payment on the official website
My question is how the $paymentIntent parameter corresponds to the order information of our own site?
Can you share a pi_xxx ID with me
$paymentIntent I can get the payment completion parameters, but no information about the associated order? Is this because the webhook is not correct?
I need to know how you're integrating
client_secret = pi_3LYE5yIQMzVYNvNs0c6HK6QW_secret_PH4e3mV4SZ139AOs6IakbjoAg
data.object.id = pi_3LYE5yIQMzVYNvNs0c6HK6QW
So what is the 'order' in this context? Some third-party data from your system?
I can see you're creating a Checkout Session here: https://dashboard.stripe.com/logs/req_QmacgkZKGQhLJk
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
But what data is is you want available in your webhook?
I would like to be able to get the custom order number created by my own website in the webhook.
Ok, so you'll need to pass an additional parameter when creating your Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Any [key]: value pairings passed there will be available in your payment_intent.succeeded events
😭 I had two parameters passed when I created CHECKOUT, but the parameters I passed were not received in the payment_intent.succeeded event I received.
Which parameters? I'm looking at this request: https://dashboard.stripe.com/logs/req_QmacgkZKGQhLJk
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
In the picture, the red box contains two custom parameters that I submitted but did not receive in the notification
Yep, those fields are not carried across to the underlying Payment Intent object. You'll need a different event: checkout.session.completed
TKS
The line_items field won't be included by default in the event payload, so you'll need to retrieve them separately: https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Your explanation helped me a lot and I should have guessed the cause of my problem. Thank you for your support and good luck with your work!😆