Network Merchants NMI Salesforce Integration Chargent

Integrating Network Merchants NMI with Salesforce using Chargent


Network Merchants Incorporated (NMI) provides payments enablement technology that empowers ISOs, VARs, ISVs and payment facilitators to offer branded payment gateway services without building or maintaining their own technology. NMI software engineers have built a security-focused, feature-rich, omni-channel payment gateway platform that partners can brand—completely and transparently—so that NMI doesn’t appear in their customer views. With Headquarters in Roselle, Illinois, NMI is the operating trade name of Network Merchants, LLC.

NMI Logo

Chargent Payment Processing for Salesforce already has a connection to NMI, giving you the ability to manage and send transactions to NMI from Salesforce. The integration connects the NMI payment gateway directly to your customer records Salesforce.

Configuring NMI for Integration

In this section and the next, you’ll find the procedures for configuring the integrations for both NMI and Salesforce. It’s important to follow each of the steps carefully, and in the correct order.

As shown in the NMI documentation, credentials are available for testing your integration. This includes the following username and password:

  • Test username: demo
  • Test password: password

You’ll also want to contact NMI to obtain a merchant account and get credentials for a production account. Many payment companies resell NMI as their payment gateway, so you may also receive credentials from a NMI partner.

It’s essential that you get these credentials for the production account:

  • Username, from your enrollment email message
  • Password, from your enrollment email message

NOTE: You must obtain these gateway credentials from NMI before moving on to the steps in the next section, Setting Up Salesforce For Integration

Follow these instructions for configuring NMI for integration with Salesforce:

  1. Begin by asking to setup a sandbox account at the NMI Contact Form.

  2. Enter all of the information in the request form (see the figure below).

    NMI Contact Form

  3. You will receive email communications from NMI Support, and they will provide you with these credentials in the list above.

Production account

You’ll also need to register for a production account. Use the contact information in the enrollment email messages to work with NMI Support and obtain the same set of credentials for your production account.

Setting Up Salesforce For Integration

This section contains the procedure for setting up Salesforce for the integration with NMI.


  • The steps below are written with the assumption that Chargent has not already been installed into Salesforce.

  • Before moving on to the procedure below, you must successfully complete all of the steps given in the previous section, Configuring NMI for Integration.

Follow the steps below to configure Salesforce to integrate with NMI:

  1. Install the Chargent Base Package into Salesforce, as we describe on the Chargent Installation page.

    NOTE: Both the sandbox and production installation of Chargent include a free, 30-day trial license.

  2. Install the Chargent Orders Transaction Package in Salesforce, as we describe on the Chargent Installation page.

  3. Complete the basic Chargent setup, such as assigning user licenses and updating page layouts. For more information, please consult our Quick Start Guide.

  4. As shown in the figure below, Select the Chargent item in upper-right corner of Salesforce.

    Moduslink Chargent

  5. In the upper-left of the Salesforce page, click the Gateways tab, then click the Create New drop-down, and then select Gateway-as shown in the figure.

    Moduslink Create Gateway

  6. In the Gateway Record Type panel, select the NMI item from the Record Type drop-down, and then click the Continue button.


  7. On the Gateway Edit page, enter the Gateway Name (such as “NMI Gateway”), which is an internal Salesforce name that you choose for the gateway.

  8. To test with the NMI sandbox account, check the Test Endpoint box. (See the figure below.)

  9. Using the table below for guidance enter the test credentials that can be found in the NMI documentation given to you by NMI into the corresponding field on the Gateway Edit page:

    Gateway Page Field NMI Credential
    Gateway Name Enter a easily recognizable name for this gateway.
    Merchant ID Username, from your enrollment email message
    Merchant Security Key Password, from your enrollment email message
  10. Click the Save button. (See the figure below.)


Testing the Integration

This section contains the procedure for testing the integration that you set up according to the procedure given in Setting Up Salesforce For Integration, using your NMI sandbox credentials.

