Realex Payments Salesforce Integration Chargent

Integrating Realex (now Global Payments) with Salesforce using Chargent

Easily connect Global Payments (formerly Realex)and Salesforce with Chargent,

the leading payments app on the Salesforce AppExchange. See all Realex transactions, manage refunds, send payment links and more, all inside Salesforce.

Not yet a Chargent customer?
Contact us for a no-obligation 30 day trial, and see for yourself!

This guide contains instructions for integrating your environment with the Realex payment gateway—recently rebranded Global Payments -- using the Chargent payment processing plug-in.

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


Realex Payments, a division of Global Payments Inc., is one of Europe’s leading providers of ecommerce payment solutions. Realex works with thousands of small to medium-sized businesses to enable them to scale their online business and expand their international reach. Over the past 16 years, Realex has established a strong reputation in the industry and amongst our customers for ecommerce expertise, payments knowledge, and dedication to excellent customer service.

Realex Payments was acquired by Global Payments Inc. in March 2014. In 2018, the Realex name was changed to Global Payments.


Using the step by step instructions in this guide, it’s easy to connect Salesforce to the Realex Payments gateway with the Chargent app. 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 Realex 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 Realex gateway directly to Salesforce. Chargent also supports Realex gateway tokenization for processing credit card payments. See Configuring Salesforce for Realex Integration for additional information on the gateways.

Prior to setting up Realex in Salesforce

  1. Install both the Base Package and the Chargent Orders Transaction Package of Chargent into your Salesforce org.

  2. Configure Chargent according to the Quick Start Guide.

For Chargent versions prior to 5.57 you may need to activate the Remote Site Settings in Salesforce if they aren’t already active for Realex.

  • Click the gear icon on the top right and select Settings
  • Under Security select Remote Site Settings
  • Locate RealexPayment and click edit
  • Check the Active box
  • Click Save

Your Realex Sandbox Account

The first task is to get a sandbox / test account from Realex so that you can run test transactions from Salesforce. To being the process for obtaining a sandbox account, complete the form on the sign up page


Username and temporary password

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

  • User ID
  • Temporary password

Click the link in the email to go to the test test login page.

Login with your username and temporary password, and then follow the prompts to change your password.

Need help? Contact Realex 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. Take note of any restrictions on the required strength of the password.


Keep in mind that Realex may need to whitelist Salesforce IP addresses for your account.

Setting up Realex / Global Payments in Salesforce

Add a Realex Gateway record in Salesforce using Chargent’s Gateway Wizard.

  1. Click on the App Launcher 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. chargent

  7. Do you have a Payment Gateway account - Select Yes

  8. Select Realex as your Payment gateway.

  9. Select Test Transactions for testing or Live Transactions if you are looking to process real time payments.

  10. Follow the prompts to configure your gateway.

You will need the following information:

  • Add your credentials based on your Sandbox (Test) or Production Live Realex account.

    • User Name: This is your Realex Merchant ID

    • Shared Secret and Refund Password:: This will be your Secret Key and Refund Password joined together with an @ symbol (ex: if your Secret Key is ‘mycompany’ and your Refund Password is ‘12345abcd’, then this field would be mycompany@12345abcd).

Other information that will be asked:

  • Will you be using tokenization? (recommended)

  • What currency will you be using? (USD, CAD, etc..)

  • 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 Realex Gateway record in Salesforce (Chargent versions prior to 5.40)

  1. Click on the AppLauncher on the top left side in Salesforce.

  2. aplauncher

  3. In the Search for apps or items box, Search for Gateways and select

  4. gateways

  5. Click New and select Realex as the Gateway Type

  6. Map the following fields in Chargent with your credentials from Realex:

    • Merchant ID: Realex Merchant ID

    • Merchant Security Key: This will be your Secret Key and Refund Password joined together with an @ symbol (ex: if your Secret Key is ‘mycompany’ and your Refund Password is ‘12345abcd’, then this field would be mycompany@12345abcd).

  7. Setup the following Gateway fields

    • Check the Active box - To make the Gateway active

    • Use Tokenization - If you are planning on using Realex 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 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)

      • new gateways

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

    • card types

    • Show Charge Button
    • Show Authorize Button

    • PR


Now that you have created the Realex 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

  1. Click on the App Launcher in the top left side and select Chargent as the App.

  2. app chargent

  3. Click the Chargent Orders Tab.

  4. Click on New

  5. 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 (ACH or direct debit)

    • 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 Realex test credit card information. Realex 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..) or Bank Account Type for ACH (Checking or Savings).

    • Card Expiration Month and Card Expiration Year should be in the future

    • order

  6. Click Save

  7. Click the Charge button. You will receive a pop-up asking for the CSC (Card Security Code). This can be any 3 digits for Visa, MasterCard or Discover or 4 digits for American Express when testing in the Sandbox.

  8. charge

  9. Press the Charge button

  10. You should receive a popup that shows the test transaction was approved.


