Network Merchants

Integrating NMI With Chargent In Salesforce

Salesforce Payments by Chargent is the leading payment application available on the Salesforce AppExchange. Chargent allows you to process payments directly from within Salesforce. This guide shows you how you can easily connect Network Merchants Incorporated (NMI) with Salesforce using Chargent.

Not yet a Chargent customer? Get started today with a 30-day free trial!

About This Guide

This guide walks you through the steps needed to integrate Chargent with the Network Merchants Incorporated (NMI) gateway. It assumes you have already installed and configured Chargent, but links are provided to installation, user management, and configuration topics where more details are available so you can get up and running quickly. It also assumes you have chosen the NMI gateway and includes links to gateway-specific documentation for configuration instructions.

Before You Begin

Before you start integrating the NMI gateway in Chargent with Salesforce, make sure you have completed the following steps:

Installing and Configuring Chargent

Before setting up your gateway, install the latest version of Chargent and configure your user permissions. Guides for these topics are available below to help you get started.

Setting Up Your Test Environment

Before installing Chargent in production, we highly recommend installing and testing in a Salesforce sandbox. The following topics provide instructions for obtaining your test gateway credentials and creating a test gateway record in Salesforce. Remember to refresh your sandbox beforehand to ensure that your sandbox is aligned with your production configurations.

Generic Test Credentials

You can use the generic username and password below to quickly test Chargent without creating an NMI account. However, you will not be able to verify your transactions in NMI. We recommend using the following credentials only for initial testing. This section may be skipped if you already have or intend to obtain an NMI Merchant Account.

  • Username: demo
  • Password: password

If you plan to conduct your initial testing using the above generic credentials, skip ahead to Activating Your NMI Remote Site. Ultimately, you will need to create your own NMI Merchant Account using the steps outlined in the following sections.

Creating Your NMI Merchant Account

To take payments using NMI via Chargent, you will require an NMI Merchant Account for their Direct Post eCommerce integration. You can obtain an account in one of two ways:

  1. If you don’t already have an account, you can request one by contacting NMI. After requesting your account, NMI’s team will assist you by provisioning your account details and credentials.
  2. Many payment companies resell NMI as their payment gateway, so you may also receive credentials from an NMI partner.

Activating Test Mode For Your Merchant Account

Your NMI Merchant Account can be switched between test and live modes, allowing you to perform test or live transactions based on the lifecycle of your implementation. When processing test transactions, you must switch your account to Test Mode. For instructions, follow the steps below or visit NMI’s Test Mode documentation.

  1. Log in to your NMI Merchant Account.
  2. Click Options.
  3. Click Settings.
  4. Under ‘Transaction Options’, click Test Mode.

Ensure that Test Mode is disabled before attempting to process live transactions. Transactions will not process at the bank and you will not receive any funds when the account is in Test Mode.

Obtaining Your NMI Merchant Account Credentials

To verify your test gateway in Salesforce, Chargent requires the following NMI Merchant Account credentials:

  • Username
  • Password

This information is obtained while creating your NMI Merchant Account. These credentials can be found in your enrollment message following the creation of your account. If you cannot locate these credentials, please contact NMI.

Activating Your Remote Site Settings

Next, activate the remote site for NMI in Salesforce. Remote site activation will allow you to connect to the remote site URL for NMI: https://secure.networkmerchants.com.

  1. Click the gear icon at the top right and choose Setup.
  2. Enter “remote” in the Quick Find box and choose Remote Site Settings.
  3. Locate the following Remote Site names and make sure the “Active” box is selected:
    • Network_Merchants_Incorporated_NMI
  1. If the “Active” box is not selected, click Edit, select Active, and click Save.

Creating Your Test Gateway in Chargent

