Table of Contents

Chargent Documentation

Gateway Setup and User Guides

Using the Gateway Setup Wizard

Note: The Chargent Gateway Wizard is available in Chargent 5.50 and later versions.

After installing both Chargent Base and Chargent Transaction packages and assigning your users, you should set up the connection to your payment gateway. AppFrontier integrates with over 30 payment gateways.

Setup your Gateway using the Chargent Setup Wizard.

  1. Click on the AppLauncher 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. Follow the prompts to configure your gateway

chargent settings

You will need the following information to configure the gateway:

  • What Gateway you will be using
  • Test Login / Live Login credentials - (If you are looking to do live tests from your Salesforce Sandbox you will need to also use the Endpoint Override URL)
  • Will you be using Tokenization (recommended)
  • What currency will you be using
  • What Payment Methods will you be accepting?

Gateway Wizard Errors

If you receive an error message stating "Credentials you provided are not valid. Please check and try again." this means one of these things:

  1. Your gateway credentials are invalid or expired, please check them again.
  2. You are using test credentials setting up a live gateway.
  3. You are using live credentials setting up a test gateway.
  4. The Remote Site Settings for your payment gateway are not active. Go to Setup > Remote Site Settings, locate the URL(s) related to your gateway, and make sure the Active checkbox is checked.


Gateways and Guides



Merchant ID

Merchant Security Key

Merchant Reference

Transaction Security Key

Adyen Setup Guide
AstroPay Web Pay Status Merchant Id Secret Key Web Pay Status Merchant Password N/A Setup Guide API Login ID Transaction Key N/A N/A
Linked2pay Setup Guide Login Name Web Services Key N/A Virtual Terminal name
Barclaycard ePDQ ePDQ PSPID Password UserID (of API user) N/A
BluePay Setup Guide Account ID Secret Key N/A N/A
BlueSnap Setup Guide API Username API Password N/A N/A
Braintree Setup Guide Merchant ID Private Key Public Key N/A
Chase Paymentech Setup Guide Web Pay Status Merchant Id N/A N/A N/A
Cybersource Setup Guide Merchant ID Merchant Admin Password N/A Transaction Security Key
eProcessing Network Account Number RestrictKey N/A N/A
eWAY Setup Guide API Key Password N/A N/A
Ezidebit Setup Guide Digital Key Digital Key N/A N/A
Fat Zebra Setup Guide User ID Password N/A N/A
Forte Setup Guide Account ID Location ID API Key Secure transaction Key
iATS Payments Setup Guide User ID (Agent Code) Password N/A N/A
Merchant e-Solutions Setup Guide Profile ID Profile Key N/A N/A
Merchant Warrior Setup Guide UUID API Key API Passphrase N/A
ModusLink Setup Guide User ID Password Entity ID N/A
Moneris Setup Guide Store ID API Key N/A N/A
NMI Setup Guide Username Password N/A N/A
PayPal Payflow Pro Setup Guide Merchant Login Password Partner N/A
Paysafe (formerly Optimal Netbanx) Setup Guide Account Number Store Pwd Store ID N/A
PayTrace Setup Guide Username Password N/A N/A
PayU Latam Merchant ID API Key API Login (& Account ID in Username field) N/A
Realex Payments Setup Guide Merchant ID Shared Secret and Refund Password, merged by a "@" symbol. Example: secret@refund N/A N/A
SecureCo MerchantAccountID Bearer Token N/A N/A
Stripe Setup Guide (test or live) Secret Key (test or live) Secret Key N/A N/A
USAePay Setup Guide Key PIN N/A N/A
Worldpay (Vantiv / Litle) Setup Guide Username Password Merchant ID N/A
  1. Setup the following Gateway fields

    • Check the Active box - To make the Gateway active
    • Use Tokenization - If you are planning on using tokens (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 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)

When using Payment Requests or Payment Console the following should also be set.

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

  • Show Charge Button
  • Show Authorize Button



For more information on testing and test card numbers for each gateway, please refer to the linked Gateway guides in the table above, and see our Testing Chargent section below.


Track Field History

Salesforce's Track Field History feature provides a useful audit trail for reviewing or troubleshooting past changes. Changes to tracked fields are displayed in the History related list. You can track up to 20 fields per standard or custom object, and the data is retained for 18 months.

AppFrontier recommends that you enable history tracking on key fields on both the Chargent Order and Transaction for auditing purposes. This way you will be able to review when a field was updated, and its before and after values, should there be questions in the future.

chargent order

Enabling History Tracking

  1. Click the gear icon gear icon and choose Setup

  2. Select the Object Manager tab
  3. Select Chargent Order
  4. Click Fields & Relationships
  5. Click the Set History Tracking button

  6. setup

    Note that if you have not previously enabled history tracking, the button may say Enable History Tracking, and you will need to check a box to enable it on the following screen

  7. Select the fields you wish to track
  8. Click Save

  9. field history

You may also need to add the Field Tracking History to the Page Layout as a Related List.

  1. Click the gear icon and choose Setup
  2. Select the Object Manager tab
  3. Select the object you want to track fields (recommended fields on the Chargent Order are listed below).
  4. Click Page Layouts
  5. Click the Page Layout that you want to add Field Tracking History.
  6. Under Related Lists drag the Field Tracking History to the Page Layout.
  7. Click Save

