Authorize.net
  • 01 Sep 2022
  • 7 Minutes to read
  • Dark
    Light

Authorize.net

  • Dark
    Light

If you were an Authorize.net customer before coming to Blackthorn | Payments, you may want to sync your customers and payment methods from Authorize.net into Salesforce. Please refer the below documentation for migrating the historic customers and payment methods into Salesforce.

Overview

With Authorize.net, we support over 20 processors. The list of supported processors is here.

When setting up Authorize.net, you can either use Authorize.net as a processor or any number of their supported processors. The pricing will vary.

Scope

The Authorize.net payment gateway is currently supported with PayLink, DocumentLink, and the Events checkout.

Instructions

If you do not currently have an Authorize.net account and need one, please fill out this form. If you have a contract with one of the supported 20+ processors and want to use Authorize.net as your payment gateway, you'll need an Authorize.net account. Use these account credentials to connect your Payment Gateway following the setup doc below.

Customer Information Manager

If you've had an Authorize.net account for a while (pre 2018) you'll want to ensure that you've enabled the Customer Information Manager. This will ensure you don't run into unexpected errors later. From your authorize.net account goto Tools -> Customer Information Manager -> Click "Sign up for Customer Information Manager (CIM) Now". Check out this article for more information and screenshots.

Setup

Create a Payment Gateway

Multiple Currencies

If you are a customer that needs to support multiple currencies through your Authorize.net gateway you will need to create an Authorize.net gateway for each currency. This is a limitation for Authorize.net.

We do have a validation you can enable to make sure your Transaction record currencies match your Payment Gateway currencies. Check it out here.

To begin, you will need to create a payment gateway record to connect to your Authorize.net account. It can be done via the Payment Setup Wizard or the Payment Gateway tab.

Using the Blackthorn | Payment Setup Wizard

  1. Navigate to Blackthorn | Payments (Admin) app and click on the Payment Setup Wizard tab. Select the Provider as Authorize.net.
  2. Set Test to checked (If you want to connect it with your Authorize.net sandbox).
    If you don't have a sandbox account yet, create a sandbox for testing.
  3. Click on Connect to Gateway button and complete the Set Up Wizard flow.

H_02_01_create payment gateway 1

Once the Setup Wizard is completed, you'll notice that the Gateway User EmailGateway Public Key and Payment Gateway Account Country fields are auto-populated, which means that the Payment Gateway is successfully connected.

H_02_01_create payment gateway 2

Using the App Launcher

  1. Navigate to the App Launcher and select Blackthorn | Payments App.
  2. Navigate to the Payment Gateways tab and click New.
  3. Define the Payment Gateway Name.
  4. Set Provider to Authorize.net.
  5. Set Test to checked (If you want to connect it with your Authorize.net sandbox).If you don't have a sandbox account yet, create a sandbox for testing.
  6. Provide a Webhook Label, if webhooks are implemented (Optional).
  7. Provide a valid currency code in Default Currency, the blank in Default Currency will be considered as USD.
  8. Click Save.

H_02_01_create payment gateway 3

  1. Once the record is saved, click on Connect to Gateway.

H_02_01_create payment gateway 4

The Gateway User Email, Gateway Public Key and Payment Gateway Account Country will be auto-populated once the gateway is successfully connected.

H_02_01_create payment gateway 5

Define the Gateway User ID

Once you have successfully connected the gateway, you'll need to manually copy the API Login ID from Authorize.net account and paste in the Gateway User ID field in Salesforce.

Follow these instructions to find the API Login Id in Authorize.net.

  1. Log into your Authorize.net account.
  2. Click on Account and then API Credentials and Keys.

H_02_01_define gateway user id 1

  1. Copy the API Login ID.

H_02_01_define gateway user id 2

  1. Add the value from Step 3 to the Gateway User ID field in Salesforce.

H_02_01_define gateway user id 3

  1. Click Save.

Add a Payment Method

Follow the setup instructions from this guide for setting up Credit Card and ACH Payment Methods with Authorize.net.

Create a Transaction

  1. Create a new Transaction record (Charge).
  2. Set the Payment Method lookup field to an Authorize.net related record.
  3. Set Amount field.
  4. Set Description field (Optional).
  5. Set Invoice Number field (Optional) - You need to add this field to the page-layout.
  6. Save the record.
  7. Click Capture or Authorize.

Refer this guide Charge a Transaction for additional information.

Refund a Transaction

Click Refund to refund a Captured transaction or to release an Authorized transaction.

Only full refunds are currently supported with Authorize.net.

Transaction Errors

An error code and message are provided in the Error Code and Error Message fields when a transaction fails.

Kindly review response codes to find specific details based on the Error Code/Response Code.

To generate a failed transaction for testing: Authorize.net Testing Guide

Webhooks

Webhooks provide a mechanism where a server-side application (In this case Authorize.net) can notify a client-side application (in this case Payments) when a new event (like customer create, update, delete, charge capture, charge failed, etc) has occurred on the server.

