AppFrontier

BlueSnap Payments Salesforce Integration

Integrating BlueSnap with Salesforce using Chargent



Easily connect BlueSnap and Salesforce with Chargent,

the leading payments app on the Salesforce AppExchange. See all BlueSnap transactions, manage refunds, send payment links and more, all inside Salesforce.

Not yet a Chargent customer?
Contact us for a no-obligation 30 day trial, and see for yourself!




This guide contains instructions for integrating your Salesforce.com environment with the BlueSnap payment gateway in as little as 5 minutes —using the Chargent payment processing application.

Click a link to go directly to one of these sections:



Overview

BlueSnap is a global payments company that believes every customer has the right to a seamless online experience and the ability to purchase easily, quickly, and securely. According to BlueSnap, since merchants spend countless hours bringing their products to market, they deserve the technology, tools, and support to create an exceptional buying experience.

logo


Using this guide, it’s easy to connect Salesforce to the BlueSnap Payments gateway with the Chargent app. Chargent has many features to offer, including automating and streamlining Salesforce payment processes, easy subscription management, click-to-charge buttons, payment request emails, and more.

Connecting BlueSnap with Chargent gives you the ability to easily build a seamless process for completing payment for orders that you manage in Salesforce. The integration connects the BlueSnap gateway directly to Salesforce. Chargent also supports BlueSnap tokenization for processing credit card payments.



Your BlueSnap Sandbox Account

The first task is to get a sandbox / test account from BlueSnap so that you can run test transactions from Salesforce. To obtain a sandbox account, complete the form on the sign up page.

sandbox

You will receive an email to verify your account. Click the link and fill out the necessary information. Once completed you will be able to access your BlueSnap Dashboard.


Whitelist IP Address

Login to your BlueSnap account. You will need to whitelist all of Salesforce IP addresses and ranges in order to process payments using your API username and password.

Click the Settings menu in the upper-right, then click the API Settings item to access the page, then scroll to the Authorized IPs section. Enter the new IP address that you need to whitelist, and then click the Add button.

ip

Note: If you don’t want to use IP Verification you can disable this by clicking the check box below showing Disable IP Checking. This will allow you to send transactions to BlueSnap without verifying the IP address.

ip


API User ID, API Password, and Store ID

Access the API settings page again (if you aren’t already there from whitelisting your IP addresses), and you will see your API Username, API Password , and Default Store ID . The API Username and Password must be specified when configuring the Gateway setup in Salesforce (we will discuss this more in the next section).

api settings


Prior to setting up BlueSnap in Salesforce

Prior to following the steps in this guide, Chargent should be installed in your Salesforce org and licenses assigned. If you have not yet installed, a 30 day free trial is available on our Installation Page.

For Chargent versions prior to 5.57 you may need to activate the Remote Site Settings in Salesforce if they aren’t already active for BlueSnap.

    • Click the gear icon on the top right and select Settings
    • Under Security select Remote Site Settings
    • Locate BlueSnap_Test and click edit
    • Check the Active box
    • Click Save
    • Do the same for BlueSnap_Test


Setting Up Salesforce to Connect to BlueSnap




Add a BlueSnap Gateway record in Salesforce using Chargent’s Gateway Wizard.

  1. Click on the App Launcher on the top left side in Salesforce.

  2. applauncher

  3. Select Chargent as the App

  4. Select the Chargent Settings Tab

  5. Choose Chargent Setup Wizard

  6. chargent settings

  7. Do you have a Payment Gateway account - Select Yes

  8. Select BlueSnap as your Payment gateway.

  9. Select Test Transactions for testing or Live Transactions if you are looking to process real time payments.

  10. Follow the prompts to configure your gateway.

