Integrating Cybersource With Chargent In Salesforce
Salesforce Payments by Chargent is the leading payment application available on the Salesforce AppExchange. Chargent allows you to process payments directly from within Salesforce. This guide shows you how you can easily connect Cybersource with Salesforce using Chargent.
About This Guide
This guide walks you through the steps needed to integrate Chargent with Cybersource. 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 chosen the Cybersource gateway and includes links to gateway-specific documentation for configuration instructions.
Video Tutorial
If you’re a visual learner, like many of us, check out our overview video to get started. The text in this guide covers the video’s content in greater detail, so if you have any questions, make sure to follow along with the content here.
Before You Begin
Before you start integrating the Cybersource gateway in Chargent with Salesforce, make sure 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
Setting Up Your Test Environment
Before installing Chargent in production, we highly recommend installing and testing in a Salesforce sandbox. 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 your sandbox is aligned with your production configurations.
Creating Your Cybersource Test Account
If you don’t already have Cybersource credentials for testing, sign up for a Cybersource test account.
If you plan to use tokenization, ensure the ‘Payment Tokenization Service’ has been enabled for your Cybersource Account by contacting Cybersource Customer Support.
Using Your Cybersource Test Account
Cybersource provides two accounts with separate login credentials: Account Admin and Merchant Admin. The Account Admin is the master account for a specific Merchant ID (MID) and is not used for this integration. After you request your Cybersource Test Account, you’ll receive a confirmation email with links. Click the links to create usernames and passwords for both accounts.
Chargent only requires the credentials from the Merchant Admin account.
Obtaining Your Cybersource Test Account Credentials
To integrate Cybersource with Salesforce using Chargent, you’ll need to find and save the following credentials, specifically from your Merchant Admin account:
- Merchant ID
- Transaction Security Key (aka SOAP Toolkit Key)
The following sections will provide instructions for finding and saving the above credentials.
Merchant ID
The Merchant ID credential is the ‘Organization ID’ under the ‘Merchant-Level User’ section in your account creation email. This credential is also used to log into your Cybersource test account (alongside your User Name and Password).
Transaction Security Key
To find your Transaction Security Key, log in to the Cybersource test business center using your new credentials to generate the key.
- Log in to your Cybersource test business center.
- Click Payment Configuration from the left panel.
- Click Key Management.
- Click Generate Key.
- Select SOAP Toolkit.
- Click Generate Key on the bottom.
- Click Copy this one-time key icon to copy the key to your clipboard.
- Please note that the one-time key cannot be retrieved again after you navigate away from this page. We recommend saving the key in a secure location.
The following Cardinal Cruise credentials are required when enabling Strong Customer Authentication (SCA) for your Cybersource integration using Chargent. If your SCA credentials are not present, please see Cybersource’s documentation, How to View Your Cardinal Cruise Credentials.
API Key
The shared secret value between your merchant account and Cybersource’s Cardinal SCA service. This value should never be exposed to the public. This can be found in the Cybersource Customer Portal by visiting Payment Configuration > Payer Authentication Configuration.
API Identifier
This ID indicates the specific API key to be used for this account. This can be found in the Cybersource Customer Portal by visiting Payment Configuration > Payer Authentication Configuration.
OrgUnit ID
This ID indicates the merchant account to be used for Strong Customer Authentication. This can be found in the Cybersource Customer Portal by visiting Payment Configuration > Payer Authentication Configuration.
Creating Your Test Gateway in Chargent
Before you can create your test gateway in Chargent, you will need to gather the following credentials using the steps above:
- Merchant ID: This is your Cybersource Username.
- Transaction Security Key: Obtained via the steps in the previous section.
With your credentials in hand, it’s time to create a gateway record in Chargent and verify your Cybersource test 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 ‘Cybersource’ from the list and click Continue.
Note: In your Salesforce sandbox instance, Chargent automatically sends your transactions to your gateway’s test endpoint URL to ensure you don’t accidentally send live transactions from your Salesforce sandbox environment.
If your testing process requires creating live transactions in your sandbox environment, see Running Live Transactions in Sandbox.
- Enter your Cybersource sandbox credentials, leaving the Endpoint Override field blank.
- Click Sign In.
- Enable or disable Strong Customer Authentication (SCA) based on whether or not you want to include 2-factor authentication for customer purchases.
- Learn more by visiting Strong Customer Authentication (SCA) in the Supported Features section of this guide.
- When you receive a message stating “Your credentials have been successfully verified!”, click Sign In to complete the steps in the wizard.
- If you receive an error message in red, see the Checking Your Remote Site Settings section below or check out our troubleshooting tips.
The remaining choices in the Gateway Setup Wizard are determined by your specific use case. For more detailed information about the steps, see Gateway Setup Wizard.
The remote sites for your gateway should automatically activate when completing the Gateway Setup Wizard. If you encounter any issues connecting to Chargent using your gateway credentials, ensure they have been 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:
-
- CyberSourceLiveA
- CyberSourceTestA
- If the “Active” box is not selected, click Edit, select Active, and click Save.
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.
Cybersource supports the ‘ACH – US’ direct debit network. Choosing the correct Direct Debit Network will allow you to accept Bank Account payments and display the correct Direct Debit Network fields in Chargent.
For more information, see Understanding Bank Account Payments.

