Integrating Merchant Warrior and Salesforce using Chargent


This guide contains instructions for integrating your environment with the Merchant Warrior payment gateway—using the Chargent payment processing plug-in.

Click a link to go directly to one of these sections:

Connect Merchant Warrior and Salesforce with Chargent

See all Merchant Warrior transactions, manage refunds, send payment links and more, all inside Salesforce with Chargent, the top rated payments app on the Salesforce AppExchange.

Not yet a Chargent customer?

Contact us for a no-obligation 30 day trial, and see for yourself!

Learn More


Merchant Warrior is an Australia based payment provider that offers a range of online payment solutions to merchants worldwide. Merchant Warrior prides itself in establishing and maintaining a healthy relationship with each of its clients, achieving this by working in synergy with its clients to gain insight into their individual requirements and by providing them with a solution that caters wholly to those requirements.

Using the stepwise instructions in this guide, it’s easy to connect Salesforce to the Merchant Warrior gateway with Chargent Payment Processing. Chargent has many features to offer, including automating and streamlining Salesforce payment processes, easy subscription management, click-to-charge buttons, payment request emails, and more.

Integrating Merchant Warrior 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 Warrior gateway directly to Salesforce. Chargent also supports Merchant Warrior gateway tokenization for processing credit card payments. See Configuring Salesforce for Merchant Warrior Integration for additional information on the gateways.

Your Merchant Warrior Sandbox Account

The first task is to get a sandbox / test account from Merchant Warrior so that you can run test transactions from Salesforce.

To request a sandbox account, complete the form on the Test Account Application page.

Merchant Warrior Sandbox

Username and temporary password

Upon approval, you’ll receive an email that contains these testing credentials:

  • User ID
  • Temporary password

From the Merchant Warrior main page, click the Merchant Login button—as shown in the figure below.

Merchant Warrior Login
Login with your username and temporary password, and then continue to the next section.

Need help? Contact Merchant Warrior through the options given on their Support page.

Permanent password

On your first successful login, you’ll get a prompt to enter a permanent password of your own choosing. The password must be:

  • Alphanumeric (contain at least a number and a letter).
  • Different than your last four passwords.
  • At least 6 characters long.

Get your Merchant ID, API Key, and Passphrase

When you log in with your permanent password, you’ll see Merchant Warriot dashboard. Click the Direct API menu item along the left side, as shown in the figure.

Merchant Warrior Direct API
Take note of the three identifying elements on the Direct API page. You will need each of these to configure the gateway connection in Salesforce:

  • Merchant UUID → Merchant ID
  • API Key → Merchant Security Key
  • API Passphrase → Merchant Reference

See the next section, Configuring Salesforce for Merchant Warrior Integration.

Production account: You’ll also need to register for a production account. When you’re ready, use the contact information in the enrollment email messages to work with Merchant Warrior Support and obtain the same set of credentials for your production account.

NOTE: You must get each of these gateway credentials from Merchant Warrior before moving on to the steps in the next section, Configuring Salesforce for Merchant Warrior Integration.

Configuring Salesforce for Merchant Warrior Integration


  • The steps in this section are written with the assumption that Chargent has not already been installed into your Salesforce account.
  • Before moving on to the procedure below, you must successfully complete all of the steps given in the previous section, Obtain a Merchant Warrior Sandbox Account.

Follow the steps below to configure Salesforce to integrate with Merchant Warrior:

  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 at right, select the Chargent item in upper-right corner of Salesforce.
  5. In the upper-left of the Salesforce page, click the Gateways tab, then click the Create New drop-down, and then select Gateway.
    Merchant Warrior Gateways
  6. In the Gateway Record Type panel, select the Merchant Warrior item from the Record Type drop-down, and then click the Continue button.
    Merchant Warrior Select Gateways
  7. On the Gateway Edit page, begin by entering a Gateway Name (such as “Merchant Warrior Test”). This is merely an internal Salesforce name that you choose for the gateway record.
  8. Use the table below for guidance when entering the remaining necessary values for the Gateway Edit page:
    Gateway Page Field Value
    Gateway Name Enter an easily recognizable name for this gateway, such as “Merchant Warrior Test”.
    Merchant ID Merchant Warrior UUID
    Merchant Security Key Merchant Warrior API Key
    Merchant Reference Merchant Warrior API Passphrase
    Test Endpoint Check this box
    Active Check this box

    NOTE: The Merchant Warrior UUID, API Key, and API Passphrase are taken from your Merchant Warrior dashboard. See the section above, Get your Merchant ID, API Key, and Passphrase.

  9. Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.

