Payment Methods #
Many people have more than one credit card or bank account. That’s why Chargent allows you to configure your community site to store multiple payment methods that an authenticated community user can select for one-time or recurring payments. To allow your users to securely store more than one payment method:
- Configure your payment request template to display an option to save payment details for future payments.
- Select the Save for future use… checkbox on your Take Payment Console.
- Educate your users on the New, Remove, and Select options available. When users receive a payment request, they can select an existing payment method, add a different card, or remove a previous payment method.
The Chargent Payment Method object securely stores details about each customer’s payment methods, such as name, address, card type, and the last four digits of the card. Ideally, a payment method goes through the following states:
Unverified → Verified → Unregistered → Registered
Use these details to determine the status of the payment method.
Unverified | A configured Chargent verification service, such as NACHA WEB Debit Account Validation, has not successfully passed. |
Verified | All Chargent verification service checks have passed. |
Unregistered | The payment method has not been tokenized with the payment gateway. |
Registered | The payment method has been successfully tokenized with the payment gateway and is ready to use. |
Note: Your Chargent installation may not have Payment Methods enabled. Once enabled, it cannot be disabled. See Implementing Payment Methods for more details about enabling this feature.
Chargent Gateway Logs #
Chargent stores a log of messages to and from your gateway in the Chargent Logs related list on the payment method. If users enter payment methods that have not been used before, Chargent runs a verification. When a payment method does not pass verification, Chargent does not create an order or transaction. Instead, it adds a record to your Chargent log. Review this log to troubleshoot issues with new payment methods that are not available elsewhere in Chargent.
Transactions #
Chargent processes payments for several types of transactions. Here is how we define each transaction type within Salesforce. You and your users can run any type of transaction through various processes using Chargent Anywhere.
- Authorize – Authorization Only, used for placing a hold on an amount or checking if a credit card is valid for future capture. Authorizations can be initiated using either Payment Request or Payment Console.
- Charge – The Charge button, found in the order and Payment Console, performs an authorization first and then immediately captures the amount. If you performed an authorization previously, it captures the amount authorized. For Payment Requests, the Charge happens when the person clicks the Pay button.
- Refund – Initiate refunds on the transaction record. It will refund a transaction that has been previously settled (between 1-120 days typically), also called a credit on some payment gateways. Please consult your payment gateway for the exact time frame in which a refund can be initiated.
- Void – Cancels a transaction that has not yet been settled (most commonly a charge from that same day) or an authorization that has not yet expired. You can also use the Void button to cancel a refund if a refund was accidentally processed and has not yet settled.
- Credit: The Credit button can send funds not tied to a previously captured transaction. Only supported on some payment gateways.
Please refer to the gateway guide for your particular payment gateway for additional information.
Transaction Records #
Every time Chargent calls your payment gateway to send credit card or Automated Clearing House (ACH) transactions, it creates a transaction record in Salesforce containing the data it receives in response. This transaction record is related to Chargent Orders as a Master-Detail relationship. The list of transactions can be found under the Related tab on the Chargent Order.
Almost all the data in a Chargent Transaction record has been received from your payment gateway in response to the call Chargent made. Key fields include:
- Transaction ID: An identifying name for the transaction, automatically generated by Salesforce.
- Gateway Date: The date and time of the transaction.
- Gateway ID: The identifying transaction number received back from the payment gateway (sometimes called a transaction ID or transaction number from the gateway).
- Type: The type of transaction submitted (Charge, Authorization, Refund, Void).
- Response Status: The status of the transaction received from the payment gateway (Approved, Declined, Error).
- Response Message: Additional transaction details received from the payment gateway (“This transaction has been approved.” etc.).
Other fields that can be useful include:
- Recurring: This checkbox is set by Chargent, showing whether the Recurring Billing Batch created a particular transaction.
- Authorization: The authorization code returned by the payment gateway.
- Response, Response Code, Reason Code: These responses can be useful in understanding declines or errors, so check your payment gateway website for more information.
- Gateway Response: The full text of the response from your payment gateway, sometimes useful in troubleshooting a transaction.
Creating and Updating Transaction Records #
Chargent references existing transactions when running a recurring billing schedule, so be careful not to edit recurring transactions.
Warning: making changes to any existing transaction record is not recommended.
To manually create transaction records for paper checks, cash, or other payment methods not automatically controlled by Chargent, please see cash and paper check instructions.
Chargent creates a new transaction record for each charge, authorization, or refund. The only time Chargent updates an existing transaction record is when processing a void. In this case, the transaction type of an existing charge, authorization, or refund is changed to Void, since the transaction was canceled.
Historical transactions can be imported into Chargent, but it takes data migration expertise to do everything correctly. Please contact us for additional advice and a referral to a Chargent consulting partner who can assist you.
Tokenization #
Chargent supports tokenization on most of our payment gateway integrations. Tokens are stored in the “Token” field on the Chargent Order and can be used for future transactions, referencing the payment data stored securely on your payment gateway’s servers.
For an overview of tokenization, please watch this short video.
Additional Notes on Transactions #
Some gateways update transactions that were originally started in Chargent with the latest status from certain payment gateways. Transaction Sync is available for the following Gateways.
- Authorize.net
- BlueSnap
- Braintree
- Ezidebit
- Paytrace
- USAePay
Chargent will generally attempt to send any transaction to your payment gateway with the exception of an invalid card number length. If the Gateway ID field says “Chargent Error,” this means that Chargent prevented the transaction from being sent to your payment gateway. If there is another value in the Gateway ID field, it means that the data in the transaction record was generated by your payment gateway and sent to Chargent.
Each payment gateway handles duplicate transactions differently. Some gateways decline a second transaction where the billing information and amount match a previous transaction within a certain time period. Other gateways allow it but may flag it as a potential duplicate.
Authorizations #
A credit card authorization holds a portion of the available balance on a card for you to capture in the future, without actually pulling the funds at the time of authorization. Authorizations for most credit cards expire after 7 days, however this will vary depending on the gateway. Some gateways will be shorter, and some longer, remaining on a customer’s account for up to 30 days. The authorization will continue to hold the amount from the credit card’s available balance and could prevent the customer from making additional purchases until the authorization expires.
Always authorize a credit card for more than the minimum of $1 if you are intending to capture the funds within a few days. It’s recommended you capture funds within 3 days or void the authorization to process at a later date. This is because you are reducing the amount of credit available to your customer. In some cases, your authorization could cause other transactions to be declined, or in the case of debit cards, could cause overdrafts for your customer, so use them carefully.
Visa, MasterCard, and American Express also have rules regarding acceptable authorization amounts for different types of transactions, so consult your merchant agreement for additional details.
A customer’s credit card will only be charged when an authorization is captured.
Verifying a Card #
The validity of a new credit card can be checked by performing an authorization of $0 or $1. Note that this does not verify that the card holds sufficient funds to accept a future charge or a larger amount, but has the benefit of not placing a hold on your customer’s funds and reducing their available credit.
- $0 authorization for Visa / MasterCard / Discover
- $1 authorization for American Express
For the $1 American Express authorizations, you can void them by using the Void button on the Transaction record, or simply wait for the authorization to expire. The Transaction record will show a Type as ‘Register Token’.
Capturing Authorization Holds #
To capture an outstanding authorization in Salesforce, Click Payment Console from Chargent Anywhere. A pop-up displays, showing an existing authorization. Click the Capture button.
To release the funds back to your customer quickly, go to the Chargent Transaction record in Salesforce and click Void. This can be useful when an order is canceled, and you are not going to capture the funds.
Note: Authorizations on debit cards typically expire in 1-8 business days, while authorizations on credit cards can take up to 30 days to expire or “fall off,” depending on the issuing bank of the credit card.
In addition, not all banks allow the merchant to void authorizations; in some cases, you could void an authorization but the hold would remain on your customer’s account.
Partial Authorization Capture #
On occasion, you may need to authorize an amount that is less than the final total. In this situation, you can capture an amount less than the authorization. One example of this is restaurants, which typically authorize the amount of the bill minus gratuity. Once the total amount of any tip is known, they capture the new amount of the authorization.
For ecommerce businesses, the best practice is to use third-party tools to automatically calculate shipping costs and taxes (if any), and then authorize the correct full amount. When the goods are later shipped, you capture the prior authorization.
To capture an amount less than what was authorized in Salesforce using Chargent:
- Go to the transaction record of the Authorization in Salesforce.
- Edit the Amount of the Transaction to the amount you wish to capture.
- Click Save.
- Click Charge Authorized.
The first time you perform a partial capture of an authorization in Salesforce, we recommend verifying that the correct amount was captured by logging into your payment gateway reporting interface. To capture an amount more than your prior authorization, please contact your payment processor to see if it is possible and to have the feature enabled.
Declined Charges #
If a credit card is declined, a transaction record will be written with a “Declined” Response Status. There may be Response Codes in the transaction record with additional information provided by the payment gateway (please see Transaction Records for more information and links to response code lookup tools).
You can then attempt the charge again on a later date, contact the customer for updated billing details, or send a payment request to the customer.
Recurring Billing Declines
If a card is declined as part of the scheduled Apex batch that runs recurring billing transactions:
- Payment Status will automatically change from “Recurring” to “Error.”
- If you have enabled Chargent’s Automated Collections feature, and configured it to trigger for this Chargent Order record, the Payment Status will instead update to “Automated Collections.”
- Once you have received updated billing information and successfully collected the payment, change the Payment Status back to “Recurring and click Save.”
- If you have processed a charge manually outside of the recurring billing schedule by clicking the Charge button, be sure to set the Payment Start Date ahead to the next time the record should be billed, to avoid a recurring charge the next time the batch runs.
Refunds and Voids #
Refunds can be applied once a transaction has settled in your gateway batch (typically nightly). Refunds mean that the credit card statement will show a charge and then a refund as a separate record.
Refunds can be made against settled transactions for up to 120 days typically. Refunds are shown as a separate transaction record in Salesforce with the “Refund“ type and a negative amount to balance the total fields.
Alternatively, voids cancel a charge before it has been settled. For example, if you charge a credit card incorrectly, you can void it that same day, and it will not be processed when your daily batch settlement happens.
Voids change the original transaction Type from “Charge,” “Authorize,” or “Refund” to “Void” in Salesforce, and do not create a separate transaction record. You can also void refunds if you refunded a transaction by mistake.
- Before you begin a refund or void, ensure you have My Domain enabled in Salesforce to use Lightning Actions.
- Add these buttons to your Transaction Page Layout from the Mobile & Lightning Actions category in the page layout editor’s palette.
- Click the Void or Refund button from the transaction record you want to refund or void.
Partial Refunds #
With most payment gateways, it is possible to do partial refunds using Chargent’s Partial Refund button on the transaction.
In some cases, even if Chargent sends a different amount for a refund, the gateway references the original transaction amount only. For this reason, we recommend confirming during your testing period that the proper amounts were refunded.
Note: You can make multiple partial refunds against a single transaction as long as the total of the refunds do not add up to more than the original transaction amount.
Entering Cash and Paper Check Payments Manually #
Chargent Anywhere makes it easy to add Cash and Paper Check Transactions simply by pushing a button and entering the amount. On occasion, however, you may need to add a manual transaction for cash, paper check, or other payment methods that are not in Chargent.
You can add a Transactions record to Chargent manually by doing the following.
- Select the Chargent app from the App Launcher icon
at the top-left of your screen.
- Click the Transactions tab.
- Click New.
- Enter the fields listed below and click Save.
Field Name | Value |
Gateway Date | Payment Date & Time |
Gateway ID | Enter either the Check Number or Cash |
Type | Charge |
Response Status | Approved |
Amount | Amount of Cash or Check |
Payment Method | Cash or Check |
Unresolved Transactions #
What are unresolved transactions?
An unresolved transaction is a transaction record that can’t be created or saved due to a Salesforce configuration error. Errors can happen due to Process Builder, Validation Rules, Triggers, custom Apex code, or other conflicts. Since transactions have a master-detail relationship to the Chargent Order, if the Chargent Order cannot be updated or saved, the Transaction cannot be either.
When an error occurs, an email notification is sent to the email address listed under the Chargent Admin Email Address you have listed in your Chargent Settings.
Chargent saves a copy of the transaction in Unresolved Transactions for the Chargent Order that can be reparented using its interface. Once the error has been fixed, you will then be able to quickly attach the transaction to the Chargent Order. To access unresolved transactions:
- Click the App Launcher icon
at the top-left of your screen.
- Enter “Unresolved Transactions” in the search box and select it.
- View the list of transactions that could not be written.
If the error is corrected, you can easily check the box to the left of the unresolved transaction and click the Create Transactions button. If you have multiple unresolved transactions, you can select multiple transactions and create all the records at the same time.
If the error is still present, review the error message when you try to resolve the transaction. You can also click on the View link to see the original error.
How the Unresolved Transactions are handled
When attempting to process a transaction, it is marked as unresolved when the transaction can’t be saved for some reason. It also creates an Email Notification, which gets marked as Unresolved via the checkbox field.
Note: When unresolved transactions occur, additional transactions will not be processed on the Chargent order until you resolve them.
Cleaning Up Unresolved Transactions
If an error prevented saving the Chargent Order (Validation Rule, Flow, or Process) and a transaction is present, review the gateway and payments made against the order. If the Chargent Order should be picked up in the next batch, edit the Email Notification to uncheck the “Unresolved Transaction.” You cannot use the Unresolved Transaction tab to process these as the error was not in a transaction. Once corrected, the Chargent batch should be able to process that payment on the next run.
If the error was saving the transaction record, use the Unresolved Transactions tab to process them. You should have the Email Notification that explains why the transaction couldn’t be completed. Once you fix the error, and the record is able to be attached to the existing Chargent Order, you can process the Unresolved Transaction as listed above.
Settlement #
Authorizations are submitted in real-time when you click the Authorize or Charge button in Salesforce, but the capturing of funds does not happen just then. Typically charges are submitted in a batch once per day in what is known as settlement.
Settlement batches can have any number of transactions greater than 0. There is no minimum for a batch, though there is typically a cut-off time daily when the batch is created. Once settlement happens, a transaction can no longer be voided, and the process of getting money into your bank account has started.
Settlement batches can sometimes be initiated manually, but most payment gateways automatically settle transactions at a particular time. The following are some examples for some of the more popular gateways. For times specific to your transactions, you should contact your gateway.
- Authorize.net: Settlement happens at the “Transaction Cut Off Time”, which can be configured in the Authorize.net interface
- Chase: The auto settle time is chosen during the Chase Orbital application process. To change it, contact the production helpdesk.
- Cybersource: Can vary, though typically Midnight Pacific time. Settlement batch time can be changed by contacting support.
- Stripe: Midnight UTC (4pm PST / 5pm PDT)
Credits and Unlinked Refunds #
Some gateways allow the processing of unreferenced Credits. Credits allow you to send money to a checking account (ACH/Direct Debit) when the transaction is not a refund of a previous payment. Credits may have a different name depending on your gateway provider. For more information on enabling Credits in Chargent, visit Sending Credits.
Gateways that support sending Credits:
- Adyen
- Fat Zebra
- Forte
- Linked2Pay
- ModusLink
- PayTrace
- USAePay
- Vantiv eComm (aka Litle, WorldPay eComm)
Some gateways allow the processing of Unlinked Refunds. Unlinked Refunds allow you to send money to a credit card or bank account when the transaction is not a refund of a previous charge. This relaxes the time constraint for refunds and can be used to issue a refund greater than 60 days after a transaction is settled. Unlinked refunds are also used to refund a customer after a credit card has expired, allowing you to issue the refund to a different card. For more information on enabling Unlinked Refunds, visit Sending Unlinked Refunds.
Gateways that support sending Unlinked Refunds:
- Authorize.net
- CyberSource (Stand-Alone Credits)
- Merchant e-Solutions
- PayTrace
- PlanetPayment
- SecureCo
- TransactPro
- Vantiv eComm (aka Litle, WorldPay eComm)
- VeriPay
Currency #
Chargent supports transactions in more than 150 different currencies. Please note your payment gateway and processor will determine:
- What currencies you can accept
- The currency your transactions are sent in (or converted to a different currency)
- The currency your payments are settled in
If you wish to accept multiple currencies, you should start with a conversation with your payment processor and gateway. If you are looking for a new payment provider to support a particular currency, please contact us for assistance.
Chargent also supports multiple active payment gateways so that merchants can leverage the one that best serves a particular transaction. For instance, it is common to use different payment gateways for different currency transactions.
Default Currency #
The default currency is sent to your payment gateway based on two different settings. The field you select from the Payment Console or Payment Request when processing a payment using Chargent Anywhere. The other default setting is in your Chargent Settings under your Advanced Settings tab.
When you set up your payment gateway you will be prompted in the wizard to choose the currencies you will accept. These currencies are stored on the gateway record and available with the Chargent Payment Console and Chargent Payment Requests.
Note: If you are using multiple currencies, and on an older version of Chargent, we recommend updating your current package to the most current version from our installation page.
For the Payment Console, the main default currency will be the one you designate when processing a payment. You can select the currency from the picklist. These will be the same currencies you set up in your gateway record. This field is defaulted to ‘United States dollar’ but the default can also be changed based on the default currency setup in your Chargent Settings Advanced Settings.
Note: If you don’t see a currency listed, you should check the gateway settings to make sure it’s listed as an Available Currency. If the currency isn’t listed, update the currency accepted.
For payment requests, select the currency prior to sending the request from the Currency drop-down to indicate the currency chosen. Like Payment Console, this field can also be changed to auto-populate with a different currency based on your Chargent Settings Advanced Settings.
The Chargent Settings Advanced Settings provides a Default Currency field. This is the field that automatically populates the default Currency field on your Payment Request and Payment Console currency. This also acts as a default when no currency is selected.
The currency sent to the gateway will be reflected on the Chargent Order under a Visualforce field called Currency. Add this Visualforce field to the Chargent Order Page Layout in order to be visible.
Chargent Orders have a Visualforce field for currency that can be added to the Page Layout. When you add the Visualforce field, it works with the currencies selected during the Chargent Setup Wizard and allows you to select the correct currency from the picklist.
When adding the Visualforce field to the Page Layout, make sure you update the size so that the height is 25.
To set the default currency in your Chargent Settings:
- Select the Chargent app from the App Launcher icon
at the top-left of your screen.
- Click the Chargent Settings tab.
- Select the Advanced Settings subtab.
- Under Gateway Settings, select your default currency from the Default Currency picklist.
- Click Save.
Gateway Currency Settings
To update the default currency in the gateway settings:
- Click the App Launcher icon
at the top-left of your screen.
- Enter “gateways” in the Quick Find box.
- Select the gateway you want to edit. If you don’t see the section for Available Currencies you may need to add that to the Gateway Page Layout.
- Click Edit.
- Select the desired currencies up to a maximum of 100.
- Click Save.
Chargent strives to provide as many currencies as possible but in the event you find your currency is not listed, you can add it to the list. Currencies are part of your gateway record under a picklist called Available Currencies.
Adding A Currency
To add currencies to the picklist you want to do the following:
- Click the gear icon
and choose Setup.
- Navigate to Objects & Fields, and select Object Manager.
- Locate the Gateways object and choose Fields and Relationships.
- Click on Available Currencies.
- Scroll down to the list of values and click New to add a currency.
Note: Don’t forget to update your Payment Gateway record in Salesforce to accept this currency.
When you add your currency, make sure that the country is listed in the Country Mapping tool.
API Notes for Currencies
Chargent uses ISO 4217 standard in internal mapping for currency values. For example, if you pass United States dollar currency via API, we’ll send USD or 840 value on the gateway side (depending on the particular gateway).
If you pass a currency that is not contained in Chargent’s internal mappings, it will be passed directly to the gateway without changes. For example, if you pass “MyMadeUpCurrency” currency via API, we’ll send “MyMadeUpCurrency” value to the gateway, as it is not described in ISO 4217. You can use this feature to directly submit ISO values also: if you pass “GBP” currency via API, we’ll send “GBP” value to the gateway.
Chargent contains mappings for over 150 currencies in its Available Currencies field. Here are some of the more popular currencies.
- Australian Dollar
- Belgian Franc
- Canadian Dollar
- Swiss Franc
- German Mark
- Euro
- French Franc
- Luxembourg Franc
- New Zealand Dollar
- Pound Sterling
- Russian Ruble
- Singapore Dollar
- Thai Baht
- U.S. Dollar
- Plus 139 more. . .
- Plus any custom value you wish to pass to your gateway
Please note that not all these currencies are accepted by all payment gateways, and we may be able to enable additional currency support based upon your requirements.
States and Provinces #
Review two fields on the Chargent Order object for states:
- Billing State: A picklist field you can add values to or customize for your own Salesforce org.
- Billing State / Province: An optional text field where any value can be entered.
When standardizing the picklist values or what is entered in the text field, it is important to run some tests with your Payment Gateway’s address verification settings (AVS). Some payment gateways may want the full name, or require a two-digit abbreviation, or allow both.
Note: Any text value entered in Billing State / Province will override the Billing State picklist field and will be what is sent to your payment gateway.
Countries #
The Billing Country field on the Chargent Order is a picklist that allows you to choose the country for the billing address. Chargent attempts to match the value entered with the country abbreviation or ISO code which most Payment Gateways require.
You have the ability to map values to standardized country names / codes. This is useful in scenarios where country names or abbreviations are not standardized in a Salesforce org.
Country Mapping
Chargent has all country names from ISO 3166-1 standard in its internal mapping. Often users want to use non-standard names for countries, for example “USA” instead of the full name (United States of America) or two-digit standard (US). In that case, your Salesforce administrator can add these country names to a custom setting called “Country Mapping.” This will ensure that the expected, standardized country values are sent to your Payment Gateway for address validation.
Use the Country Mapping tool to add the Country Code to the list.
- Click the gear icon
and choose Setup.
- Under Custom Code select Custom Settings.
- Next to Country Mapping click Manage.
- Click New and name it.
- Add your ISO country codes.
- Click Save.
Chargent will check the custom settings for country mapping first. If no country is found in custom settings, Chargent checks its internal mapper. If no value is found in the internal mapper, the original value in the country field will be passed to the gateway without mapping.
Internal country map can be represented by the following table:
Country Name | Alpha-2 | Alpha-3 | Numeric |
United States of America | US | USA | 840 |
The internal mapper searches by label, alpha-2, alpha-3, and numeric values. So, if you entered ‘US’ or ‘USA’ or ‘840’ instead of ‘United States of America’ – the mapper will correctly find the necessary value and send it to the payment gateway.
To catch other non-standard values and correctly map them (if validation is not being enforced elsewhere in Salesforce), simply add them to the mapping values. For example:
Country Name | Alpha-2 | Alpha-3 | Numeric |
Merica | US | USA | 840 |
Address Verification System (AVS) #
The Address Verification System (AVS) is 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 have a wide variety of options available to use AVS for handling transactions that should be declined or approved based on matches of the AVS data.
The Address Verification System checks the numeric portions of the Billing Address. As an example, if you enter 1234 Main Street, Anytown, CA 94107 as the Billing address in Chargent, the AVS checks that the 1234 street number matches the 94107 zip code.
AVS is supported by Visa, Mastercard, and American Express through most card-issuing banks in the US, Canada, and the UK. Credit cards issued by banks in other countries may not support AVS and should return a response that it is not supported.
AVS Response Options
The card networks do not decline transactions based on a mismatch with the street address number or zip code. Instead, they return an AVS response, and you can configure filters in your payment gateway to decline or approve the transaction.
If you are in a business that does not experience credit card fraud generally, you may choose to approve transactions despite mismatches in some or all of the AVS data. For example, some B2B transactions have a low rate of fraud but a higher than normal rate of AVS mismatches, as the person using the card could be unaware of the correct billing address on a company card.
Note: Regardless of the AVS Response flag, the credit card will have been authorized by the issuing bank. This means that your customer may have a temporary authorization hold on their card even if your payment gateway settings cause the transaction to be declined.
You may still be able to capture an authorization that received the AVS decline. You should review those orders carefully, and your bank may charge a higher fee on transactions that did not pass AVS checks. Many banks and processors use AVS as a way of avoiding non-qualified transaction surcharges. That can add about 1% to transactions, but may be worthwhile to your business if you have low fraud and a customer who you want to take a payment from without passing AVS checks.
AVS Configuration
When configuring your payment gateway filters, there are a number of response codes that AVS returns. Choose which ones to reject (decline) and which ones to accept (approve).
Log into the web interface of your payment gateway to configure which codes you want to enforce as filters, rejecting transactions that come back with those AVS codes. Here is a sampling of common codes:
- R = AVS was unavailable at the time the transaction was processed. Retry transaction.
- G = The credit card issuing bank is of non-U.S. origin and does not support AVS.
- N = Neither the street address nor the 5-digit ZIP code matches the address and ZIP code on file for the card.
- A = The street address matches, but the 5-digit ZIP code does not.
- Z = The first 5 digits of the ZIP code match, but the street address does not.
- W = The 9-digit ZIP code matches, but the street address does not.
- Y = The street address and the first 5 digits of the ZIP code match.
Require AVS Salesforce Field
The Chargent field Require AVS on the Gateway record in Salesforce is used to generate an error if it is checked and the Billing Address and Billing Zip/Postal Code fields are blank.
It is a best practice to always populate the Billing Address, City, State and Billing Zip Code/Postcode as they are often required by the payment gateway. Some gateways such as Cybersource also require Country and Billing Email to be sent.
Card Verification Number (Security Code) #
The CVN (Card Verification Number), also referred to as CVV2 (Card Verification Value 2), CVC2 (Card Validation Code 2), CVC (Card Verification Code) or CID (Card Identification Number) is a three-digit code that appears on the back of credit cards, beside the signature area. For American Express cards, it is a four-digit code on the front of the card.
Card verification numbers, in conjunction with AVS verification, are used to reduce credit card fraud in ‘card-not-present’ transactions (ecommerce or phone, where the physical card is not being swiped). Card verification codes are required for processing cards in Salesforce to reduce the scope of your PCI compliance.
There are a number of response codes, but some common ones are:
- M = Matched.
- N = Not matched.
- P = not processed by processor for unspecified reason.
Note that CVV2 / CVC2 values are never stored in your Salesforce account for PCI Compliance reasons, so typically they should only be used the first time a card is authorized or charged. Chargent recommends tokenization if you are going to be processing recurring or subscription billing. This will allow you to send the first charge to get a token which can be used for future payments.
Card Number Formats #
The first few digits of a credit card indicate whether it is a Visa, Mastercard, American Express, or Discover Card. The first six to eight digits identify the bank that issued the card, and the last digit is a check-digit, used to detect errors. The remaining digits (usually nine) are the cardholder’s account number.
Card Type | Card Number Prefix/Range | Number Length | Card Validation Number Length |
American Express | 34 and 37 | 15 digits | 4 digits |
MasterCard | 51-55 | 16 digits or 19 digits | 3 digits |
Visa | 4 | 16 digits or 19 digits | 3 digits |
Discover |
| 14 digits or 16 digits | 3 digits |
See Also
Implementing Payment Methods
Take Payment Component
Setting Up Payment Requests
Payment Gateway Integrations