#rohrig-environments

1 messages · Page 1 of 1 (latest)

fallen shell
#

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

lusty bay
#

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.

fallen shell
#

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.

lusty bay
#

locally, meaning "on my local computer" via the api

fallen shell
#

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.

lusty bay
#

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.