Skip to main content

Environments

Gr4vy ships with two environments:

  • production - The environment intended for use within your live application.
  • sandbox - The environment intended for use by developers to test transactions and for 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:

API EnvironmentHostname
sandboxapi.sandbox.{gr4vy_id}.gr4vy.app
productionapi.{gr4vy_id}.gr4vy.app

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 Gr4vy integration they will want to try and create some payments. To stop your Gr4vy dashboard from being populated with lots of dummy 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.

Gr4vy environments and payment service APIs

The Gr4vy environment determines which payment service API environment that Gr4vy should connect to. For example, Braintree transactions made in the sandbox environment are processed by Braintree's sandbox environment, while transactions made in the production environment are processed by Braintree's live environment.

Other actions such as registering a digital wallet are also dependent on the Gr4vy environment. Apple Pay digital wallets registered using the sandbox environment will be registered with Apple Pay's sandbox environment. This wallet remains unregistered in 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.