With your credentials in hand, it’s time to create a gateway record in Chargent and verify your integration with NMI in Salesforce.

  1. Login to your Salesforce sandbox (partial, full, or developer sandboxes work).
  2. Go to the App Launcher and click the Chargent app.
  3. Click the Chargent Settings tab and choose the Setup Wizard subtab.
  4. Click Yes when prompted, “Do you have a Payment Gateway account?”.
  5. Select ‘Network Merchants Incorporated (NMI)’ from the list and click Continue.
    • Do not select ‘Network Merchants (NMI) – Auth.net emulator’. This choice has been replaced by the above direct integration to NMI.
  1. Enter your NMI Merchant Account Username and Password, leaving the Endpoint Override field blank.
  2. Click Sign In.
  3. When you receive a message stating “Your credentials have been successfully verified!”, click Continue to complete the steps in the wizard.

The remaining choices in the Gateway Setup Wizard are determined by your specific use case. For more detailed information about the steps, see Gateway Setup Wizard.

Setting Up Your Direct Debit Network

Setting up your direct debit network is optional but recommended. When you reach the gateway setup wizard page labeled “Select the Payment Methods you accept,” select the direct debit network for your region.

Our NMI integration supports the ‘ACH – US’ direct debit network. Choosing the correct direct debit network allows you to accept bank account payments and display the correct direct debit network fields in Chargent.

For more information, see Understanding Bank Account Payments.

Running Test Transactions

After successfully creating your test gateway record, you can attempt your first test transaction. See Testing in Sandbox for instructions and best practices for testing. Every gateway has its own test payment methods and response codes.

When your NMI Merchant Account is in Test Mode, all valid credit cards will be approved (without processing a charge). When Test Mode is deactivated, you can use the payment information below to process one-off test transactions.

Testing Credit Card Transactions

Visit the ‘Test Data’ section in NMI’s documentation, Testing Information, for a complete list of test credit card numbers. To quickly verify your integration, you can use the following test credit card number to ensure Chargent is appropriately configured:

Processing Network Card Number Expiration  CVC
Visa 4111111111111111 Any date in the future Any 3-digit number
Mastercard 5431111111111111 Any date in the future Any 3-digit number
American Express 341111111111111 Any date in the future Any 3-digit number
Discover 6011000991300009 Any date in the future Any 4-digit number

Testing Bank Account Transactions

Visit the ‘Test Data’ section in NMI’s documentation, Testing Information, for test bank account information. To quickly verify your integration, you can use the following test bank account information to ensure Chargent is appropriately configured:

Routing Number Account Number Bank Name Account Type
490000018 24413815 Any bank name Checking

Testing Response Codes

It’s important to test different gateway responses to ensure that your gateway is configured properly. The gateway’s response is stored on a transaction record (see the Response Code and Response Status fields) in Salesforce.

Every gateway has its own response codes. When using NMI, you can test your response codes by submitting specific billing information. See the ‘Triggering Errors in Test Mode’ section of NMI’s documentation, Testing Information. We’ve listed a few examples below:

  • To generate a declined transaction, send a Charge Amount that is less than 1.00.
  • To trigger a fatal error message, pass any invalid card number.
  • To simulate an AVS match, pass ‘888’ in the Billing Address field and ‘77777’ in the Billing Zip/Postal field.
  • To simulate a CVC match, pass ‘999’ for the CVC value.

Running Live Transactions in Sandbox

It is not considered best practice to run live transactions in your sandbox environment. However, if you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, you simply need to deactivate Test Mode for your NMI Merchant Account.

Once Test Mode is deactivated, you will still be able to perform one-off test transactions using the test payment information in the previous two sections. It is also important to note that all other transactions will now be live, meaning they will be processed by the bank, and funds will be transferred.

Going Live in Production

Once you’ve tested your gateway integration in a Salesforce sandbox, you’re ready to move to production. See Moving from Sandbox to Production to learn how to migrate your Chargent configuration changes to your production environment. After moving Chargent to production, see Testing in Production for best practices prior to going live.

Deactivating Test Mode For Your NMI Merchant Account

