# Connecting NMI

> Connecting to NMI requires an NMI username and password. We highly recommend you create a dedicated user on NMI for this purpose rather than reusing a personal

Connecting to NMI requires an NMI username and password. We highly recommend you
create a dedicated user on NMI for this purpose rather than reusing a personal
login.

1. Log in to NMI and go to **My Settings → User Accounts → Add A New User**.

   ![NMI User Accounts list with Add A New User highlighted](/_astro/cdn/15d9915ba5/connect-1.png)

2. Create the user account. Enable **all** permissions, and note the **username** —
   you will need it when connecting.

   :::note[Tip]
   Use an email address you have access to. You can usually append `+api` to your existing address — for example `myname+api@company.com` — to get a unique address that still reaches your inbox.
   :::

   ![NMI Add Account form showing user information and permissions](/_astro/cdn/b2f463a118/connect-2.png)

   You will receive an email with a link to create a password for the new user.

   ![NMI user creation notification email](/_astro/cdn/3bd52f2ad8/connect-3.png)

3. In the NMI connection screen, enter your username and password and select
   **Save**.

   ![New Gateway setup screen for NMI](/_astro/cdn/48b1e7f91d/connect-4.png)

4. The connection is tested and you are shown a green **"Connected to NMI"**
   message. If there is an error, check that the account details are correct and
   that the user has been granted all permissions.

   ![Connected to NMI with webhook unverified](/_astro/cdn/2b07241080/connect-5.png)

5. You will then be prompted to set up webhooks. See
   [Enabling webhooks](#enabling-webhooks) below.

## Connection options

Our integration with NMI offers several options:

- **Enable 3DS:** Enables 3D Secure support for ecommerce transactions that require
  it. This option appears once the connection is saved. When selected, a **Public
  Key** field appears.

  ![Enable 3DS checkbox with Public Key field](/_astro/cdn/f5ce8efcd6/connect-6.png)

  To get your public key, in NMI go to **My Settings → Security Keys → Add a New
  Public Key**.

  ![NMI Security Keys page with Add a New Public Key highlighted](/_astro/cdn/eefd7fe6ff/connect-7.png)

  Enter a key name (for example `3DS`), select the username you created in step 2,
  and set **Key Permission** to **Checkout**.

  ![NMI New Public Key dialog](/_astro/cdn/7cf8a6ed4e/connect-8.png)

  Then copy the value of **Key** from your **Public Security Keys** list into the
  Public Key field in the setup screen.

  ![NMI Public Security Keys list with the new key highlighted](/_astro/cdn/dd932489ac/connect-9.png)

- **Enable ACH:** Enables ACH as a payment method. You must also have ACH enabled
  on your NMI account.
  - **ACH Type (non ECOMMERCE):** The ACH entry type used for payments that aren't
    made online by the customer, such as phone and recurring payments: **TEL -
    Telephone-initiated** (the default), **CCD - Corporate Credit or Debit**,
    **CTX - Corporate Trade Exchange** or **PPD - Prearranged Payment and
    Deposit**. Online (ecommerce) ACH payments always use WEB.
- **Require address (AVS):** Requires the customer to enter their billing address.
- **Require Account Name:** Requires the customer to enter the cardholder name.
- **Enable Multiple MIDs:** Lets you configure a different MID for ecommerce and
  MOTO transactions. Some acquirers issue separate accounts for these. Enter the
  **Ecommerce Processor ID** and the **MOTO / MIT Processor ID**.

  ![Enable Multiple MIDs with Ecommerce and MOTO processor ID fields](/_astro/cdn/843292894c/connect-10.png)

  You can check your processor IDs in NMI under **My Settings → Transaction
  Routing**.

  ![NMI Transaction Routing page](/_astro/cdn/74989507a8/connect-11.png)

## Enabling webhooks

To ensure the NMI integration operates correctly, you need to set up webhooks. This
is how NMI notifies us of transaction and settlement updates.

1. In NMI, go to **Settings → Webhooks**.

   ![NMI Gateway Options overview with Webhooks highlighted](/_astro/cdn/fe1edcc73c/connect-12.png)

2. Add a new webhook pointing to the URL shown in the setup screen, and select **All**
   available events.

   ![NMI Webhooks page with Create highlighted](/_astro/cdn/671aac560f/connect-13.png)

   ![NMI Webhooks endpoint editor subscribing to all events](/_astro/cdn/b6503ab8db/connect-14.png)

3. You will be shown a **Signing Key**. Copy it back into the **Webhook Signing
   Key** field in the setup screen and save.

   ![NMI Webhooks page showing the Signing Key revealed](/_astro/cdn/17fcb070d5/connect-15.png)

4. We test the webhook. This takes about two minutes and displays one of the
   following statuses:

   - **UNVERIFIED:** We have not received anything. Double-check your NMI setup.
   - **UNSIGNED:** We received a webhook but the signing key was missing or
     incorrect.
   - **VERIFIED:** It is set up correctly.

   ![Connected to NMI with webhook verified](/_astro/cdn/6f6856fb36/connect-16.png)