Merchant e-Solutions Payments Salesforce Integration Chargent

Integrating Merchant e-Solutions with Salesforce using Chargent


Merchant e-Solutions is a merchant acquirer and global processor that processes over $17 billion in transactions annually in 150 different global currencies.

Integrating Merchant e-Solutions (MeS) with Chargent gives you the ability to easily build a seamless process for completing payment for orders that you manage in Salesforce. The integration connects the Merchant e-Solutions payment gateway directly to Salesforce. The Chargent integration uses the tokenization of the gateway tokenization for processing credit card payments, but does not currently support ACH/eCheck payments. See Setting Up Salesforce For Integration for additional information on the gateways.

Configuring Merchant e-Solutions for Integration

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

Begin by contacting Merchant e-Solutions to obtain a merchant account and get credentials—for both a sandbox account and a production account.

You should get these two credentials for each account:

  • Profile ID
  • Profile Key

NOTE: You must get gateway credentials from Merchant e-Solutions before moving on to the steps in the next section, Configuring Salesforce For Integration.

Follow these instructions for configuring e-Solutions for integration with Salesforce:

  1. Begin by registering for sandbox account. Click the by clicking Try Now button at

    Merchant e-solution Try Now

  2. Enter all of the information on the Certification Request Form that pertains to your sandbox account (the top of the form is shown in the figure below).

    NOTE: The Chargent integration between Merchant e-Solutions and Salesforce has already been certified by Merchant e-Solutions, but it is still necessary for you to obtain a sandbox account for your own testing needs. There is no official certification process.

    Merchant e-solution Certification

  3. You’ll also need to register for a production account. Click the Sign Up button at

    Merchant e-solution Sign-up

  4. Scroll down to the middle of the Contact Us page to locate the Become a Merchant section, then click the Learn More button.

    Merchant e-solution Sign-up

  5. Enter information in the popup form (see the figure below), then click Submit. Merchant e-Solutions will contact you to complete the merchant application process and provide you with a Profile ID and Profile Key.

    Merchant e-solution Submit

Setting Up Salesforce For Integration

This subsection contains the procedure for setting up Salesforce for the integration with Merchant e-Solutions.


  • 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 Merchant e-Solutions for Integration.

Follow the steps below to configure Salesforce to integrate with Merchant e-Solutions:

  1. Install the Chargent Gateway 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.

    Merchant e-solution 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.

    Merchant e-solution Gateways

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

    Merchant e-solution Record Type

  7. On the Gateway Edit page, enter the Gateway Name, which is an internal Salesforce name that you choose for the gateway.

  8. To test with the Merchant e-Solutions sandbox account, check the Test Endpoint box. (See the figure below.)

  9. Enter the test credentials given to you by Merchant e-Solutions:

    • Merchant ID - the sandbox Profile ID
    • Merchant Security Key - the sandbox Profile Key

  10. Click the Save button. (See the figure below.)

    Merchant e-solution Save Gateway

Testing the Integration

