#TheNakidNinja
1 messages · Page 1 of 1 (latest)
Can you share the Checkout Session ID (cs_xxx) or Payment Intent ID (pi_xxx) that you expect the metadata to appear in the Dashboard or response?
metadata set in payment_intent_data will only be shown in Payment Intent object. If you wish to have the Checkout Session metadata, it should also be set in metadata directly on the Checkout Session object: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata
Oh so im recieving an event object back from stripe I guess. Sorry im a bit of a newbie to web dev
pi_3NM2PzGmeMh39BFE1KnHZ9Zd
No worries! pi_3NM2PzGmeMh39BFE1KnHZ9Zd was created from Payment Intent API, not Checkout Session API: https://dashboard.stripe.com/test/logs/req_URKTRsiC1INQoF
Can you share the Checkout Session ID (cs_xxx), or Payment Intent ID (pi_xxx) created from Checkout Session?
Im using the cli, would that make a difference? like does the checkout session not get created
What is your CLI command? Different CLI command will create different payment flow
stripe trigger payment_intent.succeeded
I see! This command will trigger Payment Intent created directly from Payment Intent API instead of using Checkout Session API
In any case, it is not relevant to your metadata issue since no metadata is set in the command
To understand why metadata isn't shown in the Checkout Session, sharing the Checkout Session (cs_xxx) will be helpful to investigate
Wait okay, now its showing on the dashboard
That's great! Glad that the metadata is working
Could you point me in the right direction on how I can recieve that metadata now on my backend? I have a webhook setup but when I log it, I cant see metadata?
okay
nevermind
its there now
what
my brain is fried thanks for the help
You should be able to find the metadata in checkout.session.* and payment_intent.* events
No problem! Happy to help 😄
Yup! CLI with stripe trigger payment_intent.succeeded uses different payment flow, i.e. create Payment Intent directly instead of going through Checkout Session