# Environments

NowInfinity provides two environments: **Test**, a sandbox for building and testing, and **Production**, holding live customer data.

Each environment has its own credentials and its own hosts. An integration configured for one will not work against the other.

## Endpoints

NowInfinity uses two hosts per environment — `auth.*` for authentication, `partnerapi.*` for the Partner API. Your OAuth client talks to the `auth.*` host to obtain a token; every API call afterwards goes to the `partnerapi.*` host.

### Production

| Purpose | Endpoint |
|  --- | --- |
| Authorisation | `https://auth.nowinfinity.com.au/connect/authorize` |
| Token | `https://auth.nowinfinity.com.au/connect/token` |
| Partner API | `https://partnerapi.nowinfinity.com.au/v1` |


### Test

| Purpose | Endpoint |
|  --- | --- |
| Authorisation | `https://auth.nowinfinity-test.com.au/connect/authorize` |
| Token | `https://auth.nowinfinity-test.com.au/connect/token` |
| Partner API | `https://partnerapi.nowinfinity-test.com.au/v1` |


## Discovery

Both authorisation servers publish an OpenID Connect discovery document. Rather than hard-coding endpoint URLs, you can read them at runtime:

```
https://auth.nowinfinity.com.au/.well-known/openid-configuration
https://auth.nowinfinity-test.com.au/.well-known/openid-configuration
```

The discovery document also gives you the `jwks_uri`, which is where you retrieve the public keys used to validate token signatures.

## Credentials

Credentials are issued per environment and do not carry across.

- **Test credentials** are issued when your access is approved, so you can begin building.
- **Production credentials** are issued separately, after your integration passes review.


Keep your Test and Production credentials clearly separated in your configuration. Pointing a production deployment at Test credentials — or the reverse — is one of the most common integration failures, and the error it produces (`invalid_client`) does not make the cause obvious.

## Moving to production

Promotion to production requires review and approval. See [Production readiness](/getting-started/production-readiness) for what is assessed.

When you switch, you need to change:

- Both hosts, from `-test` to production.
- Your client ID and client secret.
- Your registered redirect URI, if it differs between environments.
- Any account identifiers referenced in your configuration.


Account identifiers differ between Test and Production. Anything hard-coded during development — including account IDs used with the `X-NI-AccountID` header — will need to change before you go live. See [Accessing child accounts](/products/nowinfinity/resources/child-accounts).