#AlphaRyze
1 messages ยท Page 1 of 1 (latest)
๐ Hello! Are you trying to set the metadata of the PaymentLink or the underlying Subscription that will be created?
since i want to redirect with a button
from my website to the stripe payment subscription
and logging with an endpoint the events
i wanted to add in the metadata before the redirect to stripe occurs the userId from my website that is trying to pay
So there's no way to add metadata like that, but you can use client_reference_id for the same purpose
Yeah I'm not sure why it moved from the docs, but it should still work - try it out in test mode
i'm already in test mode
and currently i'm on the product page ( the one which requires subscription )
i tried adding the metadata field called userId and interact with it via the URL params but it didn't quite work
so how could i use the client_reference_id?
If you have a URL like this : https://buy.stripe.com/test_sacacacacsasca?client_reference_id=1234 then you should see client_reference_id: 1234 set on the compelted Checkout Session (see https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-client_reference_id)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
๐