Follow the steps below to ensure that the integration is correct.

  1. In the upper-left corner of the Salesforce page, click the + tab to open the All Tabs page.

  2. In the tabs listing, locate the link that corresponds to the Chargent Transaction Package that you installed during the Configuring Salesforce For Integration procedure. See the figure below, in which we show Chargent Orders for the purpose of illustration here.

    Moduslink Chargent Order

  3. On the next page, click the New button (see the figure below).

    Moduslink New Chargent Order

  4. The table below contains a listing of valid test credit card numbers for NMI. Any card may be used without impacting the cardholder account, since all responses are from a simulated authorization system.

    Card Type Card Number
    Visa 4111111111111111
    MasterCard 4111111111111111
    Discover 6011601160116611
    American Express 341111111111111
    NMI suggests using a credit card expiration date of 10/25.

  5. ACH: You can also submit ACH transaction with the test routing and account numbers:

    Routing Number Account Number
    123123123 123123123
  6. Address Verification Testing - The values table below can be used to test all possible NMI AVS responses. The combination of the Street Address and Zip Code in the request will generate the associated AVS Result Code in the response.

    AVS Result Code AVS Result Definition
    X Exact match, 9-character numeric ZIP
    Y Exact match, 5-character numeric ZIP
    D Exact match, 5-character numeric ZIP
    M Exact match, 5-character numeric ZIP
    A Address match only
    B Address match only
    W 9-character numeric ZIP match only
    Z 5-character ZIP match only
    P 5-character ZIP match only
    L 5-character ZIP match only
    N No address or ZIP match only
    C No address or ZIP match only
    U Address unavailable
    G Non-U.S. issuer does not participate
    I Non-U.S. issuer does not participate
    R Issuer system unavailable
    E Not a mail/phone order
    S Service not supported
    O AVS not available
    B AVS not available
  7. CVV Codes - The table below lists the NMI responses codes for testing CVV, CVC, and CID-which is the 3- or 4-digit code printed on the back of a card. This security feature assists merchants in processing a Card-Not-Present transaction, and receiving a positive response improves the likelihood that the cardholder making the purchase is in physical possession of the card. Visa, MC, and Discover encode a 3-digit value on their cards, which American Express encodes either a 3- or 4-digit value. Sending one of the following CVV/CVC values will return the corresponding result code:

    AVS Result Code AVS Result Definition
    M CVV2/CVC2 match
    N CVV2/CVC2 no match
    P Not processed
    S Merchant has indicated that CVV2/CVC2 is not present on card
    U Issuer is not certified and/or has not provided Visa encryption keys
  8. In the Chargent Order Edit page, enter or select information to correctly complete the essential parts of the form, including:

    • Gateway
    • Billing First Name
    • Billing Last Name
    • Billing Address (Address, City, State, Zipcode)
    • Billing Email Address (to get a receipt)
    • Charge Amount (check Manual Charge if the Charge Amount is not calculated from Subtotal + Tax + Shipping)
    • Payment Method
    • Card Type
    • Card Number
    • Card Expiration Month
    • Card Expiration Year (use a future year)
    • Card Last 4

    See the figure below for the placement of these fields.


  9. Error Testing

    • To generate a declined transaction, pass an amount that is less than 1.00.
    • To trigger a fatal error message, pass an invalid card number.
    • To simulate an AVS match, pass 888 in the address1 field, 77777 for zip.
    • To simulate a CVV match, pass 999 in the cvv field.

    See the figure below for the placement of these fields.


  10. Click the Save button to commit the changes on the form. On the next page, click the Charge button (as shown below).


  11. When the transaction is complete, you see a small pop-up as shown in this figure. Click the OK button to close the pop-up window, then scroll to the bottom of the Order page.


  12. A record is created for each error and each successful transaction, and this record contains the response messages and details that are sent back from NMI. See the figure below for an example.


Sending Live Transactions from a Salesforce Sandbox

When Chargent is installed in a Salesforce Sandbox, transactions are always sent to the payment gateway's test / sandbox / development environment, regardless of whether Chargent's Test Endpoint checkbox is checked. This is done as a security precaution, to prevent real transactions from being accidentally sent from a Salesforce Sandbox.

When Chargent is installed in a production or developer Salesforce org, the Test Endpoint checkbox on the Gateway record will select between sending to the payment gateway's live and test environments. (There are a few exceptions, such as Stripe, which has a single endpoint to send transactions to, and different credentials for live versus test transactions).

If you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, simply use Chargent's Endpoint Override field on the Gateway record, and enter the production endpoint of your chosen gateway there.

Here is the production endpoint URL for Chargent's integration with Network Merchants NMI:

Note that the full endpoint URL must be entered in the Endpoint Override field, and the domain must be present in the Remote Site Settings (for standard Chargent integrations it should be already present).

Understanding Transactions

When a transaction occurs between Chargent and the NMI gateway, a new transaction record is created. The listing of transactions can be found in the Transaction section near the bottom of the Chargent Order page (or Opportunities or Cases, if you are using those packages). See the figure above.

Click a Transaction ID link to see the details, as shown in the figure below. This transaction record contains the entire set of data that NMI sends in its response, including transaction Type (Charge, Authorize, Refund or Void), the Response Status (Approved, Declined, Error).

NMI Transactions

The Gateway Date is the timestamp for the submission to NMI, and the Gateway ID field corresponds to the NMI Transaction ID for use in reconciliation between two systems.

Confirming the transactions with NMI

You can compare the transactions in Salesforce with your NMI administrative app to search for transactions and generate reports.

Access your NMI administrative test account information to view your test transactions and generate reports, if necessary.

Search for transactions

Login to your test account using the test username and password. Then, as shown in the figure, click the Reports item in the menu on the left

NMI Transactions

In the Reports page, choose a Group By category, then choose a Start Date and End Date, and then click the Submit button.

NMI Transactions

On the Transaction Snapshot page, you’ll find a listing of test transactions matching the date/group criteria from the previous step.

NMI Transactions

As shown in the figure above, click the small spyglass icon on the line containing the transaction you want to inspect, and then click View these Transactions.

NMI Transactions

Click the ID of the transaction you want to inspect to view its details, as shown in the figure below.

NMI Transactions

Field Mapping

This table contains the mapping information between NMI and Salesforce fields.

Salesforce field Direction NMI field
Invoice Number > Order ID
Order Information > Description

Going Live

This section contains the procedure for configuring the integration in a production system.

NOTE: Do not proceed here until the testing procedure described in Testing the Integration is successful.

  1. First, obtain the production credentials for the NMI production gateway account (the productions credentials from Configuring NMI for Integration).

  2. As given previously, the credentials include the following:

    • Username, from your enrollment email message
    • Password, from your enrollment email message

  3. Repeat the steps in the Configuring SalesForce for Integration section above, but substitute the production credentials.

  4. Repeat the steps in the Testing the Integration section above with respect to the SalesForce production environment, using the production credentials.

    NOTE: Remember to void the transaction after testing, if you are using a real credit card and want to prevent the charge from settling.

  5. Be sure to successfully transmit at least one real credit card transaction and one real ACH transaction-using company or personal accounts. We recommend that you submit a transaction with a very small amount and then voiding that transaction afterwards.