Network Merchants NMI Salesforce Integration Chargent

Integrating Network Merchants NMI with Salesforce using Chargent

Easily connect Network Merchants (NMI) and Salesforce with Chargent,

the leading payments app on the Salesforce AppExchange. Control all Network Merchants Incorporated (NMI) transactions, manage refunds, send payment links, see reports and more, all inside Salesforce.

Not yet a Chargent customer?
Contact us for a no-obligation 30 day trial, and see for yourself!


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.


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 in Salesforce.

Prior to setting up NMI in Salesforce

  1. Install both the Chargent Base Package and the Transaction Package (Chargent Orders) into your Salesforce org.

  2. Configure Chargent according to the Quick Start Guide.

For Chargent versions prior to 5.57 you may need to activate the Remote Site Settings in Salesforce if they aren’t already active for Network Merchants.

  • Click the gear icon on the top right and select Settings
  • Under Security select Remote Site Settings
  • Locate Network Merchants (NMI) and click edit
  • Check the Active box
  • Click Save

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. You can get your own sandbox by requesting one, or use the general 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 an 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:

NMI Sandbox

  1. If you don’t already have one, you can request an NMI sandbox account for their Direct Post eCommerce integration at the NMI Contact Form.

  2. contact

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

Setting up NMI in Salesforce

Add a NMI Gateway record in Salesforce using Chargent’s Gateway Wizard.

  1. Click on the App Launcher on the top left side in Salesforce.

  2. applauncher

  3. Select Chargent as the App

  4. Select the Chargent Settings Tab

  5. Choose Chargent Setup Wizard

  6. chargent settings

  7. Do you have a Payment Gateway account - Select Yes

  8. Select Network Merchants as your Payment Gateway.

  9. Select Test Transactions for testing or Live Transactions if you are looking to process real payments.

  10. Follow the prompts to configure your gateway.

You will need the following information:

  • Add your credentials based on your Sandbox (Test) or Production Live NMI account.

    • Username: This is your Network Merchants Username
    • Password: This will be your Network Merchants Password

Other information that will be asked:

  • Use Tokenization? (Recommended)

  • What currency will you be using? (USD, CAD, etc..)

  • What payment methods will you be accepting?

  • Credit cards and/or ACH (electronic check)

    • What Credit Card types will you be accepting? (Visa, Mastercard, etc…)

  • Payment Console Setup (Premium feature for Platform Edition)

    • Show Charge Button
    • Show / Create Update Token Button
    • Show Authorize Button

Direct Debit Network (version 6.15 and higher)

Starting with Chargent version 6.15, you can now select the Bank Account network for your region during the gateway setup process. This will allow for the correct Direct Debit Network fields to be displayed on Payment Requests and Payment Console based on your region.

You have the following Direct Debit Networks to choose from based on your region.

  • US - ACH (also known as echeck or electronic check)
  • Canada - EFT (ACSS) Electronic Funds Transfer
  • Australia - BECS
  • Europe - SEPA

Select the Payment Methods You Accept

Once you have your Direct Debit Network set, you will see the appropriate field names on your Payment Request that are sent as well as your internal Payment Console.

Payment Request Bank Account

