> **Description:** Guide to using the Merchant Test (MT) environment for API integration testing, including test data, simulated payments, and validation scenarios.

# Test environment

## Available APIs

The following APIs are available for testing in all [our markets](https://developer.vippsmobilepay.com/docs/knowledge-base/across-borders.md).
If you have purchased one of these products, you can use the test environment to check your implementation.
You just need to gather the items listed in [Test environment setup](#test-environment-setup).

  [Access Token API](https://developer.vippsmobilepay.com/docs/APIs/access-token-api/README.md)
  [Checkout API](https://developer.vippsmobilepay.com/docs/APIs/checkout-api/README.md)
  [eCom API](https://developer.vippsmobilepay.com/docs/APIs/ecom-api/README.md)
  [ePayment API *](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/README.md)
  [Login API](https://developer.vippsmobilepay.com/docs/APIs/login-api/README.md)
  [PSP APIs](https://developer.vippsmobilepay.com/docs/APIs/psp.md)
  [QR API](https://developer.vippsmobilepay.com/docs/APIs/qr-api/README.md)
  [Recurring API](https://developer.vippsmobilepay.com/docs/APIs/recurring-api/README.md)
  [Userinfo API](https://developer.vippsmobilepay.com/docs/APIs/userinfo-api/README.md)
  [Webhooks API](https://developer.vippsmobilepay.com/docs/APIs/webhooks-api/README.md)

* The test environment doesn't include [ePayment: Freestanding card payments](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/freestanding-card-payments.md).
See [limitations](#limitations-of-the-test-environment) for more information about what is available.

## Test environment setup

**[Test users](#test-users)**

**[Test apps](#test-apps)**

**[Test sales units](#test-sales-units)**

**[Sales unit API keys](#sales-unit-api-keys)**

**[Test server](#test-server)**

### Test users

A test user's credentials consist of a [phone number](#phone-number) and a [national identity number](#national-identity-number).

Your test user must be in the same market and currency as the sales unit.
If you need another test user, see [create a test user](#create-a-test-user).

#### Create a test user

Test users can't be created through the app. Instead, use one of the following methods:

Merchants can create and retrieve test users on the [business portal](https://portal.vippsmobilepay.com) once they have an active customer relationship.

**Steps to create a test user:**

1. Navigate to *For developers* in the sidebar
   :::note
   If you don't see this option, ask your Administrator to grant you *Developer* access.
   :::
2. Select the *Test users* tab
3. Click *Add a new test user*
   - The system will automatically generate a phone number and NIN

Screenshot: Developer portal "Test users" tab showing a warning that test users must only be used in the test environment. A table lists test users with National identity number, Phone number, Date of birth, and Registered on columns, with a "Copy number" button for each.

For more details, see [About the business portal: Add a new user](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#add-a-new-user).

Once we have reviewed your partner application, we'll email you test credentials. This email contains:

- **Test phone number and national identity number** - Use these credentials to log in to our test app and simulate customer interactions.
- **Sales unit API keys** - Use these keys to authenticate your API calls and send payment requests to our test environment.
  They are associated with a test sales unit.

**NOTE**

If you have an older test user without the national identity number, contact
[partner@vippsmobilepay.com](mailto:partner@vippsmobilepay.com) to request a new one.

**Important information about test users:**

- Test users can be used on multiple devices and networks simultaneously.
- Test users are not linked to any specific merchant or partner. You can use them with any
  merchant and sales unit in the test environment.
- Test user attributes (name, birthdate, etc.) are randomly generated at creation. You can specify a birthdate, but no other attributes can be set.
- You can't modify an existing test user.
- Test users are not available in the production environment -- production only contains real users and data.

**NOTE**

To test in production, you must
[onboard as a merchant and order a product](https://developer.vippsmobilepay.com/docs/knowledge-base/applying-for-services.md).
This requires completing mandatory compliance checks and making real transactions with an actual user using the production app.
We recommend performing as much testing as possible in the test environment.

#### Test user properties

Each test user has the following properties:

##### National identity number

A fictitious [National Identity Number (NIN)](https://developer.vippsmobilepay.com/docs/knowledge-base/terminology.md#national-identity-number-nin)
is randomly generated when you create a test user.

You need the NIN to log in to the [test app](#test-apps).

##### Phone number

A phone number is assigned when you create a test user.
You need this for logging in to the [test app](#test-apps).

 Never use test phone numbers in the production environment--they could belong to real users.

##### Email address

You can add a real email address to a test user by navigating to
*Profile* > *Personal information* > *Email* in the test app.

In the test environment, email verification can only be triggered in a
[Login](https://developer.vippsmobilepay.com/docs/APIs/login-api/README.md)
flow (if the merchant requests the `email` scope), or by clicking *send email*
in the email section of the profile page. After updating the email address,
close and reopen the app for this option to appear.

Simply saving the email address will *not* trigger a verification email.
You can ignore the unverified status indicator on the profile page.

##### Payment card

Each test user comes pre-registered with a payment card. You can't add
new cards in the test app.

**To view test user properties:**

1. Go to [portal.vippsmobilepay.com](https://portal.vippsmobilepay.com/)
   and select *For developers* from the sidebar.
   (If you don't see this option, ask your Administrator to grant you
   *Developer* access.)
2. Select the *Test users* tab.
3. Select the test user to view its information.

### Test apps

You will need the Merchant Test (MT) app for a mobile phone or tablet.

The iOS and Android test apps closely mirror the production apps across all available APIs.
They connect to the MT environment instead of production, allowing you to test
the complete payment flow with API requests using test users.

You can install the test app alongside the production app on the same device without conflicts,
as the test app uses the `vippsMT://` URL scheme, while the production app uses `vipps://`.

**NOTE**

The test environment only supports [test users](#test-users) with randomly generated phone numbers -- you can't use your own phone number or real user accounts.
Never use test phone numbers in the production environment, as they may belong to real people.

#### App installation

Vipps MobilePay requires a minimum version of the phone's operating system.
For exact requirements, see [help.vippsmobilepay.com](https://help.vippsmobilepay.com/en-NO/articles/operating-system).

The iOS test app is available through Apple TestFlight.

You don't need an invitation or activation code.
If TestFlight prompts for one, close and reopen the app using the link below.

- On your iOS phone, open the [TestFlight link](https://testflight.apple.com/join/hTAYrwea).
  *Note: This link will not work on macOS, and TestFlight search is not helpful.*

  QR code for quick access:

You must use the same Google account to join the Google Group and download the app from Google Play.

1. Join the Vipps MobilePay MT Google group:

   - [Sign in to your Google account](https://groups.google.com) that you'll use for testing.
   - Go to the [Vipps MobilePay Test App](https://groups.google.com/u/0/g/vipps-mobilepay-test-app) Google group page.
   - Click *Join Group*.

2. Download the app from Google Play Store:

   **Prerequisite:** You must be signed in to the same Google account you used to join the Vipps MobilePay MT group.

   - On your Android device, open the
   [Vipps MobilePay MT app page on Google Play Store](https://play.google.com/store/apps/details?id=no.dnb.vipps.mt).
   - Click *Install*. If the app is already installed, uninstall it first, then reinstall.

**Steps within the MT app:**

After installing the app, follow these steps to set up your [test user](#test-users):

1. Select your country--it must match your test user's country or registration will fail.
1. If prompted for an age check, select *Over 15*.
1. Locate and copy your test user's [phone number](#phone-number) and [NIN](#national-identity-number)
   (see [Test user properties](#test-user-properties)).
1. Enter your test user's NIN.
1. Enter your test user's phone number.
   *Note: Your normal Vipps  or MobilePay  credentials will not work in the test environment.*
1. Enter `1236` to confirm your phone number.
   *You can enter up to 10,000 incorrect PIN attempts before the account locks.*
1. Click *Next* to confirm your identity.
   *A temporary browser window will open and close--this simulates production eID verification. You can ignore it.*
1. Enter `1236` to create a personal code.
1. Re-enter `1236` to confirm the personal code.
1. Enable biometrics (optional).
1. Allow notifications.

For issues with the MT app, contact
[developer@vippsmobilepay.com](mailto:developer@vippsmobilepay.com).

#### Using other versions of the app

In some cases, you may need to use specific app versions in MT.
This can occur when the production apps and environment are not fully aligned with the test environment.
When this happens, we provide details on the [test environment status page](https://status-test.vippsmobilepay.com/).

#### Using an emulator

If you use an emulator instead of the native app on a physical device,
you may experience issues, including having to log in from scratch
every time you launch the app in the emulator.

### Test sales units

All merchants with API access can use the test environment
([with some exceptions](#limitations-of-the-test-environment)).

A test sales unit is automatically created when you order
a Vipps MobilePay product that includes an API. You can find the details and API keys in the
*Developer* section on the
[business portal](https://portal.vippsmobilepay.com).
For login instructions, see [About the business portal](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md).

Test sales units inherit the country code of the merchant they're created for:

- Norwegian merchants can only create Norwegian sales units
- Danish merchants can only create Danish sales units
- Finnish merchants can only create Finnish sales units

Test sales units can't be modified after creation, but you can create as many test sales units as needed.

See: [How to create a test sales unit](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#how-to-create-a-test-sales-unit).

After submitting the partner application form, you'll receive
a welcome email with a test sales unit, API keys, documentation links, and an overview of the required steps of the partner onboarding process.

If you have lost this or need a new test sales unit, please contact
[partner@vippsmobilepay.com](mailto:partner@vippsmobilepay.com).
Sales units are unique per country. Remember to state which country the sales unit should be created for.

Note that partner functionality is not available in test. Instead, you will receive merchant API keys, as mentioned in the
[limitations](https://developer.vippsmobilepay.com/docs/knowledge-base/test-environment.md#limitations-of-the-test-environment) section.
All payment flows can be tested using the merchant's API keys.

See [Partner: How to get access for your sales units](https://developer.vippsmobilepay.com/docs/partner/how-to-check-details.md#how-to-get-access-to-your-sales-units).

### Sales unit API keys

In the test environment, use [sales unit API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md): each set is linked to
one test sales unit and can only be used with that unit.

The test and production environments are completely separate,
so you need different API keys for each environment.

Test environment API keys are typically available within a few minutes after creating a [test sales unit](#test-sales-units).

See:

- [About API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md)
- [How to find API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#how-to-find-the-api-keys)

### Test server

**Test (MT) API server:**

`https://apitest.vipps.no`

**Production API server:**

`https://api.vipps.no`

* **Test and production environments** are completely separate--each requires its own API credentials.
* Both servers are accessible worldwide with **no IP restrictions** on the Vipps MobilePay side.
* Access control relies solely on valid **[API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md)**.

See [Servers](https://developer.vippsmobilepay.com/docs/knowledge-base/servers.md) for more information.

## Recommendations for test amounts

You can use special amounts in the test app to consistently trigger specific outcomes.

| Amount in minor units (øre, cents) | Error                                        |
| ---------------------------------- | -------------------------------------------- |
| 151                                | Insufficient funds                           |
| 182                                | Refused by issuer                            |
| 183                                | Suspected fraud                              |
| 184                                | Withdrawal limit exceeded                    |
| 186                                | Expired card                                 |
| 187                                | Invalid card                                 |
| 197                                | 3D Secure denied (only applicable in Norway) |
| 201                                | Unknown result for 1 hour                    |
| 202                                | SCA required (only applicable in Norway)     |

Refund test amounts:

| Amount in minor units (øre, cents) | Error                       |
| ---------------------------------- | --------------------------- |
| 123                                | can't refund single transferred payments. User is deleted or does not have a receiving account. |
| 124                                | Refund period expired       |

## Limitations of the test environment

The test environment covers the core API flows. Functionality that depends on third-party integrations is only available in production.

**NOTE**

Support is available during typical office hours (CET). For current status, see the [Status page](https://developer.vippsmobilepay.com/docs/knowledge-base/status-pages.md).

**API limitations**

Not all APIs are available in the test environment. See the [list of available APIs](#available-apis) at the top of this page.
For functionality not covered in the test environment, you may be able to [test in production](#testing-in-production).

**Test app limitations:**

- Although the test app looks orange, the APIs
  can be fully tested for all markets.
- Push alerts may be unavailable or unstable. To see payment requests:
  Click the *Payments* button at the bottom, and then *pull to refresh*
  on the Payments screen.
- The activity list is empty and old payments can't be found.
- Contactless payments (tap to pay, NFC) are not supported.

**Data and features:**

- There are no settlements in the test environment, and therefore no
  settlement reports available from the [Report API](https://developer.vippsmobilepay.com/docs/APIs/report-api/README.md). The only way to test the complete settlement
  flow is in the [production environment](#testing-in-production).
- The user's email address can't be verified in the normal way.
  See: [Email address](#email-address).
- Gender is not available through
  [Profile sharing](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/profile-sharing.md)
  in the ePayment API or [Login](https://developer.vippsmobilepay.com/docs/APIs/login-api/README.md).
- Testing [Freestanding cards](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/features/freestanding-card-payments.md) in the ePayment API
  is not available.

**Partner and portal:**

- Partner functionality and the use of
  [partner keys](https://developer.vippsmobilepay.com/docs/partner/partner-keys.md) are not available.
  Partners receive test sales unit API keys instead.
- There is no equivalent to the
  [business portal](https://portal.vippsmobilepay.com) for
  the test environment.

## Testing in production

To test in the production environment, you need a live Vipps MobilePay
account. You can register for one on the
[business portal](https://portal.vippsmobilepay.com).

**NOTE**

Sales units in the production environment are subject to strict
regulatory and other requirements. As a result, you may not be able to
replicate the sales unit configuration there, even though you have it
in the test environment.

When testing with real transactions in production:

- **Use 2 NOK (or equivalent currency)** as your test amount, even
  though 1 NOK is the smallest possible amount.
- 1 NOK is not reliable for testing, as it gets low priority in some
  payment processing systems.

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