Webhooks automatically send specified data to a destination (endpoint) from database events.

Follow our instruction guide here for setting up webhooks in Authorize.net.

Create a Customer in the Authorize.net Portal

If you have created a Customer Profile in Authorize.net webhooks can update Salesforce and add the new Payment Gateway Customer record and Payment Method record.

Considerations:

  • Payment Profile information will used to populate the Payment Method record.
  • Customer Profile in Authorize.net does not contain many fields so in order to populate the Payment Gateway Customer record fields from the Payment Profile may be used.
    • Example: Payment Profile Name from Authorize.net = Payment Gateway Customer Name.

Visa Checkout (Optional)

Get the Visa Key from Authorize.net

  1. Login in your Authorize.net Account.
  2. Click Account tab | Digital Payment Solutions.
  3. Click Signup besides Visa Checkout.
  4. Capture Visa Key from Visa Checkout API Key section.

Create a Salesforce Site (if not yet created)

  1. Register with a site domain in Salesforce Setup | Search for Sites | Sites | Register with a unique Domain | New.
  2. Fill all required information.
  3. Set any page to Active Site Home Page.
  4. Save the record and capture the URL and Path.ex. https://myurl-developer-edition.na91.force.com/mypath

The client-side HTML will call start () function to init (payload). You have to use Visa Key in the HTML and the same value is stored in Gateway Public Key on the Payment Gateway.

Migrating Payment Methods, Customers

If you were an Authorize.net customer before coming to Blackthorn | Payments, you may want to sync your Auth.net Customers (Customer Profile), Payment Methods (Payment Profiles), and Transactions from Authorize.net into Salesforce.

This guide will help you understand our object model so you can easily sync the information using the Data Loader tool.

Here is our instruction deck to get started:

  1. Create a Payment Gateway in Salesforce and connect to your Authorize.net account.
  2. Export customers and cards information from Authorize.net gateway into an excel document. Please convert to CSV type file.
  3. We have two objects in Salesforce - Payment Gateway Customers(PGC) and Payment Methods where this information will be mapped. Prepare an excel spreadsheet with this customer information mapping to respective fields on the Payment Gateway Customer/Payment Method.

Please find the mappings below -

Customer Field Map

Salesforce Field Name Authorize.net Label
Payment Gateway Customer Payment Profile
Email Email
Name First Name + Last Name
Customer ID Customer Profile ID
Description Description
Billing City (Optional) City
Company Company
Postal Code(optional) ZipPostal Code
Billing Street 1 (Optional) Address
Billing State (Optional) StateProvince
Billing Country Country
Phone Phone

Payment Field Map

Salesforce Field Name Authorize.net Label
Payment Method Payment Profile
Holder’s Name First Name + Last Name
Email (Optional) Email
Card ID Payment Profile ID
Customer ID Customer Profile ID
Record Type(Card/ACH) Payment Type (CreditCard/Bank Account)
Street(Optional) Address
City(Optional) City
State (Optional) StateProvince
Country (Optional) Country
Last 4 Digits CardNumber (last 4 digits)
Payment Gateway (lookup) Hardcode the PG id
Payment Gateway Customer(lookup) Fetch id from SF
Payment Method Status Valid
  1. In Salesforce, go to custom settings→ Blackthorn | Payment Triggers edit → Disable all triggers.
  2. Contact Blackthorn support to disable CVV and Postal Code checks. (If you have information about the postal code, we can skip disabling this for you.)
  3. Download the CSV and import into the PGC in Salesforce using Data Loader.
  4. Export the PGC list from Salesforce and fetch the record ID. Map the record ID in your excel spreadsheet to Payment Gateway Customer lookup field on the Payment Method before import.
  5. Import Payment Methods in Salesforce.
  6. Visit the custom settings to “Enable all triggers”.
  7. Alternatively, if you wish to link the contacts/accounts to these PGC or Payment Method records, you can -
  • Create a report in salesforce for contacts with ‘First Name’, ‘Last Name’
  • ‘email’ and ‘record ID’ fields and export them in a CSV file.
  • Create and export a report of all Payment Gateway Customer records with ‘Name’, ‘Email’ and ‘Record ID’ fields.
  • In sheet b, set a new column ‘Contact’ and add formula to match the contacts to the PGC via email, download to CSV then import them back in SF with size 1.
  • Once the contact lookup is set on the PGC, it will auto-update the related account on it as well as the update all associated payment methods with the set contact and account.

If you want a Contact record created, you can create a Process Builder to create a Salesforce Contact when the Authorize.net Customer record is created in Salesforce.

This sync process is only to migrate your records from that moment backwards. Syncing Auth.net with Salesforce going forward can be done through webhooks, but you should not be originating records outside of Salesforce.

Testing data

Find the testing information for Authorize.net here.

Troubleshooting

If you have received an error with Authorize.net or have a question, please view our Troubleshooting page.. If you still have Authorize.net questions, please contact Blackthorn Support. We're happy to help!