#petersmithdev
1 messages · Page 1 of 1 (latest)
Where do you see metadata?
On what object?
And can you share the event id where you're not getting it?
@stoic jackal Thank you for your response.
I can see it in dashboard in payment (pi_3NdaJ3IMaFyJ44dk0Lo1GjST)
But is not sent in webhook.
Thank you very much.
Can you share the event id of the webhook event where you're not getting it?
Starts with evt_
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
There is no metadata on that payment intent
It says "No metadata"
So likely you have metadata set on some other object (not on the payemnt intent)
@stoic jackal I am sending metadata when creating session:
$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [[
'price_data' => [
'currency' => 'eur',
'product_data' => $product_data,
'unit_amount' => 2000
],
'quantity' => 1,
]],
'customer_email' => $USER_SESSION['email'],
'mode' => 'payment',
'success_url' => API_SET['base_url'] .'/success.html',
'cancel_url' => API_SET['base_url'] .'/cancel.html',
'metadata' => [
'user_id' => 654,
'workout_plan_id' => $WOPLAN_DATA['workout_plan_id'],
'time_units' => json_encode($WOPLAN_DATA['time_units'][$_POST['time_units_index']])
]
]);
Yeah so that metadata will only be on the checkout session object not the payment intent
If you want it on the payment intent, you'll need to set it here instead: 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.
Solved thank you very much.
No problem