The integration between Salesforce and your gateway provider relies on a handful of Billing Address fields. Because every gateway is different, Chargent is designed to handle the mapping and conversion of your billing data, allowing you to focus on taking payments and not spend time mastering the nuances of abbreviations or ISO codes.
This page is designed to help users understand Chargent’s billing address fields in greater depth. It also provides helpful information for users who want to go beyond the standard address naming conventions included in your Salesforce org.
Billing Country Field #
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 and 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 checks 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. The 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 |
For more information, see our Knowledge Articles about countries.
Billing State / Province Fields #
Each gateway handles state and province names or abbreviations differently. Before changing the state or province values on Chargent orders in Salesforce, check with your gateway for specific guidelines.
Chargent uses two fields on the Chargent Order object for states:
- Billing State: A picklist field you can add values to or customize for your own business.
- 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 of your payment gateway’s Address Verification System (AVS) settings. Some payment gateways want the full name, 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.
For more information, see our Knowledge Articles about states and provinces.
See Also
Understanding Payments
Address Verification System (AVS)
Chargent Terminology