#Pilotman14
1 messages ยท Page 1 of 1 (latest)
Hey apologies for the delay in reply. Where exactly are you looking for this metadata? When setting it like you do in that call, the metadata will only be on the Checkout Session unless you copy it elsewhere. Metadata isn't copied automatically between objects
One thing that may help is that there is a subscription_data argument on that call. You can use that to set metadata on the subscription itself https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_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.
Okay thats for that. Its because in my php version I use this:
$checkout_session = Session::create($arrayStandard);
which has the same object as in the Node.js versions and for the php side it populates the customer meta data with the userUUID after successful purchase (I have not additional processing to do this i think)
Hi there ๐ I'm jumping in as my teammate needs to step away soon.
Can you share the ID of a Customer and Checkout Session that you used during testing where you saw this behavior?
Hello toby,
Sure this was the session id:
cs_live_a13Lem7xwGEICQdSCgzj85LRyI1qDpZJ1mR11wOWQfziYNtRSK5G50vdPg
cus_N4WSzicljyM3jK
Thank you, and do you have an example where you did see the metadata get populated on the Customer that I can compare this to?
Sure I will make one now
cs_live_a1GFkRj9MHZZPdW56qsL3gFYhmRiydFXB00G2O46BOZj9BYCdt4mBP9dEb
cus_MxkRCo7lpPDpas
For that Customer, I see that a separate request was made to update their metadata:
https://dashboard.stripe.com/logs/req_02yRs72s4MhcH9
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Okay, I found the source, very hidden away which seems to update the customer after the payment is made.
So my solutions seems to be to create a customer before the session creation I think
That sounds like a good approach.