#NotP_Dot
1 messages · Page 1 of 1 (latest)
Hi again!
No you can't do this all in one API call
You would need to search or list Customers first
Mostly you would just keep this info in your own Database
That is the typical way
ohhh okay, meaning keep track of all customers on Stripe via an external db and create a check with that?
Yeah that is the typical way
You are going to want an authentication system which would rely on an external database
So by the time they get to creating a Sub you should know if it is a new Customer or one that already exists
Is there a reason for not using the stripe list customer check method?
just trying to understand the best approach
ahh I am assuming the search will take some time, then creating the user, and then assigning the subscription will probably be too much
Well you don't really want to use Search, since Search data doesn't propagate instantly so you could end up with two Customers for same email (though that would be a pretty big edge case)
For this reason we don't recommend using Search for read-then-write (see: https://stripe.com/docs/api/customers/search)
But yeah this is all up to you really
I would just recommend storing this in your own database and doing an authentication when your customer visits your site
sound good, I'll take your recommendation and set up a quick sql db
what did you mean by create a authentication earlier?
Authenticate with stripe? or just a simple authentication for the application to read and write to the db for logged in users ready to purchase?
An authentication process to know which customer is on your site so you can display their data to them and create Subs for the correct customer
So yes, so you read/write for the correct user
No need to apologize!