Running Test Transactions
After successfully creating your test gateway record, you can attempt your first test transaction. See Testing in Sandbox for instructions and best practices for testing. Every gateway has its own test payment methods and response codes. See the list below for information and resources specific to Cybersource.
Testing Credit Card Transactions
Visit Cybersource’s documentation, Testing Credit Card Numbers, for a complete list of test credit card numbers. To quickly verify your integration, you can use the following test credit card numbers to ensure Chargent is appropriately configured:
Processing Network | Card Number | Expiration | CVC |
---|---|---|---|
Visa | 4111111111111111 | Any date in the future | Any 3-digit number |
MasterCard | 5555555555554444 | Any date in the future | Any 3-digit number |
American Express | 378282246310005 | Any date in the future | Any 4-digit number |
Discover | 6011111111111117 | Any date in the future | Any 3-digit number |
Additionally, once you’ve set up SCA, you can test transactions using Strong Customer Authentication (SCA) test credit cards. These are different from the test credit cards provided for standard testing and will prompt 2FA when a test payment is made. For more information and additional test cards, visit Test Cases for 3D Secure.
Processing Network | Card Number | Expiration | CVC |
---|---|---|---|
Visa | 4456530000001005 | Month of January The current year plus three |
Any 3-digit number |
MasterCard | 5200000000001005 | Month of January The current year plus three |
Any 3-digit number |
American Express | 340000000001007 | Month of January The current year plus three |
Any 4-digit number |
Discover | 6011000000001002 | Month of January The current year plus three |
Any 3-digit number |
Testing Bank Account Transactions
Visit Cybersource’s documentation, Testing Cybersource ACH Service Transactions, for a complete list of test bank account numbers. To quickly verify your integration, you can use the following test bank account information to ensure Chargent is appropriately configured:
Routing Number | Account Number | Bank Name | Account Type |
---|---|---|---|
112200439 | 12345678 | Any bank name | Checking |
Testing Response Codes
It’s important to test different gateway responses to ensure that your gateway is configured properly. The gateway’s response is stored on a transaction record (see the Response Code and Response Status fields) in Salesforce.
Every gateway has its own response codes. Cybersource’s responses to test transactions depend on the value sent in the Charge Amount field on the Chargent Order record or specific credit card information. For more information, see the following guide: Common Payment Transaction Responses.
We’ve provided a table below to quickly reference how to generate specific response codes in your test environment:
Field Input | Response |
---|---|
Charge Amount field is greater than 1 | Successful transaction |
Charge Amount field is less than 1 | Rejection: Invalid data – Invalid Amount less than $0 |
Charge Amount field is 100,000,000,000 | Rejection: Invalid data – Invalid Amount; amount too large |
Charge Amount field is Blank | Rejection: Missing required fields = Empty credit card number |
Credit Card Number is 4111111111111112 | Rejection: Invalid account number. Request different card or other form of payment. |
Credit Card Number is 412345678912345678914 | Rejection: 21-digit credit card number |
Expiration Month 13 | Rejection: Invalid expiration month |
Expiration Year 1998 | Rejection: Expiration date passed |
For additional information about a particular error, you can view the details in the test Enterprise Business Center (in addition to the Chargent Transaction record in Salesforce).
It is not considered best practice to run live transactions in your sandbox environment. If you still wish to send live transactions from a Salesforce Sandbox as a final step in testing, add the Cybersource Production Endpoint URL noted below to the Endpoint Override field on your gateway record. You will also require your gateway’s production credentials, which can be obtained by following the steps in the next section of this guide.
Cybersource Production Endpoint URL: https://ics2ws.ic3.com/commerce/1.x/transactionProcessor/
For more information, see Testing Live Transactions in Sandbox.
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. After moving Chargent to production, see Testing in Production for best practices prior to going live.
Creating Your Cybersource Live Account
To process real payments in Cybersource, contact Cybersource’s Sales Team to migrate your test Cybersource account to a production Cybersource account.
If you plan to use tokenization, ensure the ‘Payment Tokenization Service’ has been enabled for your Cybersource Account by contacting Cybersource Customer Support.
Creating Your Live Gateway Integration in Salesforce
So far, you’ve used your test Cybersource credentials and created a test gateway in your Sandbox. Now, it’s time to create a new gateway record in your production environment specifically for processing live transactions.
- 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 ‘Cybersource’ from the list and click Continue.
- Click Live Transactions and enter your new live gateway credentials, leaving the Endpoint Override field blank.
- Enable or disable Strong Customer Authentication (SCA) based on whether or not you want to include 2-factor authentication for customer purchases.
- Learn more by visiting Strong Customer Authentication (SCA) in the Supported Features section of this guide.
- 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 these steps, see our documentation for the Gateway Setup Wizard.
Running Live Transactions
With your live gateway record created, you are ready for the final phase of testing: running live transactions in a production environment. Visit Testing in Production for considerations and best practices related to testing in your production environment.
When testing with live payment information, you can prevent transactions from settling by voiding them immediately afterward. For more information, see Refunding and Voiding Transactions. As a precaution, 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 successfully integrated Salesforce and Cybersource! You can now process transactions through Cybersource directly in Salesforce using Chargent!
Supported Features
All of Chargent’s gateway integrations support most of Chargent’s core features. Some features are reliant on support by the gateway itself. Chargent’s integration with Cybersource includes, but is not limited to, the following features:
ACH Validation
Using Cybersource, you can validate US bank accounts on the Automated Clearing House (ACH) network via our partner, Lyons, a leading data verification provider. This feature is designed to satisfy NACHA’s mandate—Supplementing Fraud Detection Standards for Web Debits.
For more information, see ACH Validation.
Address Verification System (AVS)
Chargent’s integration with Cybersource supports Address Verification System (AVS), a technology used to prevent fraud by validating the ownership of a credit card using the billing address of a credit card and matching it with the data on file at the credit card issuing company.
Your AVS results are stored in Salesforce using the AVS Response Code field on your transaction record. For code definitions, see Cybersource’s AVS Codes.
For more information, see Address Verification System (AVS).
Currencies
Chargent’s integration with Cybersource supports multiple currencies. Visit ISO Standard Currency Codes for a list of currencies supported by Cybersource.
Additionally, this gateway integration supports Salesforce’s Multiple Currencies feature.
For more information about currencies in Chargent, see Understanding Currencies.
Data Levels
Data levels allow you to send more information with each transaction, ensuring the security and authenticity of the payment. Higher data levels translate to higher savings on transaction fees. The following levels of data are supported by Cybersource using Chargent:
- Level I
For more information about data levels, see Understanding Data Levels.
Payment Method Types
Below, we’ve listed the payment method types that are supported when using the Cybersource gateway integration. For more information about payment methods supported by Chargent, see Payment Methods Supported.
Credit Cards
- Visa
- Mastercard
- Discover
- American Express
- UK Maestro
- JCB Card
- Diners Club
See Cybersource’s documentation about Card Types for a list of credit card types supported by Cybersource. You can also check out Understanding Credit Card Payments to learn more about how credit card payments work in Chargent.
Bank Accounts
- ACH – US (aka echeck or electronic check)
For more information, see Understanding Bank Account Payments.
Stand-Alone Credits (aka Unlinked Refunds)
Chargent’s Cybersource integration supports Stand-Alone Credits (aka Unlinked Refunds). A Stand-Alone Credit allows you to send funds from your Cybersource account to a credit card. Unlike a Refund, an Unlinked Refund has no time limitation and can be processed when no prior transaction has occurred.
Stand-Alone Credits are not automatically enabled for your Cybersource account. See How to Apply for Permissions to Perform a Stand-Alone Credit (SAC).
Chargent refers to Stand-Alone Credits by their common name, Unlinked Refunds. For more information about enabling and processing Stand-Alone Credits, visit Sending Unlinked Refunds.
Strong Customer Authentication (SCA) is a two-factor authentication (2FA) requirement wherein, during a consumer-initiated transaction, the cardholder must provide two of the three elements: something the cardholder knows, something the cardholder owns, something the cardholder is.
With SCA enabled, a pop-up window will appear when your customers make a payment via Payment Request or Take Payment, asking them to authenticate with 2FA, adding an additional layer of security to your customer-initiated transactions.
See the following related documentation:
Surcharging for Card Payments
Surcharging represents a growing trend in the payment industry, allowing you to pass your credit card fees on to your customers. Chargent has partnered with InterPayments, a leader in the surcharging space, to help you take control of your credit card fees and improve your Salesforce payment process.
To learn more, see Setting Up Surcharging.
Tokenization
Tokenization allows you to store payment information at your gateway and not in Salesforce. Tokenization helps you decrease the scope of your PCI compliance and improve security by storing your customers’ payment information on Cybersource’s servers and not in Salesforce.
Chargent’s Cybersource integration supports tokenization for the following payment method types:
- Credit Card
- Bank Account
In Cybersource, the token is stored as a Profile ID, which is returned to Salesforce and stored in the Token field on the Chargent Order and Tokenization on the Transaction records in Salesforce. Additionally, tokens are stored in a Chargent Tokens record when Payment Methods is enabled in your org.
Contact Cybersource Support to ensure that the ‘Payment Tokenization Service’ is enabled for your Cybersource account.
To learn more, visit Understanding Tokenization.
Transaction Types
Chargent’s integration with Cybersource supports the following transaction types:
- Authorize
- Capture
- Partial Capture
- Refund
- Partial Refund
- Unlinked Refund (Stand-Alone Credit)
- Refund Authorization
For more information about Transaction Types, see Understanding Payments and Cybersource’s documentation, What are the transaction types that can be submitted?
Field Mapping
Salesforce sends payment information to your gateway based on the field values in your Chargent Order records. The gateway stores the payment information as a transaction. Then, the gateway sends a response to Salesforce, storing it in a Transaction record. Here are a few important examples of how the data is mapped between Salesforce and Cybersource.
Chargent Field | Salesforce Object | Direction | Cybersource Field |
---|---|---|---|
Gateway ID | Transaction | < | Request ID |
Token | Chargent Order | < | Profile ID |
PO Number | Chargent Order | > | User PO |
Salesforce Record ID | Chargent Order, Opportunity, or Case | > | Your Reference Number |
Order Source | Chargent Order | > | SEC Code, CommerceIndicator |
For customizable field mapping options, see Cybersource Custom Mapping.
Order Source Field Mapping
The Order Source field can be set for ACH transactions and determines the SEC code sent to Cybersource. The following table provides the mapping between the Order Source field on the Chargent Order record and the corresponding SEC code in Cybersource.
Order Source (Chargent) | SEC Code (Cybersource) |
---|---|
Corporate Cash Disbursement | CCD |
E-commerce | WEB |
Installment | PPD |
ARC | |
Prearranged Payment and Deposit | PPD |
Recurring | PPD |
Recurring Mail | ARC |
Recurring Telephone | TEL |
Retail | POP |
Telephone | TEL |
Chargent also uses the Order Source field to set the CommerceIndicator for register token calls when using Cybersource. The values in the Order Source field are mapped to the CommerceIndicator value in the Cybersource SOAP API. The following table displays the mapping from Order Source to CommerceIndicator:
Order Source (Chargent) | Token | CommerceIndicator (Cybersource) |
---|---|---|
E-commerce | No Token | Internet |
Recurring | No Token | Recurring |
Telephone | No Token | Moto |
No Token | Moto | |
Installment | No Token | Recurring |
Corporate Cash Disbursement | No Token | Not Sent |
Retail | No Token | Not Sent |
Prearranged Payment and Deposit | No Token | Not Sent |
Chargent’s Cybersource Custom Mapping feature allows you to send values from almost any fields on the Chargent Order object to the Cybersource gateway using Cybersource’s Merchant-Defined Data fields.
The feature is not required for processing Cybersource payments but allows you to store additional information within Cybersource. Custom Mapping is designed to send up to 20 fields in a request. Any fields on the Chargent Order object can be selected – including Chargent’s packaged fields or custom fields you’ve created.
Cybersource doesn’t allow you to send Personal Identifiable Information (PII) to Merchant Defined Data fields, including name, address, credit card number, etc. See the Merchant-Defined Data Fields section in Cybersource’s Managing Merchants documentation for more information.
- Go to the App Launcher
and click the Chargent app.
- Click the Chargent Settings tab.
- Click the down arrow to the right of Global Settings and choose the Cybersource Custom Mapping subtab.
- In the Select Object picklist, select ‘Chargent Orders’.
- Select a field from the Chargent Order (presented in the left column) and a field for mapping in Cybersource (presented in the right column).
- (Optional) Click + to the left of the Chargent Order field to add additional field mappings.
- Click Save.

