#rc9999999 - Checkout Metadata
1 messages · Page 1 of 1 (latest)
Hello! Not sure what you mean by "User Id is logged with session but not posted to Stripe with customer info". Do you mean the metadata from the Checkout Session doesn't show up on the Customer object Checkout creates?
No it doesn't, my customer's metadata is empty on stripe.
I am authenticating the user before they access stripe checkout. The session logs it but it doesn't send it to the metadata.
Ultimately, I just want to pass the user id to stripe so I can use it in my webhooks.
Metadata isn't shared between objects. You're setting metadata on the Checkout Session, not the Customer object. If you want that metadata on the Customer you need to add it to the Customer yourself.
If you retrieve the Checkout Session from the API you should see the metadata there: https://stripe.com/docs/api/checkout/sessions/retrieve
You can then update the associated Customer with the same metadata: https://stripe.com/docs/api/customers/update
This makes sense.