#Marques
1 messages · Page 1 of 1 (latest)
Hi there
Hmm so looks like you are trying to create a Checkout Session here, correct?
yes
I want to make sure that the clients goign into the checkout have a specific clientID
Yep so you can pass a client_reference_id as a parameter when creating the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-client_reference_id
This is just your own string that you would associate to your database
I'm doing that because I want to make sure that if I request all subscriptions from Stripe API, I can distinguish which user from my DB is using each
(In case I couldn't add by webhook failures)
I used that one for the checkout but This is not brought into subscription object
for example here
Ah yeah that would only be on the Checkout Session. If you want to set something on the Subscription itself then you can use subscription_data.metadata: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata
Your Mode should be subscription if you are attempting to create Subscriptions.
That seems to be what you indicated you wanted to do correct?
thats the thing
Then there is a separate SubscriptionData hash
I either use subscriptions or subsctions.metadata
Not sure I understand what you mean? The Mode is subscription. Then you add another parameter for SubscriptionData.metadata
perfect !! thanks !!