Integrating PayTrace with Salesforce using Chargent
This guide contains instructions for integrating your Salesforce.com environment with the PayTrace payment gateway—using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
- Obtain a PayTrace Sandbox Account
- Configuring Salesforce for PayTrace Integration
- Setting up PayTrace with the Gateway Setup Wizard
- To Manually Setup Your Gateway
- Testing the PayTrace Integration
- Sending Live Transactions from a Salesforce Sandbox
- Understanding Transactions
- Correspondence in the Transaction Fields
- Going Live
PayTrace Inc. is motivated by the challenge of delighting merchants. They empower sales partners by offering high value SaaS technology solutions to businesses. Processing over $22B annually, PayTrace is committed to delighting merchants with 5-star service while providing comprehensive, easy to use payment solutions that lower processing costs and increase security.
Using the step-by-step instructions in this guide, it’s easy to connect Salesforce to the PayTrace 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 PayTrace 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 PayTrace gateway directly to Salesforce.
Obtain a PayTrace Sandbox Account
The first step is to get a test account from PayTrace so that you can run test transactions from Salesforce.
To request a sandbox account, complete the form on the Sandbox Account Request page.
Upon approval, you’ll receive an email that contains these testing credentials:
- Temporary Password to confirm the account
Once you have confirmed your PayTrace account you need to make yourself an API User. The sandbox account currently defaults to Web User so you can only do web transactions.
- Login to PayTrace
- Select Users
- Make sure you select yourself as the User
- Change to API User instead of Web User
Note: Changing this will no longer allow you to access the Sandbox account via your web browser. It will however allow you to use the API integration with Chargent through Salesforce. Contact PayTrace if you need this switched back for some reason although switching it back will break the integration.
Production account: You’ll also need to register for a production account. Use the contact information in the enrollment email messages to work with PayTrace Support and obtain the same set of credentials for your production account.
Configuring Salesforce for PayTrace Integration
NOTE: You must get each of these gateway credentials from PayTrace before moving on to the steps in the next section, Configuring Salesforce For 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 PayTrace Sandbox Account.
Follow the steps below to configure Salesforce to integrate with PayTrace:
- Contact AppFrontier Support to assist with the installation of Chargent in your Salesforce Org.
NOTE: Both the Sandbox and Production installations of Chargent include a free, 30-day trial license.
- Complete the basic Chargent setup, such as assigning user licenses and updating page layouts. For more information, please consult our Quick Start Guide.
If you’ve just updated the Chargent package from a previous version you will need to activate the Remote Site for PayTrace:
- Go to Salesforce Settings
- Search for Remote Sites
- Click Edit next to PayTrace
- Check the Activate box
- Save the Remote Site
Setting up PayTrace using the Gateway Setup Wizard
- Click the AppLauncher icon on the top left of Salesforce and
- Select Chargent from the list of Apps (your Apps may appear in different order than the screenshot)
- Select Chargent Settings and Chargent Setup Wizard
This will walk you through the Gateway Setup Wizard
- Do you have a Payment Gateway account? - Select Yes
- Select PayTrace from the dropdown menu and press Continue
Enter your PayTrace Credentials
- Choose Test if you are setting up your gateway to test transactions in your Sandbox
Choose Live if you are setting up your gateway to do live transactions in your Production Org.
Note: For security purposes, Chargent typically requires use of the Endpoint Override field in order to send live transactions from a Salesforce Sandbox. (This is typically recommended as a final step prior to deploying to production).
However, PayTrace has the same server endpoint for both test and live transactions: https://api.paytrace.com. It is therefore recommended to use caution when submitting test transactions to ensure that they are not accidentally sent as live transactions.
Note:You can only setup one gateway at a time.
- Use Tokenization? Yes (recommended for PCI compliance and recurring payments)
- Select what payment methods you accept
- Setup Payment Console (Payment Console is a Platform Edition Premium Feature)
To manually setup your gateway
Use the table below for guidance when entering the test credentials that can be found in the email from PayTrace Support:
|Gateway Page Field||Value|
|Gateway Name||Enter an easily recognizable name for this gateway, such as “PayTrace”.|
|Merchant ID||Your gateway account Username|
|Merchant Security Key||Your gateway account Password|
|Active||Check this box|
Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.
Testing the PayTrace Integration
This section contains the procedure for testing the integration that you set up according to the procedure given in Setting Up Salesforce For Integration, using your PayTrace sandbox credentials.
Follow the steps below to verify that the integration is correct.
- In the upper-left corner of the Salesforce page, click the AppLauncher icon to open the all of the Salesforce Apps.
- Locate the Chargent App and select it.
- Select Chargent Orders from the tabs
Click the New button (see the figure below).
As shown on the PayTrace Testing Information page, these are valid test credit card numbers. Test credit card numbers should be used for sending transactions to your PayTrace test account.
Card Type Card Number CSC Visa 4012000098765439 999 MasterCard 5499740000000057 998 Discover 6011000993026909 996 American Express 371449635392376 9997
Below are the valid Account Number and Routing Number for PayTrace. This will help you test ACH (Electronic Check - Direct Debit) Transactions.
Account Number Routing Number 123456 325070760
For PayTrace, submission of $0.50, $1.00 or a higher amount (except $1.12, $1.13) should give an approval response. Amounts such as $0.20, $0.21, $0.29 will cause the return of a DECLINE message. The full list of testing amounts can be found on PayTrace Testing Information page in the Testing Amount section.
Expiration dates in the future are returned as valid; expiration dates in the past are returned as invalid.
In the Chargent Order Edit page, enter or select information to correctly complete the essential parts of the form, including:
- 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.
- Click the Save button to commit the changes on the form. On the next page, click the Charge button (as shown below).
- 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.
- 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 PayTrace. See the figure below for an example.
Sending Live Transactions from a Salesforce Sandbox
All PayTrace transactions are sent to the same endpoint (https://api.paytrace.com). You want to use caution when testing to make sure you are using your test credential gateway setup, because real transactions will process the same as the test credit card numbers provided by PayTrace.
When a transaction occurs between Chargent and the PayTrace 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. See the figure above.
On the order page, go to the Related tab and click a Transaction ID link to see the details, as shown below. This transaction record contains the entire set of data that PayTrace 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.
You can compare the transaction records in Salesforce with the records in your PayTrace administrative app. As shown in the figure below, click the Dashboard menu category, then click View Transactions. Then click the link for a specific transaction to view details.
From the Transaction Record in Salesforce copy the Gateway ID. You can paste the Gateway ID in the search field in PayTrace to locate the transaction.
Correspondence in the Transaction Fields
The Gateway Date is the timestamp for the submission to PayTrace, and the Gateway ID field corresponds to the PayTrace Transaction ID for use in reconciliation between two systems.
This table contains the mapping information between PayTrace and Salesforce fields.
|Salesforce field||Direction||Gateway field|
|Gateway ID||<||Transaction ID|
|Invoice Number||>||Invoice ID|
|PO Number||>||Customer Reference ID|
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 PayTrace production gateway account (similar to the method given for sandbox credentials in Obtain a PayTrace Sandbox Account.
- Get these production credentials from your enrollment email message: