#NESH
1 messages · Page 1 of 1 (latest)
Hi there!
The recommended approach is to create the configuration once, and then reuse it multiple times.
But creating it every time should work, it will just be a little slower and involve more API requests.
when you say once, do you mean, I create it once in stripe settings and retrieve it's ID somehow to use it everytime in the code.
Or to create the config "once" every time on the app startup, store the ID in db, and use it in that app session only
That's completely up to you and your system. If the configuration rarely changes, create it once, store its ID on your own database, and keep reusing it.
If it changes often or you don't want to do this, you can re-create it more often.
The only limitation is to stay below Stripe rate limit: https://stripe.com/docs/rate-limits
Otherwise you can create as many portal configuration as you need/want.
are those conifurations stored somewhere in my stripe account if I'm gonna create new configuration each time a customer clicks on a button
Yes, when you create a configuration you get back and ID. And this ID can be reused as many times as you want.
And you can retrive existing configurations with https://stripe.com/docs/api/terminal/configuration/retrieve
I guess each customer should have it's own configuration ? If I would use only one config ID for all customers and update it all the time depending on the customer culture, I guess it could happen two customer want to modify the same stripe config ID at the same time which could break something ?
I guess each customer should have it's own configuration ?
Yes exactly, sorry if I wasn't clear. And then for each customer you reused their own configurations.