Now that you’ve completed your testing, you must deactivate Test Mode for your NMI Merchant Account. To deactivate Test Mode for your account, follow these steps:

  1. Log in to your NMI Merchant Account.
  2. Click Options.
  3. Click Settings.
  4. Under ‘Transaction Options’, click Test Mode.

Please note that once your NMI Merchant Account is switched to Live Mode, any payments made using your test gateway will also be processed and charged as a live transaction. Learn more about Test Mode by visiting NMI’s Test Mode documentation.

Creating Your Live Gateway Integration in Salesforce

So far, you’ve used your test NMI credentials and created a test gateway in your Sandbox. Now, it’s time to create a new gateway record in your production environment specifically for processing live transactions.

  1. Log in to your production Salesforce org.
  2. Go to the App Launcher    and click the Chargent app.
  3. Click the Chargent Settings tab and choose the Setup Wizard subtab.
  4. Click Yes when prompted, “Do you have a Payment Gateway account?”.
  5. Select ‘Network Merchants Incorporated (NMI)’ from the list and click Continue.
    • Do not select ‘Network Merchants (NMI) – Auth.net emulator’. This choice has been replaced by the above direct integration to NMI.
  6. Click Live Transactions and enter your new live gateway credential, leaving the Endpoint Override field blank.
  1. Click Sign In.
  2. When you receive a message stating “Your credentials have been successfully verified!”, click Continue to complete the steps in the wizard.

For more detailed information about these steps, see our documentation for the Gateway Setup Wizard.

Running Live Transactions

With your live gateway record created, you are ready for the final phase of testing: running live transactions in a production environment. Visit Testing in Production for considerations and best practices related to testing in your production environment.

When testing with live payment information, you can prevent transactions from settling by voiding them immediately afterward. For more information, see Refunding and Voiding Transactions. As a precaution, we recommend using very low amounts to minimize any impact in the event you forget to void them.

To test gateway responses in the live environment, submit live transactions with the correct street address, zip code, and CVC information to generate successful responses. Likewise, submit incorrect street address, zip code, and card code information to generate other responses. You can void successful transactions immediately to prevent live test transactions from being processed.

Congratulations! You have successfully integrated Salesforce and NMI! You can now process transactions through NMI directly in Salesforce using Chargent!

Supported Features

All of Chargent’s gateway integrations support most of Chargent’s core features. Some features are reliant on support by the gateway itself. Chargent’s integration with NMI includes, but is not limited to, the following features:

ACH Validation

Using NMI, you can validate US bank accounts on the Automated Clearing House (ACH) network via our partner, Lyons, a leading data verification provider. This feature is designed to satisfy NACHA’s mandate—Supplementing Fraud Detection Standards for Web Debits.

For more information, see ACH Validation.

Address Verification System (AVS)

Chargent’s integration with NMI includes Address Verification System (AVS), a technology used to prevent fraud by validating the ownership of a credit card using the billing address of a credit card and matching it with the data on file at the credit card issuing company.

Your AVS results are stored in Salesforce using the AVS Response Code field on your transaction record. For code definitions, see NMI’s AVS Response Codes.

For more information, see Address Verification System (AVS).

Currencies

Chargent and NMI support many currencies. Ultimately, the currencies supported by NMI are determined by your payment processor. Please reach out to your specific payment processor for more information.

Additionally, our NMI integration supports Salesforce’s Multiple Currencies feature.

For more information about currencies in Chargent, see Understanding Currencies.

Data Levels

Data levels allow you to send more information with each transaction, ensuring the security and authenticity of the payment. Higher data levels translate to higher savings on transaction fees. The following levels of data are supported by NMI using Chargent:

  • Level I
  • Level II
  • Level III

For more information about data levels, see Understanding Data Levels.

Payment Method Types

Below, we’ve listed the payment method types that are supported when using the NMI gateway integration. For more information about payment methods supported by Chargent, see Payment Methods Supported.