One Chargent Order field can be mapped to one or more Cybersource custom fields. The mapped fields are sent in ‘Authorize’ and ‘Charge’ requests. In Cybersource, the fields are shown on the detailed transaction description page:

If you have questions about Cybersource Custom Mapping, please feel free to contact us.
Gateway Response Codes
The Reason Code field on a Transaction record stores a response code provided by Cybersource. To learn more about a specific response code, see What Does this Reason Code Mean? or search Cybersource’s Transaction Response Codes.
To review gateway responses in Salesforce, go to the transaction record in Chargent and examine these field values:
Transaction Field Name | Description |
---|---|
Response Status | The state of the transaction, such as “Approved,” “Declined,” or “Error” received from the Cybersource payment gateway. |
Reason Code | The code provided by the Cybersource gateway, indicating why the transaction was successful or not. Cybersource stores a code of 100 for successful transactions. See What Does this Reason Code Mean? |
Gateway ID | Corresponds to Cybersource’s RequestID field to help you identify the related transaction in your Cybersource account. |
Gateway Response | Contains the entire message received from Cybersource related to the transaction. This field is helpful when troubleshooting your transactions. |
Considerations
The following considerations are specific to Cybersource. Please let us know if you have any questions about the following items.
Payment Request Limitation
Our Cybersource integration does not allow customers to choose their payment method (Credit Card or Bank Account) in Payment Requests out of the box. This is due to Cybersource’s SEC code requirements relating to the payment method for each transaction.
For more information, see Cybersource: Why can’t my customer choose their payment method in Payment Request pay forms?
Error 150
If you attempt to use tokenization, but tokenization is not enabled in Cybersource, you may receive an error 150. This error can also be related to setting an incorrect value in the Order Source field on the Chargent Order record.
For more information, see Cybersource: 150- Error – General system failure.
Disabling AVS
There is no way to disable AVS in Cybersource; however, Cybersource has two features that can be enabled by request.
- ‘Relaxed AVS’ allows you to change address fields that are typically required to optional.
- ‘Ignore AVS’ will ignore all AVS responses from Cybersource.
For more information, see Turning off Cybersource Address Verification System (AVS).
Troubleshooting
If you are having trouble connecting to your gateway, we recommend starting with these troubleshooting steps.
For additional troubleshooting tips or frequently asked questions about Cybersource, check out Chargent’s knowledge base articles.
Getting Help
Contacting Cybersource Support
For general information about Cybersource, go to http://www.cybersource.com.
For sales questions about any Cybersource service, email [email protected] or call 650-432-7350 or 888-330-2300 (toll-free in the United States).
For support information about any Cybersource service, visit the Support Center: http://www.cybersource.com/support
Contacting Chargent Support
Contact our support team if you encounter any Chargent issues with your implementation.