Paysafe Salesforce Integration Chargent

Integrating Paysafe with Salesforce using Chargent

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

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


Paysafe, formerly known as Optimal Payments Netbanx, offers a full suite of credit and debit card functionality to meet all your card-processing needs. With a single integration you can process a complete range of card requests, including authorizations/purchases, settlements, refunds, card verifications, standalone credits, and more. All card payment requests are protected by Paysafe’s airtight risk- and fraud-management services.


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

Your Paysafe Sandbox Account

The first task is to get a sandbox / test account from Paysafe 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.

Paysafe Sandbox

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 login page:

Paysafe Netbanx

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

Need help? Contact Paysafe 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.

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

Configuring Salesforce for Paysafe 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 Paysafe Sandbox Account.

Follow the steps below to configure Salesforce to integrate with Paysafe:

  1. Install the Chargent Base Package into Salesforce, as we describe on the Chargent Installation page.

  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.

    Paysafe Gateways

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

    Paysafe Gateway Netbanx

  7. On the Gateway Edit page, begin by entering a Gateway Name (such as “Paysafe Test”). This is merely an internal Salesforce name that you choose for the gateway.

  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 “Paysafe Test”.
    Merchant ID Account Number
    Merchant Reference Store ID
    Merchant Security Key Store Password
    Active Check this box

    NOTE: An actual Paysafe Merchant Security Key is taken from your Paysafe introductory email message. See the section above, Get your Merchant Security Key.

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

    Paysafe Gateway Detail

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 Paysafe Integration, using your Paysafe 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 Paysafe 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).

    Paysafe Testing All Tabs

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

    Paysafe Chargent Order New

  4. As shown on the Paysafe Test Cards page, these are valid test credit card numbers.

    Card Type Card Number 3D Secure Enabled Issuing Country
    Visa 4530910000012345 X CA
    Visa 4510150000000321 X CA
    Visa 4500030000000004 YES CA
    Visa 4003440000000007 YES CA
    Visa 4515031000000005 YES CA
    Visa 4538261230000003 YES CA
    Visa 4037112233000001 X US
    Visa 4037111111000000 YES US
    Visa 4107857757053670 YES UK
    Visa Debit 4724090000000008 X CA
    Visa Debit 4835641100110000 YES CA
    Visa Debit 4900880000000008 YES US
    Visa Debit 4900770000000001 X US
    Visa Debit 4206720389883775 YES UK
    Visa Debit 4206720389883775 YES UK
    Visa Electron 4917480000000008 X UK
    Visa Electron 4917484589897107 X UK
    Mastercard 5191330000004415 X CA
    Mastercard 5457490000008763 X CA
    Mastercard 5411420000000002 YES CA
    Mastercard 5258110000000005 YES CA
    Mastercard 5192810000000009 YES CA
    Mastercard 5100400000000000 X US
    Mastercard 5200400000000009 YES US
    Mastercard 5186750368967720 YES UK
    Mastercard Debit (Maestro) 6277411477100000 YES CA
    Mastercard Debit (Maestro) 6277411477200002 X CA
    Mastercard Debit (Maestro) 5036150000001115 X US
    Mastercard Debit (Maestro) 5036160000001114 YES US
    Mastercard Debit (Maestro) 5573560100022200 YES UK
    Mastercard Debit (Maestro) 6759950000000162 X UK
    American Express 373511000000005 X CA
    American Express 373522010100107 YES CA
    American Express 370123456789017 X US
    American Express 370123456789116 YES US
    American Express 375529360131002 X Ireland
    Discover 6011234567890123 X US
    JCB 3569990000000009 X Japan
  5. See the Paysafe Credit Card Response page to see which codes will generate various approved and declined transactions for each credit card type. You can trigger an error by varying the numbers in the cents value in the Charge Amount field. For example, a charge amount of $2.34 will cause an Error 3015 response code.

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

    Paysafe Chargent Order

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

    Paysafe Charge

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

    Paysafe Transaction Complete

  9. 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 Paysafe. See the figure below for an example.

    Paysafe Chargent 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 Paysafe :

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

The Gateway ID in the Chargent Transaction record in Salesforce will correspond to the Txn ID and Conf. No. in Paysafe Netbanx, for purposes of reconciliation.

Paysafe Chargent Transaction Detail

Verifying Transactions in the Paysafe Dashboard

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


Set the Start Date and End Date and click the Generate button.

Locate the transaction of interest in the listing, and click anywhere on the transaction row to see all details for that transaction.

Paysafe Account Information

Moving to Production

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

Get your Production Credentials

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 Paysafe Support and obtain the same set of credentials (Account Number, Store ID, Store Password) 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 Paysafe production gateway account (similar to the method given for sandbox credentials in Obtain a Paysafe Sandbox Account.

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

    • Account Number
    • Store ID
    • Store Password

  3. Repeat the steps in the Configuring Salesforce for Paysafe Integration section above, but substitute the production credentials.

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

    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.

  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.