Credit Cards

  • Visa
  • Mastercard
  • Discover
  • American Express
  • UK Maestro
  • JCB Card
  • Diners Club

For more information, see Understanding Credit Card Payments.

Bank Accounts

  • ACH – US

For more information, see Understanding Bank Account Payments.

Tokenization

Tokenization allows you to store payment information at your gateway and not in Salesforce. Tokenization helps you decrease the scope of your PCI compliance and improve security by storing your customers’ payment information on NMI’s servers and not in Salesforce.

Chargent’s NMI integration supports tokenization for the following payment method types:

  • Credit Card
  • Bank Account

The token returned by NMI is stored in the Token field on the Chargent Order and Tokenization on the Transaction records in Salesforce. Additionally, tokens are stored in a Chargent Tokens record when Payment Methods is enabled in your org.

To learn more about why we recommend tokenization, visit Salesforce Tokenization.

Transaction Sync

Chargent sends charges and authorizations to the payment gateways, recording the result in a real-time transaction in Salesforce. Chargent also updates Salesforce records long after the initial transaction if, for example, ACH transactions are returned for non-sufficient funds (NSF) or credit card authorizations that expire.

Check out NMI’s Search Transactions documentation to learn about possible transaction statuses and their definitions.

For setup instructions, visit Transaction Sync.

Transaction Types

Chargent’s integration with NMI supports the following transaction types:

  • Authorize
  • Capture
  • Partial Capture
  • Refund
  • Partial Refund
  • Void

For more information about Transaction Types, see Understanding Payments.

Field Mapping

Salesforce sends payment information to your gateway based on the field values in your Chargent Order records. NMI stores the payment information as a transaction in your NMI account. Then, NMI returns a response to Salesforce, which is stored in a transaction record. Here are a few important examples of how the data is mapped between Salesforce and NMI.

Chargent Field Salesforce Object Direction NMI Field
Gateway ID Transaction < Transaction ID
Tokenization Transaction < Customer Vault ID
Token Chargent Order > Customer Vault ID
Order Information* Chargent Order > Description
Billing First Name / Billing Last Name Chargent Order > First Name / Last Name
Billing Company Chargent Order > Company
Billing Address / Billing Address 2 Chargent Order > Address 1 / Address 2
Billing State / Province Chargent Order > State
Billing Zip Code / Postal Code Chargent Order > Zip
Billing Country Chargent Order > Country
Billing Phone Number Chargent Order > Phone
Billing Fax Number Chargent Order > Fax
Billing Email Address Chargent Order > Email
Tax Chargent Order > Tax
Shipping Chargent Order > Shipping

*The Order Information field allows you to send additional custom information about your transaction. Chargent does not automatically populate this field.

Gateway Responses

The Reason Message field on a Transaction record stores a response provided by NMI. To learn more about a specific response or error, see NMI’s Result Code Table.

To review gateway responses in Salesforce, go to the transaction record in Chargent and examine these field values:

Transaction Field Name Description
Response Status The state of the transaction, such as “Approved,” “Declined,” or  “Error” received from the payment gateway.
Reason Code The message provided by the gateway indicating why the transaction was successful or not. NMI stores a code of 100 for successful transactions.
Gateway ID Corresponds to the Transaction ID in the gateway. Use this field to reconcile your Salesforce transaction records with your gateway’s transaction records.
Gateway Response Contains the entire message received from the gateway and stored in the Salesforce transaction record. This field is helpful when troubleshooting your transactions.

Troubleshooting

If you are having trouble connecting to your gateway, we recommend starting with these troubleshooting steps.

We’ve listed a few of the most common errors below. For additional troubleshooting tips or frequently asked questions about NMI, check out Chargent’s Knowledge Base.

Getting Help

Contacting NMI Support

Please see NMI’s Support Documentation or reach out to NMI’s Support Team for gateway-specific support.

Contacting Chargent Support

Contact our support team if you encounter any issues related to Chargent.