Integrating Merchant e-Solutions with Salesforce using Chargent
Easily connect MerchantE and Salesforce with Chargent,the leading payments app on the Salesforce AppExchange. See all MerchantE transactions, manage refunds, send payment links and more, all inside Salesforce.
Contact us for a no-obligation 30 day trial, and see for yourself!
- Configuring MerchantE for Integration
- Setting Up Salesforce to Connect with MerchantE (Merchant e-Solutions)
- Add a Merchant e-Solutions Gateway record in Salesforce using Chargent’s Gateway Wizard.
- Add a Merchant e-Solutions Gateway record in Salesforce (Chargent versions prior to 5.40)
- Testing the Integration
- Sending Live Transactions from a Salesforce Sandbox
- Understanding Transactions
- Field Mapping
- Going Live
- Unmatched Credits for Credit Cards
MerchantE (Formerly Merchant e-Solutions) is a merchant acquirer and global processor that processes over $17 billion in transactions annually in 150 different global currencies. MerchantE is owned by Cielo S.A., Latin America’s leader in electronic payment solutions.
Using MerchantE 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 MerchantE payment gateway directly to Salesforce. Chargent uses the tokenization of the gateway for processing credit card payments, but does not currently support ACH/eCheck payment.
Configuring MerchantE for Integration
In this section and the next, you’ll find the procedures for configuring the integrations for both Merchant e-Solutions and Salesforce.
Begin by contacting MerchantE to obtain a merchant account and get credentials—for both a sandbox account and a production account.
Complete the form and click the Register button at the bottom of the page. Once you’re approved you will receive a Profile ID that will allow you to send test transactions to a test environment.
Under Step 1 Sign Up click on the Sign Up button below the Production option.
- Scroll down to the Become a Merchant section and click Learn More
- Fill in all the information completely and press Submit.
You should get the following two credentials for each account in an email from MerchantE. (The email could take 24 hours to receive).
- Profile ID
- Profile Key
Setting Up Salesforce to Connect with MerchantE (Merchant e-Solutions)
Prior to setting up Merchant e-Solutions in Salesforce
Once you have your Profile ID and Profile Key from Merchant e-Solutions you can install and configure Chargent.
- Install Chargent Packages into your Salesforce org.
- Configure Chargent according to the Quick Start Guide.
Add a Merchant e-Solutions Gateway record in Salesforce using Chargent’s Gateway Wizard.
- Click on the App Launcher on the top left side in Salesforce.
- Select Chargent as the App
- Select the Chargent Settings Tab
- Choose Chargent Setup Wizard
- Do you have a Payment Gateway account - Select Yes
- Select Merchant e-Solutions as your Payment gateway.
- Select Test Transactions for testing or Live Transactions if you are looking to process real payments.
- Follow the prompts to configure your gateway.
Add your credentials based on your Sandbox (Test) or Production Live MerchantE account.
- Profile ID: This is your Profile ID from the email your received from MerchantE
- Profile Key: This is the Profile Key from the email you received from MerchantE
Other information that will be asked:
- Will you be using tokenization? (recommended)
- What currency will you be using? (AUD, USD, etc.)
- What payment methods will you be accepting?
- Credit cards and/or ACH (Chargent and MerchantE currently do not support 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
Add a Merchant e-Solutions Gateway record in Salesforce (Chargent versions prior to 5.40)
- Click on the AppLauncher on the top left side in Salesforce.
- In the Search for apps or items box, Search for Gateways and select
- Click New and select Merchant e-Solutions as the Gateway Type
- Map the following fields in Chargent with your credentials from Merchant e-Solutions:
- Merchant ID: This is your Profile ID from the email your received from MerchantE
- Merchant Security Key: This is the Profile Key from the email you received from MerchantE
- Check the Active box - To make the Gateway active
- Use Tokenization - If you are planning on using MerchantE tokenization (recommended)
- 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 Electronic Check? (Chargent and MerchantE currently do not support ACH / Electronic Check)
- 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.
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 capture them.
- 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
- Show Charge Button
- Show Authorize Button
Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.
Testing the Integration
Now that you have created the Merchant e-Solutions 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
- Click on the App Launcher in the top left side and select Chargent as the App.
- Click the Chargent Orders Tab.
- Click on New
- 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.
- 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 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 MerchantE test credit card information. MerchantE uses different test credit card numbers to determine the response message and whether it’s approved or declined for specific reasons.
- Card type (Visa, MasterCard, etc..)
- Card Expiration Month and Card Expiration Year should be in the future
You should receive a popup that shows the test transaction was approved.
MerchantE Test Credit Cards
|Card Type||Length||Card Number|
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|
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|
Amount Driven Response - In addition to testing for approval codes, this table will allow testing for a variety of potential response codes:
|Auth response text||Reason/Description|
|"Card OK"||For card verification testing, submit a transaction code=A|
|"Call"||Refer to issuer|
|"Call"||Refer to issuer - special condition|
|"Hold-call"||Pick up card (no fraud)|
|"Decline"||Do not honor|
|"Hold-call"||Pick up card (fraud)|
|"Card No. Error"||Invalid card number|
|"No Such Issuer"||Invalid card number|
|"RE Enter"||Re-enter transaction|
|"Hold-call"||Pick up card (fraud: lost card)|
|"Hold-call"||Pick up card (fraud: stolen card)|
|"Expired Card"||Issuer indicates card is expired|
|"Serv Not Allowed"||Transaction not permitted to cardholder|
|"Suspected Fraud"||Do not honor card|
|"Invalid Auth"||Invalid Authorization Life Cycle|
|"Can't Verify P"||System is unable to validate the Pin #|
|"CT NOT ALLOWED"||Merchant does not accept this type of card|
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).
When a transaction occurs between Chargent and the Merchant e-Solutions gateway, a new transaction record is created, which can be found under the Related section of the Chargent Order page.
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: MerchantE does not provide an online reporting interface for test / sandbox accounts. Online reporting is only available for production accounts.
See the figure below.
The figure below depicts how the same transaction appears in the Merchant e-Solutions Transactions page:
This table contains the mapping information between some key MerchantE and Salesforce fields.
|Salesforce field||Direction||Merchant e-Solutions field|
|Gateway ID||<||Transaction ID|
|Invoice Number||>||Invoice Number|
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.
- First, obtain the production credentials for the Merchant e-Solutions production gateway account (the productions credentials from Configuring Merchant e-Solutions for Integration).
- Profile ID
- Profile Key
- Add a Merchant e-Solutions Gateway record in Salesforce using Chargent’s Gateway Wizard
- Add a Merchant e-Solutions Gateway record in Salesforce (Chargent versions prior to 5.40)
NOTE: Remember to void the transaction after testing, if you are using a real credit card and want to prevent the charge from settling.
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 tokenization for MerchantE. Tokens are a random string of letters and numbers that can be stored in Salesforce and used in place of the credit card for future transactions. Tokenization reduces the scope of PCI compliance by allowing credit card information to be cleared from Salesforce after processing a transaction.
If you haven’t already setup tokenization in Salesforce during the initial configuration of your MerchantE account in Salesforce, this section will assist you in setting it up. Merchant e-Solutions uses a token system in order to maximize security of credit card data.
- In the top left corner click on the App Launcher
- Search and select Gateways
- Click on Merchant e-Solutions
- Click Edit
- Check the box that Says Tokenization
- Under the Credit Card / Bank Account handling field choose one of the following.
- Never Clear
- Clear After Successful Charge
- Clear After All Transactions
- Clear When Token is Present (recommended)
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.
Unmatched Credits for Credit Cards
Chargent’s integration with Merchant e-Solutions has the ability to issue Unmatched Credits to a credit card. An Unmatched Credit is when you are refunding a transaction to a different credit card than the original one used in the initial transaction. This can also be used to send money to a credit card, without a matching transaction normally required for refunds.
To create an unmatched refund you will need to do the following:
- Create a new Chargent Order
- Make sure the Charge Amount is a negative amount
- Select Payment Method Credit Card
- Enter in the credit card details including Billing First Name and Billing Last Name. (for testing in the Sandbox you can use Visa with a credit card number 4111 1111 1111 1111)
- Press the Charge button
- Enter the CVV code and press Charge
This sends a negative amount to MerchantE which will issue a credit to the credit card you designate.
When testing initially, you should ensure that the credit is showing up correctly in your MerchantE account.
Note: If there is an existing token present you want to remove the token in order to process the refund to a different credit card. Chargent recommends creating a new Chargent Order and associate it with the Account record. This will allow you to keep the original Chargent Order and token in tact for future charges on the existing Chargent Order.