paya-logo

Integrating Paya and Salesforce using Chargent

Chargent Payment Processing for Salesforce is the leading payments application available on the Salesforce AppExchange. This guide shows you how you can easily connect the Paya Direct Payment Gateway (formerly known as Sage Exchange/Sage Payments) to Salesforce using Chargent. Chargent allows you to charge credit cards and ACH transactions directly from within Salesforce.

Not yet a Chargent customer? Get started today with a free 30-day trial!

Table of Contents

Create a Paya Account

If you don’t already have a Paya Virtual Terminal Account, contact your Paya sales representative or submit a ticket with Paya to create one.

For more information, visit How to access a Virtual Terminal Account.

Once you’ve activated your Paya Virtual Terminal Account, you can login here.

Convert Your Paya Account for Testing

Before processing any live transactions, you should test your integration using test transactions. To test your transactions, you must convert your Virtual Terminal Account into a testing environment.

  • Log in to your Paya Virtual Terminal Account.
  • From the Home tab, scroll down to the Account Overview section and click Switch under Mode.
  • Click Confirm.

For more information, see How do I switch my Virtual Terminal Account into a Testing Environment?

Visit Paya’s Support Documentation to learn more about your Paya account.

Install and Configure Chargent

Install and Configure Chargent according to the step-by-step Installation and Setup Guide.

Verify Your Gateway Credentials

During the setup process, you must create a Gateway record and verify your Paya credentials using the Gateway Setup Wizard.

Initially, we recommend creating a gateway specifically for testing. If you are in the testing phase, select the ‘Test Transactions’ tab when verifying your credentials.

  • Merchant ID (MID)
  • Merchant Key

For more information about the Gateway Setup Wizard, including troubleshooting tips, visit our Gateway Setup Wizard documentation.

Test Your Integration

After completing the Installation and Setup Guide, follow our Testing Chargent Guide. Use Paya’s test credit cards, test account numbers, and test response codes to ensure that your gateway is integrated correctly before going live.

Test Credit Card Numbers

The following credit card information can be used to test your credit card transactions:

Test Card Type Test Card Number
VISA 4111111111111111
4012000033330026
4005519200000004
4788250000028291
4005550000000010
Mastercard 5499740000000057
5424180279791732
5405980000008303
5454545454545454
5424180279791760
Discover 6011000993026909
6011000993043615
6011000991300009
6011000995500000
6011000993010970
American Express 371449635392376
373731623811006
371449635398431
3566002020140006
373953244361001

For more information, see Paya’s complete List of Test Credit Card Numbers.

Test Account Numbers for ACH

The following account number can be used to test your ACH transactions:

Field Value
Routing Number 056008849
Account Number 12345678901234
Bank Account Type Checking or Savings

Testing Response Codes

It is important to test for various response codes to ensure that your transactions are processed as expected. To generate specific response codes and AVS responses, the transaction amount can be used to generate specific response messages. See the table below for test transaction amounts and their associated response codes.

Amount Response Code AVS Response Code Response Message
$1.00 000001 “” APPROVED
$2.00 000002 “” DECLINED
$3.00 000003 “” APPROVED
$4.00 000004 “” DECLINED
$5.00 000005 “” DECLINED
$6.00 000006 X APPROVED
$7.00 000007 Y APPROVED
$8.00 000008 A APPROVED
$9.00 000009 Z APPROVED
$10.00 000010 N APPROVED
$16.00 999999 “”  UNABLE TO
PROCESS

To learn more about Paya’s response codes, visit the Response Codes section of this guide.

Sending Live Transactions from a Sandbox

After you have completed basic testing with a Developer or Sandbox account, it is critical to test with live transactions prior to rolling out in a Production environment.

When Chargent is installed in a Salesforce Sandbox, transactions are sent to the payment gateway’s test/sandbox/development environment, regardless of whether or not Chargent’s Test Endpoint checkbox is checked. This is a security precaution to prevent real transactions from accidentally being sent from a Salesforce Sandbox.

There is a workaround, however, for when you want to run real credit card transactions at the end of your testing, prior to going live. For more information, visit Testing Live Transactions in a Sandbox.

Enter the following production endpoint URL into the Endpoint Override field after you have reviewed the above resources:

  • https://api.sagepayments.com

Features Supported via Paya Integration

Chargent’s Paya Gateway Integration supports many types of card network transactions, providing you with multiple options when it comes to taking payments in Salesforce.

Payment Methods

The following Payment Methods are supported in our Paya integration:

  • Credit Card
  • ACH (Automated Clearing House)

For more information about the difference between Credit Card and ACH payments, visit ACH Payments versus Credit Cards.

Transaction Types

Our Paya Gateway Integration supports the following transaction types:

Currencies

Our Paya integration currently supports the United States Dollar (USD) .

Tokenization

Tokenization is supported for both credit card and ACH transactions via our Paya integration. To learn more about why we recommend tokenization, visit Salesforce Tokenization.

Address Verification System (AVS)

Paya includes Address Verification System (AVS), a system used to prevent fraud and validate the ownership of a credit card by checking the billing address of a credit card with the data on file at the credit card issuing company.

You can change the AVS Settings for your Paya Account by visiting How to change the Address Verification (AVS) Settings in Paya Exchange.

Response Codes

Response codes are saved in the Reason Code field of Transaction records in Salesforce. A response code is specific to your gateway provider and explains why a transaction was successful, declined, or encountered an error. Use the Reason Code field, along with the Gateway Response field, to troubleshoot your transactions.

For a list of Paya’s response codes and their description, please see Paya’s Decline Codes.

Paya also provides codes related to Address Verification System (AVS). AVS codes are saved in the AVS Response Code field of Transaction records in Salesforce. See Paya’s MasterCard and Discover AVS Codes for more information.

Field Mapping

These are a few of the most relevant field mappings between Chargent and Paya.

Salesforce Field Label Field Type Paya Field Label
Merchant ID String Merchant ID
Merchant Security Key String Merchant Key
Invoice Number String OrderNumber
Token String Authorization Token
Gateway ID String Transaction ID