#Dr. Strain-customer-custom-id
1 messages · Page 1 of 1 (latest)
No, there isn't a way to set a custom ID when you create a Stripe customer. Instead, you can store that ID in metadata on the Customer
Would that be an effective way to prevent stripe from creating a new customer every time I make a new subscription?
How are you creating subscriptions? Through Checkout or with the Subscriptions API?
Checkout
Gotcha - so to prevent creating a new customer you'll have to add logic on your end to check if they user already has a Customer tied to them, and if they do, you'd pass in the customer when you create the Checkout Session (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So, can I search for a metadata value? Or does my server have to store their customer id and their GUID in a map
Your server would have to store the customer ID <-> GUID relationship. We do have a search API (https://stripe.com/docs/search-api) that would allow you to search for metadata but it's currently in beta, and you'd have to sign up and apply for acces
k, Thank you for the help