#rohrig-environments
1 messages · Page 1 of 1 (latest)
Hi! On a given Stripe account, you have one test mode and one live mode.
If you need more than that, you should create other Stripe accounts.
However I'm not sure I understand what you mean by:
when I create test subscriptions locally, and on an int server, inevitably subscriptions made on the "other" environment are not present
Thanks
Subscription ids are saved in the database. When webhooks come in a search is made for the subscription id. If the subscription was created locally, the id won't be present on the int server. I hope that clears things up.
I don't understand that part: "the subscription was created locally". The subscription should be created on your Stripe account, either in test mode or live mode.
locally, meaning "on my local computer" via the api
If you run your code on your computer, you are still talking to the Stripe API. So the subscription will be created on your Stripe account, probably in test mode.
I'm aware of that. But once the subscription is made in stripe, the Stripe API returns a subscription Id, which i save to our database. When webhook requests come in (with said subscription Id attached, that subscription id is searched for in the database.