Testing the Integration

This section contains the procedure for testing the integration that you set up according to the procedure given in Configuring Salesforce for Merchant Warrior Integration, using your Merchant Warrior sandbox credentials.

Follow the steps below to verify 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 Merchant Warrior Integration procedure.

See the figure to the right, which indicates Chargent Orders for the purpose of illustration. (If you installed the Chargent Opportunities or Cases package, you would use that object for testing).

Merchant Warrior All Tabs

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

Merchant Warrior Recent Chargent Orders

  1. As shown on the Merchant Warrior Testing page, these are valid test credit card numbers.
    Card Type Card Number Expiry Date CVN
    MasterCard 123456789012346 05/17 123
    Visa 4987654321098769 05/17 123
    Amex 345678901234564 05/17 123
    Diners Club 30123456789019 05/17 123
  2. For Merchant Warrior, using the following amounts will return the corresponding response.
    Amount Response
    XXX.00 Transaction approved
    XXX.01 Transaction declined – contact issuing bank
    XXX.05 Transaction declined – contact issuing bank
    XXX.10 Transaction could not be processed
    XXX.51 Insufficient credit
    XXX.54 Card has expired
    XXX.68 No reply from Processing Host
    Anything Else Transaction could not be processed
  3. 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 (City, State, Zipcode)
    • Billing Email Address (to get a receipt)
    • Charge Amount (check Manual Charge if this 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 Warrior Chargent Edit Order
  4. Click the Save button to commit the changes on the form. On the next page, click the Charge button (as shown below).
    Merchant Warrior Chargent Charge
  5. 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 Warrior Chargent Status
  6. 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 Warrior. See the figure below for an example.
    Merchant Warrior Chargent Transactions
  7. Note that Merchant Warrior does not currently support Void transactions via Chargent’s void button in Salesforce. The Refund button should be used if needed to reverse transactions.

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

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 Warrior gateway, a new transaction record is created in Salesforce. 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.

On the order page, scroll down to that Transactions section and 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 Warrior sends in its response, including transaction Type (Charge, Authorize, Refund or Void), the Response Status (Approved, Declined, Error), and any related approval or error messages.

Merchant Warrior Chargent Transaction Details

Verifying Transactions in the Merchant Warrior Dashboard

You can compare the transaction records in Salesforce with the records in your Merchant Warrior dashboard. Login to Merchant Warrior, and then click Reports > Transaction Summary. See the figure below.

Merchant Warrior Chargent Transaction Summary
Click anywhere on the transaction row to see all details for that transaction.

Merchant Warrior Chargent Transaction Information

Correspondence in the Transaction Fields

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

This table contains the mapping information between Merchant Warrior and Salesforce fields.

Salesforce field Direction Gateway field
Gateway ID < Transaction ID
Invoice Number > Transaction Product

Moving to Production

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

NOTE: It’s important that you do not proceed here until the testing procedure described in Testing the Integration is successful.

  1. First, obtain the production credentials for the Merchant Warrior production gateway account (similar to the method given for sandbox credentials in Obtain a Merchant Warrior Sandbox Account.
  2. Get these production credentials from your enrollment email message:
    • User ID
    • Password
  3. Repeat the steps in the Configuring Salesforce for Merchant Warrior Integration section above, but substitute the production credentials.
  4. Repeat the steps in the Testing the Merchant Warrior Integration section above with respect to the SalesForce production environment, using the production credentials. Uncheck the “Test Endpoint” checkbox to send transactions to production.
  5. Be sure to successfully transmit at least one real credit card transaction using company or personal accounts. We recommend that you submit a transaction with a very small amount and then void that transaction afterwards. This ensures that the system works with your production credentials.


Chargent supports Merchant Warrior tokenization for credit card transactions. This section contains the procedure for configuring the use of tokens that pass between Chargent and Merchant Warrior. Tokens are used to improve security by replacing account numbers in Salesforce, and referencing the data securely stored at Merchant Warrior.

    1. From the drop-down in the upper-right of the Salesforce page, choose Chargent as the app.
      Merchant Warrior Tokenization Chargent
    2. Click Gateway tab in Chargent app.
      Merchant Warrior Tokenization Gateways
    3. Click on the Gateway Name that you are using for the integration.
      Merchant Warrior Tokenization Recent Gateways
    4. Double-click on Credit Card Data Handling field.
      Merchant Warrior Tokenization Credit Card Handling
    5. 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.

      Merchant Warrior Tokenization Credit Card Handling
    6. 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.