# Test mode

> NorthechPay runs on Moov test mode only. Test cards, test bank details, timing and why passing tests is not production approval.

> **Test mode:** Everything in this build runs against Moov's test environment. No real money moves. Production is not enabled, and there is no setting or key that turns it on.

## What test mode means

- Every API key is a test key. `GET /me` returns `environment: "test"`.
- Every webhook envelope has `livemode: false`.
- The merchant object has `moov.mode` (the Moov account mode) and a `test_mode_notice`.
- NorthechPay checks that its Moov account reports sandbox mode before any change at Moov. If it does not, the request fails with `503 provider_environment_blocked` and nothing is sent.
- Capabilities that Moov enables in test mode are enabled automatically. They do not mean Moov has underwritten or approved the business.

## Passing tests is not production approval

A working test integration proves your code handles the flow. It does not approve you, the merchant or NorthechPay for live payments. Production would need, at least:

- Moov approval of the platform and of each merchant (identity and business checks, underwriting and signed agreements).
- Production Moov credentials and webhooks set up by the platform operator.
- Written approval from the NorthechPay owner.

None of this is available in this build. Do not tell buyers or merchants that live payments are ready.

## Test cards

Use only Moov's published test cards. NorthechPay's own test runs used these:

| Scenario              | Card number           | Expiry          | CVV | ZIP   |
| --------------------- | --------------------- | --------------- | --- | ----- |
| Approved (Visa)       | `4111 1111 1111 1111` | Any future date | 111 | 11111 |
| Approved (Mastercard) | `5555 5555 5555 4444` | Any future date | 111 | 11111 |
| Declined (Visa)       | `4000 0200 0000 0000` | Any future date | 111 | 11111 |

Moov's [test mode page](https://docs.moov.io/guides/get-started/api-authentication/test-mode/) lists the full set, including values that trigger disputes and other failures. Check it before you write tests for those cases.

> **Warning:** Never enter a real card number, real bank account or real personal data in test mode.

## Test bank accounts

Bank accounts are linked by a signed-in owner or admin in the dashboard, not with API keys. In test mode:

- Use routing number `322271627` and any account number of 4 to 17 digits.
- Verify micro-deposits with the amounts `[0, 0]`.

## Timing in test mode

Test mode keeps the real order of events. Payments do not complete the instant the buyer clicks "Pay".

| What happens                    | What you see                                                                   |
| ------------------------------- | ------------------------------------------------------------------------------ |
| Buyer submits a card            | `processing`, then `authorized` when the card is approved                      |
| Card funds settle to the wallet | `paid` once Moov reports the transfer `completed`, often minutes later         |
| Card is declined                | `failed`. The buyer can try again on the same page while it is open            |
| ACH payout                      | `pending` for a while, then `completed`. ACH follows its schedule, only faster |

Do not hard-code waits. React to webhooks and re-read the resource.

## Fees

NorthechPay does not provide fee or revenue reports. Wallet transactions show `gross`, `fee` and `net` exactly as Moov returns them.

## Checklist for a good test run

- An approved card reaches `paid` and your order is fulfilled once.
- A declined card leaves the order unpaid and lets the buyer retry.
- A double click on "Pay" creates one checkout, not two.
- A webhook with a bad signature is rejected.
- The same webhook delivered twice is processed once.
- An expired checkout does not leave the order stuck.

See the [Go-live checklist](/docs/go-live-checklist) for the full list.
