#petersmithdev

1 messages · Page 1 of 1 (latest)

hallow loomBOT
stoic jackal
#

Where do you see metadata?

#

On what object?

#

And can you share the event id where you're not getting it?

limber lance
#

@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.

stoic jackal
#

Can you share the event id of the webhook event where you're not getting it?

#

Starts with evt_

#

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)

limber lance
#

@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']])
]

]);

stoic jackal
#

Yeah so that metadata will only be on the checkout session object not the payment intent

limber lance
#

Solved thank you very much.

stoic jackal
#

No problem