You will need the following information:

  • Add your credentials based on your Sandbox (Test) or Production Live BlueSnap account.
    • User ID:(This is your BlueSnap API Username
    • Password: This is the BlueSnap API Password


Other information that will be asked:

  • Will you be using tokenization? (recommended)

  • What currency will you be using? (USD, CAN, etc.)

  • What payment methods will you be accepting?

  • Credit cards and/or Direct Debit / ACH (electronic check)
    • What Credit Card types will you be accepting? (Visa, Mastercard, etc…)

  • Payment Console Setup (Premium feature for Platform Edition)
    • Show Charge Button
    • Show / Create Update Token Button
    • Show Authorize Button




Add a BlueSnap Gateway record in Salesforce (Chargent versions prior to 5.40)

  1. Click on the AppLauncher on the top left side in Salesforce.

  2. applauncher

  3. In the Search for apps or items box, Search for Gateways and select

  4. gateways

  5. Click New and select BlueSnap as the Gateway Type

  6. Map the following fields in Chargent with your credentials from BlueSnap:

    • Merchant ID: BlueSnap API User Name

    • Merchant Security Key: BlueSnap API Password

  7. Setup the following Gateway fields

    • Active - Check to make the Gateway active

    • Use Tokenization - If you are planning on using BlueSnap tokenization (recommended)

    • Available Card Types - Select the cards you will be accepting (this is based on your gateway settings and what card types they can process - Visa, Mastercard, American Express, etc..)

    • Available Payment Methods - Will you be accepting just Credit Cards or Direct Debit / ACH

    • Available Currencies - What currencies will you accept (this is based on your payment gateway and the currencies they accept payment in.

    • Credit Card / Bank Account Data Handling - This lets Chargent know when to clear the information in Salesforce. You have 4 options.

      • Never Clear
      • Clear After Successful Charge
      • Clear After All Transactions
      • Clear When Token is Present (recommended)


      • new gateway

When using Payment Requests or Payment Console the following should also be set. Please note these features come with Sites and Platform edition & require activation in your Production Org.

  • Available PR Transaction Types
    • Charge Full Amount - Charges the credit card immediately
    • Authorize Full Amount - This option won’t charge the card but only holds the funds available until you capture them.
    • Authorize Minimum Amount - This option won’t charge the card but only holds the minimum amount that your gateway will allow. You will need to charge the correct amount in order to capture the transaction

    • card types

  • Show Charge Button
  • Show Authorize Button

  • pr transaction


Your Gateway page should look similar to the figure below once you have saved.

gateway test


Testing the Integration

Now that you have created the BlueSnap gateway record in Salesforce, it is time to run some test transactions to ensure it was set up correctly, and understand how Chargent works to take payments within Salesforce.

Create a Chargent Order in Salesforce to run test transactions

  1. Click on the App Launcher in the top left side and select Chargent as the App.

  2. chargent app

  3. Click the Chargent Orders Tab.

  4. Click on New

  5. Enter in the following information:

    • Account: The Account the Chargent Order should be associated with.

    • Payment Type should either be credit card or check depending on if you are testing credit cards or Direct Debit / ACH (electronic check)

    • Billing Information
      • Billing First Name
      • Billing Last Name
      • Billing Address
      • Billing City
      • Billing State / Province
      • Billing Zip Code / Postal Code
      • Billing Email Address(if you want to test the email receipt that gets triggered upon a successful transaction)

    • Charge Amount- The amount you want to test with in order to process a test transaction.

    • Manual Charge check this box to enter a number directly in the Charge Amount. If you are entering Subtotal, Tax, and/or Shipping then the Charge Amount will be automatically calculated and the Manual Charge box does not need to be checked.

    • IP Address c(if you are using IP Check in BlueSnap). This field may need to be added to your Page Layout in Salesforce. You can also disable IP check from within in your BlueSnap account settings.

    • Credit Card Number = See BlueSnap test credit card information. BlueSnap uses different test credit card numbers to determine the response message and whether it’s approved or declined for specific reasons. For ACH testing see BlueSnap’s Test ACH Account and Routing Numbers.

    • Card type (Visa, MasterCard, etc..) or Bank Account Type for Direct Debit / ACH (Checking or Savings).

    • Card Expiration Month and Card Expiration Year should be in the future


    • order

  6. Click Save

  7. Click the Charge button. You will receive a pop-up asking for the CSC (Card Security Code). See the BlueSnap test cards for the correct CSC. If the CSC is blank you can leave this field blank.

  8. charge

  9. Press the Charge button

You should receive a popup that shows the test transaction was approved.

trx


BlueSnap Test Credit Cards

For testing BlueSnap with Latin America (LatAm) accounts and integrations please see the full BlueSnap testing information from their website.

Card Type Card Number Exp. Date CVV Code Country Result
Amex 374245455400126 05/2023 Success
Amex 378282246310005 05/2023 Failure
Discover 60115564485789458 12/2023 US, USD Success
Discover 6011000991300009 12/2023 US, USD Success
JCB 3566000020000410 02/2023 123 CA, CAD Success
JCB 3530111333300000 03/2023 JP, JPY Failure
MasterCard 5425233430109903 04/2023 Success
MasterCard 5425233430109903 12/2004 Invalid Exp Date
MasterCard 2222420000001113 08/2020 Success
MasterCard 2223000048410010 09/2020 Success
Visa 4263982640269299 02/2023 837 Success
Visa 4263982640269299 04/2023 738 Success
Visa 4917484589897107 01/2023 ARS, EUR, USD Failure


BlueSnap Test ACH

Routing Number Account Number Response
123456789 123456789 Decline
Any number except 123456789 Any number except 123456789 Success


Congratulations!

You are now up and running with BlueSnap in Salesforce!

We recommend additional testing prior to going live, as well as running a few live transactions prior to launch (test and live BlueSnap environments are not always the same.

For additional details on testing and validating your BlueSnap Salesforce integration, please see the additional sections below.



Sending Live Transactions from a Salesforce Sandbox

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

When Chargent is installed in a production or developer Salesforce org, the Test Endpoint checkbox on the Gateway record will select between sending to the payment gateway's live and test environments.

If you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, simply use Chargent's Endpoint Override field on the Gateway record, and enter the production endpoint of your chosen gateway there.

BlueSnap Production endpoint URL:https://ws.bluesnap.com/

Note that the full endpoint URL must be entered in the Endpoint Override field, and the domain must be present in the Remote Site Settings (for standard Chargent integrations it should be already present).



Understanding Transactions

When a transaction occurs between Chargent and the BlueSnap gateway, a new transaction record is created in Salesforce. The listing of transactions can be found under the Related tab on the Chargent Order.

chargent ord

Click a Transaction ID link to see the details, as shown in the figure below. This transaction record contains the entire set of data that BlueSnap sends in its response, including the transaction Type (Charge, Authorize, Refund or Void), the Response Status (Approved, Declined, Error), and any related approval or error messages.

details


Verifying Transactions in the BlueSnap Dashboard

You can compare the transaction records in Salesforce with the records in your BlueSnap dashboard. Login to the BlueSnap test dashboard and click the Reports menu item on the left side, and then click the Transaction Detail link in the first section (as shown in the figure below).

transaction details

You’ll see a transaction listing similar to this one.

invoice

In the listing, locate the transaction of interest and click on one of the links in the transaction row, then click again on the item of interest on the next page to see the details for that transaction.

reference


Moving to Production

You’ll need a BlueSnap production account for this step. When you’re ready, use the contact information in the enrollment email messages to work with BlueSnap Support and obtain the same set of credentials for your production account.

Follow these steps to configure the production integration in Salesforce:

  1. First, obtain the production credentials for the BlueSnap production gateway account—similar to the method given for sandbox credentials in Obtain a BlueSnap Sandbox Account.

  2. Also get the production API Username and API password, in a manner similar to the instructions found in the API User ID, API Password, and Store ID section above.

  3. Repeat the steps in the Configuring Salesforce for BlueSnap Integration section above, but substitute the production credentials.
  4. Repeat the steps in the Testing the BlueSnap Integration section above with respect to the SalesForce production environment, using the production credentials.

  5. Be sure to successfully transmit at least one real credit card transaction using company or personal accounts. We recommend that you submit a transaction with a very small amount and then void that transaction afterwards. This ensures that the system works with your production credentials.



Tokenization

BlueSnap offers the ability to store customer payment profiles, eliminating account numbers and other sensitive payment data from your Salesforce account. This lowers the scope of your PCI compliance efforts and ensures that your customer's sensitive information is not compromised in the event of a security breach.

BlueSnap stores your customer's information and replaces it with a unique identifier or token. Chargent then stores the token in the Token field in Salesforce, to be used for future payments.

The BlueSnap token identifies the credit card as well as the associated billing, shipping, and card information of a customer.

Chargent by default does not store any sensitive cardholder and account data in Salesforce this is accomplished by using the Payment Console feature which is available in the Platform Edition of Chargent. With Payment Console Chargent users can create a BlueSnap token without ever saving sensitive data to the Salesforce database.

Tokenization should already be enabled, if you used the Gateway Wizard . If you haven’t already set up tokenization during the initial configuration of your BlueSnap account in Salesforce, this section will assist you in setting it up.

  1. In the top left corner click on the App Launcher

  2. Search and select Gateways

  3. Click on BlueSnap

  4. Click Edit

  5. Check the box that Says Tokenization

  6. Under the Credit Card / Bank Account handling field choose one of the following.

    • Never Clear
    • Clear After Successful Charge
    • Clear After All Transactions
    • Clear When Token Present (Recommended):

  7. Click Save.

  8. record


Note: The token is stored in Chargent's Token field in Salesforce after your first successful transaction, and the credit card fields are handled as specified in the procedure.



Transaction Synchronization

Chargent has always sent charges and authorizations to the payment gateways, and records the result in a real-time Transaction in Salesforce. On select gateways like BlueSnap, Chargent can also update Salesforce records long after the initial transaction—for ACH transactions that are returned for non-sufficient funds (NSF), credit card authorizations that expire, and more.

Two fields, Transaction Status and Settlement Date can now be updated through a daily scheduled batch in Salesforce.

Possible values of the Transaction Status are either final or non-final. It the status is final, then no more updates will occur for that transaction. Also, batches will not pick up any transaction having a final status.

The Settlement Date field stores the date and time when the Transaction Status is changed to final (such as "Settled" or "Voided"), after which it will no longer receive any updates.

To schedule the batch, navigate to Setup > Develop > Apex classes, and then click the Schedule Apex button.

Batch Name: ChargentOrders.scheduledBatchUpdateTransactionStatus()

The following are the various transaction status values for BlueSnap. Use either of the last two values to learn when a transaction has been dishonoured, and take appropriate action within Salesforce—such as sending an email or assigning a follow-up task. Previously, it was necessary to do a daily check of BlueSnap reports or wait for a letter in the mail to learn about the status of such transactions.

Card Transactions

  • SUCCESS
  • FAIL
  • IN_PROGRESS : Batch processing is in progress
  • IN_QUEUE : Batch was created and is waiting to be processed

ACH Transactions

  • PENDING: Invoice was not yet approved.
  • SUCCESS: Invoice was approved and the shopper's account was debited.
  • FAIL: Invoice was canceled and the shopper's account was not debited.
  • REFUNDED: Invoice was refunded in response to a chargeback or refund requested by the shopper.


Gateway Field Mapping

This table contains the mapping information between the gateway and Salesforce fields.

Salesforce field Direction Gateway field
Gateway ID < Order reference at the top of BlueSnap detail page
Gateway Date > Date/Time at the top of BlueSnap detail page
Invoice Number > Merchant Transaction ID
Order Information > softDescriptor
Customer IP shopperIpAddress
Token < vaultedShopperId