Add a NMI Gateway record in Salesforce (Chargent versions prior to 5.40)

  1. Click on the AppLauncher on the top left side in Salesforce.

  2. applauncher

  3. In the Search for apps or items box, Search for Gateways and select

  4. gateways

  5. Click New and select Network Merchants (NMI) as the Gateway Type

  6. Map the following fields in Chargent with your credentials from Network Merchants:

    • Merchant ID: NMI Username

    • Merchant Security Key: NMI Password

  7. Setup the following Gateway fields

    • Check the Active box - To make the Gateway active

    • Use Tokenization (Recommended) - Tokenization is recommended if you have it enabled in your NMI gateway settings.

    • Available Card Types - Select the cards you will be accepting (this is based on your gateway settings and what card types they can process - Visa, Mastercard, American Express, etc..)

    • Available Payment Methods - Will you be accepting just Credit Cards or ACH (also known as electronic check, e-check, or direct debit)

    • Available Currencies - What currencies will you accept (this is based on your payment gateway and the currencies they accept payment in.

    • Credit Card / Bank Account Data Handling - This lets Chargent know when to clear the information in Salesforce. You have 4 options.

      • Never Clear
      • Clear After Successful Charge
      • Clear After All Transactions
      • Clear When Token is Present (recommended)

      • new gateways

When using Payment Requests or Payment Console the following should also be set. Please note these features come with Sites and Platform edition & require activation in your Production Org.

  • Available PR Transaction Types

    • Charge Full Amount - Charges the credit card immediately
    • Authorize Full Amount - This option won’t charge the card but only holds the funds available until you charge the card.
    • Authorize Minimum Amount - This option won’t charge the card but only holds the minimum amount that your gateway will allow. You will need to charge the correct amount in order to capture the transaction

    • card types

    • Show Charge Button
    • Show Authorize Button

    • pr transaction


Now that you have created the NMI gateway record in Salesforce, it is time to run some test transactions to ensure it was set up correctly, and understand how Chargent works to charge credit cards within Salesforce.

Create a Chargent Order in Salesforce to run test transactions

  1. Click on the App Launcher in the top left side and select Chargent as the App.

  2. launcher app

  3. Click the Chargent Orders Tab.

  4. Click on New

  5. Enter in the following information:

    • Account: The Account the Chargent Order should be associated with.

    • Charge Type should be either credit card or Check depending on if you are testing credit cards or electronic check (ACH)

    • Billing Information

      • Billing First Name
      • Billing Last Name
      • Billing Address
      • Billing City
      • Billing State / Province
      • Billing Zip Code / Postal Code
      • Billing Email Address (if you want to test the email receipt that gets triggered upon a successful transaction)

    • Charge Amount (check the Manual Charge field to enter a specific amount. If you are entering Subtotal, Tax, and Shipping then the Charge Amount will default to the Balance Due and the Manual Charge box does not need to be checked).

    • Credit Card Number = See NMI test credit cards. NMI will use AVS (Address Verification) and CVC number to determine different results. See ACH Routing and Account Numbers for testing ACH transactions

    • Card type (Visa, MasterCard, etc..) or Bank Account Type for ACH (Checking or Savings).

    • Card Expiration Month and Card Expiration Year - NMI suggests using a credit card expiration date of 10/25.

    • chargent order

      credit card

  6. Click Save

  7. Click the Charge button. You will receive a pop-up asking for the CSC (Card Security Code). This can be any 3 digits for Visa, MasterCard or Discover or 4 digits for American Express when testing in the Sandbox.

  8. charge

  9. Press the Charge button

  10. You should receive a popup that shows the test transaction was approved.

    charge back

Network Merchant Test Credit Cards

Credit Card Type Credit Card Number
MasterCard 5126870832570869
MasterCard (BIN 2) 2223000010089800
MasterCard (Debit) 5457350076543210
Visa 4563648800001007
Visa (Debit) 4921818425002311
Maestro (19 Digit) 6771771771771771774
Diners 536206300000099
Diners (19 Digit) 3607050000000000065
Discover 6544440044440046
Amex 374245001721009
JCB 3569990010082211


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

Routing Number Account Number
123123123 123123123

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 onlytd>
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

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 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

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.

    1. See the figure below for the placement of these fields

    2. edit ord

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

    4. charge authorize

    5. Enter the CVV (Credit Card Verification Code)

      • To simulate a CVV match, pass 999 in the cvv field.

      • cvv charge

    6. 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.

    7. cvv back

    8. 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.

    9. chargent ord

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.

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 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 in Salesforce. See the figure above.

Click a Transaction ID link to see the details of the transaction record, 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).


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

main menu

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


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


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.

transaction report

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


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.

  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 Gateway Setup 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.

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

  6. 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.


Chargent supports NMI Token Payments, which allows you to securely store your customer's account number and other cardholder data with NMI, and use an associated token in Salesforce for future payments.

PCI compliance scope is reduced since you are not storing the credit card numbers in Salesforce.

You can enable NMI Token Payments manually if you didn’t already select that option when you initially set up your NMI gateway.

  1. Go to the App Launcher and search for the Gateway Object.

  2. Select the Gateway Object and the NMI gateway.

  3. Click Edit and set the following.

  4. Click Advanced Settings
    • Check the Use Tokenization checkbox in the Chargent Gateway record you have set up for Fat Zebra
    • Set the Credit Card Handling field to Clear When Token is Present

The NMI token is stored in Chargent's Token field in Salesforce after your first successful transaction, and the credit card fields are handled as you specified in the preceding step.