This section contains the procedure for testing the integration set up in Setting Up Salesforce For Integration, using your Merchant e-Solutions sandbox credentials in Salesforce.

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 to the right, in which we show Chargent Orders for the purpose of illustration here.

    Merchant e-solution Chargent Orders

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

    Merchant e-solution New Chargent Orders

  4. For Merchant e-Solutions, these are valid test credit card numbers. Any card may be used without impacting the cardholder account, since all responses are from a simulated authorization system.

    Card Type Length Card Number
    Visa 16 4012301230123010
    MasterCard 16 5123012301230120
    American Express 15 349999999999991
    Discover 16 6011011231231235
    JOB 16 3528288605211810
  5. Address Verification Testing - The values table below can be used if you would like to test all possible Merchant e-Solutions AVS responses. The combination of the Street Address and Zip Code in the request will generate the associated AVS Result Code in the response.

    Street Address ZIP Code AVS Result Code
    123 55555 Y - street and postal code match
    123 999991111 Y - street and postal code match (Visa) X - street and postal code match (MasterCard)
    123 EH8 9ST D - exact match, international
    123 Other Zip A - address match, zip mismatch
    234 Any ZIP U - address unavailable
    345 Any ZIP G - verification unavailable due to international issuer non-participation (Visa and MasterCard only)
    456 Any ZIP R - issuer system unavailable, retry
    235 Any ZIP S - AVS not supported
    Other Address 55555 Z - address mismatch, 5-digit zip match
    Other Address EH8 9ST Z - address mismatch, international zip match
    Other Address 999991111 Z - address mismatch, zip match (Visa) W - address mismatch, zip match (MasterCard)
    Other Address Other ZIP N - address and zip mismatch
  6. CVV Codes - The table below lists the Merchant e-Solutions 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:

    CVV / CVC Value Result Code
    123 M - Match
    234 P - Not Processed
    345 U - Issuer is not certified
    else N - No Match
  7. Amount Driven Response - In addition to testing for approval codes, this table will allow testing for a variety of potential response codes:
    Amount Response Code Auth response text Reason/Description
    0.00 085 "Card OK" For card verification testing, submit a transaction code=A
    0.01 001 "Call" Refer to issuer
    0.02 002 "Call" Refer to issuer - special condition
    0.04 004 "Hold-call" Pick up card (no fraud)
    0.05 005 "Decline" Do not honor
    0.07 007 "Hold-call" Pick up card (fraud)
    0.14 014 "Card No. Error" Invalid card number
    0.15 015 "No Such Issuer" Invalid card number
    0.19 019 "RE Enter" Re-enter transaction
    0.41 041 "Hold-call" Pick up card (fraud: lost card)
    0.43 043 "Hold-call" Pick up card (fraud: stolen card)
    0.51 051 "Decline" Insufficient funds
    0.54 054 "Expired Card" Issuer indicates card is expired
    0.57 057 "Serv Not Allowed" Transaction not permitted to cardholder
    0.59 059 "Suspected Fraud" Do not honor card
    0.84 084 "Invalid Auth" Invalid Authorization Life Cycle
    0.86 086 "Can't Verify P" System is unable to validate the Pin #
    1.00 0TA "CT NOT ALLOWED" Merchant does not accept this type of card
  8. In the Chargent Order Edit page, enter or select information to correctly complete the essential parts of the Chargent Order record, including:

    • Gateway
    • Billing First Name
    • Billing Last Name
    • 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.

    Merchant e-solution Edit Chargent Orders

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

    Merchant e-solution Edit Chargent Orders

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

    Merchant e-solution Chargent Orders Approve

  11. 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 Merchant e-Solutions. See the figure below for an example.

    Merchant e-solution Chargent Orders Approve

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 Merchant e-Solutions:

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 Merchant e-Solutions gateway, a new transaction record is created, which 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).

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 Merchant e-Solutions 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 Merchant e-Solutions, and the Gateway ID field corresponds to the Merchant e-Solutions Transaction ID for use in reconciliation between two systems.

NOTE: Merchant e-Solutions does not provide an online reporting interface for test / sandbox accounts. Online reporting is only available for production accounts.

See the figure below.

Merchant e-solution Transactions

The figure below depicts how the same transaction appears in the Merchant e-Solutions Transactions page:

Merchant e-solution Transactions

Field Mapping

This table contains the mapping information between some key Merchant e-Solutions and Salesforce fields.

Salesforce field Direction Merchant e-Solutiions field
Gateway ID < Transaction ID
Invoice Number > Invoice Number

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 Merchant e-Solutions production gateway account (the productions credentials from Configuring Merchant e-Solutions for Integration).

  2. This includes:

    • Merchant ID = Profile ID
    • Merchant Security Key = Profile Key

  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.


This section contains the procedure for configuring the use of tokens that pass between Chargent and Merchant e-Solutions. Merchant e-Solutions uses a token system to maximize data security.

  1. From the drop-down in the upper-right of the Salesforce page, choose Chargent as the app.

    Merchant e-solution Chargent

  2. Click Gateway tab in Chargent app.

    Merchant e-solution Chargent Tokenization

  3. Click on the Gateway Name that you are using for the integration.

    Merchant e-solution recent gateways

  4. Double-click on the Use Tokenization field, then check the Use Tokenization box.

    Merchant e-solution Chargent Tokenization

  5. Double-click on Credit Card Data Handling field.

    Merchant e-solution Credit Card Data Handling

  6. A drop-down will open, as shown in the figure below. Choose one of the following items from the Credit Card Data Handling drop-down:

    • Never Clear - Chargent will not automatically remove card data.

    • Clear After Successful Charge - Chargent will clear the credit card number, expiration dates, and card security code only after a successful charge occurs for a card.

    • Clear After All Transactions - Chargent will erase the credit card number, expiration date, and card security code after any transaction (Charge, Void, Refund) occurs for a card.

    • Clear When Token Present - Chargent will erase the credit card number, expiration date, and card security code after any transaction (Charge, Void, Refund) for a card only if there is a value in the token field.

  7. Click Save to commit your changes.

    NOTE: After your first successful transaction, the token is stored in the Chargent Token field in Salesforce and the credit card fields are handled according to the choice in the Credit Card Data Handling field.