Integrating Paymentus With Chargent In Salesforce
Chargent payment processing for Salesforce is the leading payments application available on the Salesforce AppExchange. Chargent allows you to charge credit cards and bank account transactions directly from within Salesforce. This guide shows you how you can easily connect Paymentus with Salesforce using Chargent.
About This Guide
This guide walks you through the steps needed to integrate Chargent with Paymentus. It assumes you have already installed and configured Chargent, but links are provided to installation, user management, and configuration topics where more details are available so you can get up and running quickly. It also assumes you have already chosen the Paymentus gateway and includes links to gateway documentation for configuration instructions.
Before You Begin
Before integrating the Paymentus gateway with Salesforce using Chargent, ensure you have completed the following steps:
Installing and Configuring Chargent
Before setting up your gateway, install the latest version of Chargent and configure your user permissions. Guides for these topics are available below to help you get started.
- Installing and Updating Chargent
- License Assignment (Production Only, not required for Sandbox)
- Permission Assignment
Checking Your Remote Site Settings
While the Remote Sites for your gateway should automatically activate when installing Chargent, we recommend checking them to make sure they have correctly activated in your org.
- Click the gear icon at the top right and choose Setup.
- Enter “remote” in the Quick Find box and choose Remote Site Settings.
- Locate the following Remote Site names and make sure the “Active” box is selected:
-
- Paymentus_API_Sandbox
- If the “Active” box is not selected, click Edit, select Active, and click Save.
Testing in Your Salesforce Sandbox
We always recommend installing and testing Chargent in a Salesforce sandbox before installing it in production. The following topics provide instructions for obtaining your test gateway credentials and creating a test gateway record in Salesforce. Remember to refresh your sandbox beforehand to ensure that it is aligned with your production configurations.
Obtaining Your Paymentus Credentials and Endpoints
Paymentus assigns your login information and connection details when you request them. To connect Paymentus with Salesforce, Chargent requires the following credentials:
- XOTP Secret: Provided by Paymentus.
- JWT Key ID (KID): Provided by Paymentus.
- TLA: 3 or 4-letter acronym provided by Paymentus.
- Default Payment Type Code: Required by Paymentus. You can add additional Payment Type Codes via Chargent’s Custom Mapping settings.
- Default Account Number: Provided by Paymentus.
- Endpoint Override: Paymentus is unique because you will always need to populate the Endpoint Override field with an endpoint provided by Paymentus. The endpoint represents the gateway URL to which Chargent sends callouts.
Please reach out to Paymentus Support to obtain your gateway credentials and endpoints.
Creating Your Test Gateway in Chargent
Now that you have your credentials in hand, it’s time to create a gateway record in a Salesforce sandbox and verify your Paymentus credentials.
- Login to your Salesforce sandbox (partial, full, or developer sandboxes work).
- Go to the App Launcher and click the Chargent app.
- Click the Chargent Settings tab and choose the Setup Wizard subtab.
- Click Yes when prompted, “Do you have a Payment Gateway account?”.
- Select ‘Paymentus’ from the list and click Continue.
- Enter your Paymentus credentials.
- Populate the Endpoint Override field with the appropriate endpoint URL provided by Paymentus.
- Click Sign In.
- When you receive a message stating, “Your credentials have been successfully verified!” click Continue to complete the steps in the wizard. If you receive an error message in red, see our troubleshooting tips.
For more detailed information about the steps in the setup wizard, see Gateway Setup Wizard.
Setting Up Your Direct Debit Network
Setting up your direct debit network is optional but recommended. When you reach the gateway setup wizard page labeled “Select the Payment Methods you accept,” select the direct debit network for your region.
Paymentus supports ACH – US direct debit network. Choosing the correct direct debit network allows you to accept bank account payments and display the correct direct debit network fields in Chargent.
Testing Credit Card Transactions
You can attempt your first test transaction after successfully creating your test gateway record. See Testing in Sandbox for instructions and best practices for testing.
Use the following test credit card number to verify that your integration is working correctly:
Payment Network | Card Number | Expiration | CVC |
---|---|---|---|
Visa | 4111 1111 1111 1111 | Any month in the future | Any 3-digit number |
MasterCard | 5454 5454 5454 5454 | Any month in the future | Any 3-digit number |
American Express | 3434 3434 3434 343 | Any month in the future | Any 3-digit number |
Discover | 6011 0009 9550 0000 | Any month in the future | Any 3-digit number |
Testing ACH Transactions
Use the following test bank account and routing number to test your ACH transactions:
Routing Number | Account Number | Bank Name | Account Type |
---|---|---|---|
122000247 | Any 10-digit number | Any bank name | Checking |
Testing Response Codes
When testing transactions in Paymentus, the charge amount sent to the gateway determines the response code and the response status returned. Every gateway has different response codes. For more information about testing response codes, contact Paymentus support.
Going Live in Production
Once you’ve tested your gateway integration in a Salesforce sandbox, you’re ready to move to production. See Moving from Sandbox to Production to learn how to migrate your Chargent configuration changes to your production environment.
Creating Your Live Gateway Integration in Salesforce
So far, you’ve only processed test gateway transactions via a test gateway record. Now, it’s time to click the Live Transactions tab and enter your live Paymentus account credentials:
- Log in to your production Salesforce org.
- Go to the App Launcher and click the Chargent app.
- Click the Chargent Settings tab and choose the Setup Wizard subtab.
- Click Yes when prompted, “Do you have a Payment Gateway account?”.
- Select ‘Paymentus’ from the list and click Continue.
- Click Live Transactions and enter your live gateway credentials
- Populate the Endpoint Override field with the endpoint URL provided by Paymentus.
- Click Sign In.
- When you receive a message stating, “Your credentials have been successfully verified!” click Continue to complete the remaining steps in the setup wizard. If you receive an error message in red, see our troubleshooting tips.
For more detailed information about the steps in the setup wizard, see Gateway Setup Wizard.
Running Live Transactions
After your test transactions have proven successful, you are ready for the final phase of testing: running live transactions in a production environment.
We recommend testing a few live transactions in your production environment. To prevent the transactions from settling, you can void them immediately afterward. For more information, see Refunding and Voiding Transactions.
If you do run live transactions as a test, we recommend using very low amounts to minimize any impact in the event you forget to void them.
To test gateway responses in the live environment, submit live transactions with the correct street address, zip code, and CVC information to generate successful responses. Likewise, submit incorrect street address, zip code, and card code information to generate other responses. You can void successful transactions immediately to prevent live test transactions from being processed.
Congratulations! You have now successfully integrated Salesforce and Paymentus, via the Chargent for Salesforce app. You can now process one-time or recurring credit card payments through Paymentus directly from Salesforce.
Supported Features
Our Paymentus integration includes access to many of Chargent’s core features. Some features are reliant on support by the gateway itself. Chargent’s integration with Paymentus includes, but is not limited to, the following features:
ACH Validation
Paymentus handles ACH Validation for bank account transactions. ACH Validation confirms that the bank account and routing numbers exist and that the account is available for payment transactions. This feature is designed to satisfy NACHA’s mandate—Supplementing Fraud Detection Standards for Web Debits.
Currencies
Chargent is compatible with all currencies supported by Paymentus. Please contact Paymentus to inquire about what currencies are available.
Multi-Gateway Tokenization
Multi-gateway tokenization allows for tokenizing payment data across multiple payment gateways. The payment gateways may be for different Merchant Identifiers (MIDs) at the same payment gateway that may be configured differently based on your financial operations, or they may be for different MIDs across different payment gateways.
For more information, see Multi-Gateway Tokenization.
Payment Methods
Our Paymentus Integration supports the following payment method types:
- Credit Card
- ACH (Automated Clearing House)
You can also store multiple payment methods for future use using Chargent’s Payment Methods feature. For more information, see Chargent Payment Methods.
Smart Payment Routing
With Smart Payment Routing, merchants can control where to send a transaction based on dynamic routing rules defined in a Lightning Flow.
For more information, see Smart Payment Routing.
Tokenization
Chargent’s Paymentus integration supports tokenization for both credit card and ACH transactions. Tokenization helps you decrease PCI compliance scope and improve security by storing transaction data such as credit card and bank account numbers on Paymentus’ servers and not in Salesforce.
The token returned by Paymentus is stored in the Token field on the Chargent Order and Tokenization on the Transaction records in Salesforce. To learn more about tokenizing your payments in Salesforce, visit Understanding Tokenization.
Transaction Types
Chargent’s Paymentus integration supports the following transaction types:
- Sale
- Authorization
- Void
- Refund
- Unlinked Refund
- Credit
For more information about Transaction Types, see Understanding Payments.
Payment Type Codes
Paymentus requires a Payment Type Code to process transactions. When you first enter your Paymentus credentials, you will set a Default Payment Type Code, but you can add additional Payment Type Codes using Chargent’s Custom Mapping settings.
- Log in to your production Salesforce org.
- Go to the App Launcher and click the Chargent app.
- Click the Chargent Settings tab, click the down arrow next to Global Settings, and choose the Cybersource Custom Mapping subtab. Please note that this subtab is no longer specific to Cybersource and will work with your Paymentus integration.
- In the Select Object picklist, choose Chargent Orders.
- In the Chargent Order Field 1 picklist, choose chargentorders__ordersource__c.
- In the Custom Field picklist, choose a unique custom field value.
- Click the plus to the left of Chargent Order Field 1 to add additional Payment Type Codes.
- Click Save.
Additional Considerations
Every gateway is different, so we’ve compiled a few considerations related specifically to our Paymentus gateway integration.
- Unlike many other gateways, Paymentus requires the Billing Phone field on the Chargent Order record to be populated in order to process a payment.
- When accessing your Paymentus Agent Dashboard (link provided by Paymentus), certain transaction types are not differentiated. For example, authorizations and captures both appear as a sale.
- Partial refunds are not supported using the Paymentus gateway integration.
Gateway Responses
The Reason Code field on a Transaction record stores a response code provided by Paymentus. We also recommend viewing the Gateway Response field for additional information about a gateway’s response.
To learn more about a specific response code, contact Paymentus support.
Troubleshooting
If you are having trouble connecting to your gateway, we recommend starting with these troubleshooting steps.
Getting Help
Contacting Paymentus Support
Please see the following support channels to get in touch with Paymentus:
- Web: https://www.paymentus.com/contact/
- Phone: 800-420-1663
- Email: [email protected]
Contacting Chargent Support
Contact our support team if you encounter any Chargent-related issues with your implementation.