The 20 fields you will want to track will depend on your organization and how you are using Chargent. If you are doing ACH instead of Credit Card transactions, for example, you will want to select the bank fields, and if you are not doing recurring transactions you may not wish to select those fields. You may also wish to track other standard or custom fields on an object that may be unrelated to Chargent, which will reduce the number of Chargent fields you can track.
Here are our starting recommendations for Chargent fields to track:

Chargent Order Object

  • Total
  • Charge Amount
  • Manual Charge
  • Billing First
  • Billing Last
  • Billing Address
  • Billing Email
  • Card Name
  • Card Number
  • Card Expiration Month
  • Card Expiration Year
  • Charge Date
  • Payment Frequency
  • Payment Method
  • Payment Status
  • Payment Start Date
  • Payment Stop

Transaction Object

  • Amount
  • Recurring
  • Type
  • Response Status

Note that most fields on the Transaction record should not be edited, and users may not have permissions to change fields depending on how you have configured Chargent.

Process Builder and Validation Rules

Please be very cautious if you use the Process Builder, Validation Rules or Required fields on your Chargent Orders with recurring billing. Validation rules can prevent the Chargent Order from saving properly after a transaction occurs, which prevents the Transaction from being properly saved to the parent Chargent Order.

Because Recurring transactions run in a batch you would see the errors in the Apex Jobs monitoring page in Salesforce, and in emails to the Chargent Admin Email Address as configured in the Chargent Settings Tab..

Certain validation rule problems can result in duplicate transactions, so please be sure to test any validation rules in Sandbox prior to deployment. Contact us for additional assistance.

Gateway Emulation

If your gateway is not listed it may be supported via the emulator. Please see our list of supported gateways on our Gateways page. If your gateway is supported using the emulator you will want to also make sure the endpoint override is added to the Remote Site settings.

  1. Click the gear icon and choose Setup in Salesforce
  2. In the search window enter Remote Site
  3. Click the New Remote Site button on the top
  4. Enter the following

    • Remote Site Name (this is generally your gateway name)
    • Remote Site URL (this is the Endpoint Override you would have used in setting up your gateway).

Gateway Fields

Active: Enables a Gateway record to be used, in the same way that other parts of Salesforce have an Active checkbox. You may wish to have multiple gateway records, especially if you have a separate test account, and keep some deactivated.

Test Endpoint: Test Endpoint sends transactions to a separate test server or sandbox environment, which cannot be used for live transactions. We recommend testing with Test Endpoint checked and your test credentials, until you are ready to capture live transactions.

NOTE: If Chargent is installed in a Salesforce Sandbox, for security purposes all transactions are sent to the test endpoint, whether or not this field is checked.

Endpoint Override: This field enables you to enter a custom URL to send transactions to. It is primarily used for payment gateways that run emulation on their own server URLs. It is also required if you want to send live transactions from a Salesforce sandbox account, as a final step in your testing. For security purposes, Chargent sends all transactions to the test account from Salesforce sandboxes, regardless of whether "Test Endpoint" is checked or not. Note that for Endpoint Override to work, the domain must be added under Salesforce's Remote Site Settings first.

Debug: Debug can be useful for troubleshooting and verifying the values being sent to the payment gateway, but should only be enabled temporarily. It displays the complete XML or HTTPS request that is being sent to the server and response strings in the popup window when you click the appropriate button on your screen (Charge, Authorize, etc.). Note: This feature should only be used by System Administrators or trusted users as it may contain decrypted payment data!

Require AVS: prevents the transaction from being submitted to the gateway without billing address fields being populated. Generally AVS settings are controlled through your payment gateway, but this will prevent Chargent from sending the transactions at all if the address data is not present in Salesforce.

Require Card Security Code: The Card Security Code (CSC, or CVC) is required when processing a charge using the Charge button. When you charge a transaction you will have a pop-up requesting a CVC code. If the Require Card Security Code is checked, then you must enter in a CVC in the pop-up otherwise you will receive a message saying it’s required.

Note: This is only when using the Charge button and does not affect Recurring Billing.

Use Tokenization: should be checked in gateways that support it if you wish to use stored tokens. If checkbox is unchecked, credit card numbers will be used for transactions.

Accounting Seed Integration: enables the integration with the Accounting Seed accounting software for Salesforce when checked.

Gateway Response: Stores the entire response from the gateway. The same data that debug mode shows in a popup, but the credentials and credit card data is masked.

Credit Card Handling: Allows you to choose if/how credit card data is stored in different scenarios. For PCI Compliance reasons, many customers do not wish to store credit card data. The options are as follows:

  • Never Clear: Chargent will not remove any card data automatically.
  • Clear After Successful Charge: Chargent will clear the credit card number, expiration dates and card security code only after a successful charge is run.
  • Clear After All Transactions: The credit card number, expiration date and card security code will be erased after any transaction (Charge, Void, Refund)
  • Clear When Token Present: Only when a token is present in the token field, will the credit card number, expiration date and card security code be cleared. (Recommended)

Multiple Gateways

Chargent supports multiple active gateways. If only one gateway is active, it will be used for each payment transaction. With multiple gateways active, you will need to populate the Gateway lookup field with the desired gateway record for each Chargent Order record..

Many customers use Chargent's multiple gateway functionality to keep payments for different business entities separate while using a single Salesforce account, or for supporting multiple geographies / currencies that might require multiple payment gateways.