Environments
Sandbox and Production environments within an instance.
Each instance has two environments.
production
- The environment intended for use within your live application.sandbox
- The environment intended for use by developers to test transactions and within your test or quality assurance systems.
These two environments have separate infrastructures so resources such as buyers
and payment services are not shared between them. This also means that there are
different hostnames for sandbox
and production
APIs and dashboards.
The hostnames for the APIs are as follows:
Environment | Hostname |
---|---|
sandbox | api.sandbox.{gr4vy_id}.gr4vy.app |
production | api.{gr4vy_id}.gr4vy.app |
The Gr4vy ID is the unique identifier for your instance. Together with the environment (sandbox or production) it is used to connect to the right APIs.
You can test payment services, card rules, and other settings in the sandbox
environment, before migrating them to the production
environment.
Why environments?
Environments are an essential part of any development process. Your developer
might run your application on their development machine, and to try and test
the integration they will want to try and create some payments. To stop your
dashboard from being populated with lots of testing data it would be best
for the developer to create their test transactions against the sandbox
environment instead.
Similarly, you might want to run either automated or manual tests against the
API as part of QA and testing. To stop this from interfering with your live
environments you could set these tests to run against the sandbox
environment.
Environments and payment service APIs
The environment determines which payment service API environment that
should connect to. For example, Braintree transactions made in the
sandbox
environment is processed by the Braintree sandbox environment, while
transactions made in the production
environment are processed by the Braintree
live environment.
Other actions such as registering a digital wallet are also dependent on the
environment. Apple Pay digital wallets registered using the sandbox
environment will be registered with Apple Pay’s sandbox environment. This wallet
will not be recognized by Apple Pay’s live environment and thus cannot be used in
production
.
In short, the production
environment always connects to the live API of a
payment service, whereas the sandbox
environment always connects to its
sandbox API.
Was this page helpful?