Realex / Global Payments Test Credit Cards

Card Type Card Number Comments
Visa 4263970000005262 Successful
Visa 4000120000001154 Declined
Visa 4000130000001724 Referral A
Visa 4000160000004147 Referral B
Visa 4009830000001985 Comms Error
Mastercard 5425230000004415 Successful
Mastercard 5114610000004778 Declined
Mastercard 5114630000009791 Referral A
Mastercard 5121220000006921 Referral B
Mastercard 5135020000005871 Comms Error
American Express 374101000000608 Successful
American Express 376525000000010 Declined
American Express 375425000000907 Referral A
American Express 343452000000306 Referral B
American Express 372349000000852 Comms Error
3D Secure 4012001038443335 Cardholder Not Enrolled ECI 6 **
3D Secure 4012001038488884 Unable to Verify Enrolment ECI 7 **
3D Secure 4012001036298889 Invalid response from Enrolment Server ECI 7 **
3D Secure 4012001036853337 Enrolled but invalid response from ACS ECI 7 **
3D Secure 4012001037141112 Successful Authentication ECI 5 **
3D Secure 4012001037167778 Authentication Attempt Acknowledged ECI 6 **
3D Secure 4012001037461114 Incorrect Password entered ECI 7 **
3D Secure 4012001037484447 Authentication Unavailable ECI 7 **
3D Secure 4012001037490006 Invalid Response from ACS

Refunds and Rebates with Realex

Realex Payments offers two types of transaction refunds, refunds and rebates. Rebate is the default type, and will refund money to the same credit card for the initial transaction. The refund amount limit for a rebate is 115% of the original transaction value.

If you want to refund any amount of money to any credit card, choose the refund type. This is available in the custom settings. In the Chargent Settings tab, click the Advanced Settings tab and then check the box for Use RealEx Rebate Method.

refunds chargent

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

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 Realex gateway, a new transaction record is created in Salesforce. The listing of transactions can be found in the Transaction section under the Related section of the Chargent Order.

On the Chargent Order page, click the Related tab, and select a Transaction ID link to see the details, as shown in the figure below. This transaction record contains the entire set of data that Realex 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.

trx electronic

Verifying Transactions in the Realex Dashboard

You can compare the transaction records in Salesforce with the records in your Realex dashboard. Login to the Realex test portal and click the Batched link at the top. See the figure below.


You’ll see a transaction listing similar to this one.

test bank

Locate the transaction of interest in the listing, and click on the transaction row, then click again on the item of interest on the next page to see the details for that transaction.

transaction detail

Correspondence in the Transaction Fields

The Salesforce Gateway ID is the Realex Pas Ref combined with the Realex Order ID, with an underscore between them.

Moving to Production

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

Get your Production Credentials

In the same email that contains your credentials you also find a Shared Secret and Refund Password, merged by a "@" symbol (for example, “secret@refund) This is the value for Merchant Security Key in Salesforce.

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 Realex Support and obtain the same set of credentials for your production account.

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

Follow these steps to configure the production in Salesforce:

  1. First, obtain the production credentials for the Realex production gateway account (similar to the method given for sandbox credentials in Obtain a Realex Sandbox Account.

  2. Get these production credentials from your enrollment email message(s):

  3. User ID
    • Password
    • Realex Shared Secret and Refund Password, merged by a "@" symbol. For example, “secret@refund". This will be the Merchant Security Key in Salesforce.

  4. Repeat the steps in above, but substitute the production credentials

  5. Repeat the steps in the Testing the Realex Integration section above with respect to the SalesForce production environment, using the production credentials

  6. Void a transaction: If you’re using an actual credit card and want to prevent the charge from settling, remember to void the transaction after testing.

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

Refunds vs Rebates in Realex

Realex has two refund modes. Refunds for transactions that are more than 60 days. This will allow you to refund a credit card that is not attached to the original transaction. Rebates will have the original transaction and the Auth ID. It would only be available for transactions up until 60 days. After 60 dates you would need to issue a Refund.

With both you have to append a refund/rebate password in the gateway record setup, to be entered in the Merchant Security key field with "@" character separator - example: secretkey@refundpassword


You will also need to check the box in your Chargent Settings (under Advanced Settings) to allow you to use Realex Rebate Method.

rebate method

Rebates are available in 4.92 or later. If you receive an error stating missing required field "Auth ID" you want to update your Chargent Package

Correspondence in the Transaction Fields

This table contains the mapping information between the gateway and Salesforce fields.

Salesforce field Direction Gateway field
Gateway ID < First part of the Pass Ref field plus 2nd part of the Order ID at top of Realex detail page
Gateway ID > 2nd part of the Order ID at top of Realex detail page
Gateway ID > Date/Time in listing