Set Up and Configure Authorize.net Webhooks

Prev Next

Once you are connected to Authorize.net, it’s time to configure webhooks. What does a webhook do? It automatically sends specific data from Authorize.net to Salesforce.

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

Prerequisites

You must have Salesforce administrator access and Authorize.net access to complete the following instructions.

Due to a limited number of available fields in Authorize.net, the Payment Profile information in Authorize.net is used to populate the following Salesforce records.

  • Payment Method

  • Payment Gateway Customer

    • Example: Payment Profile Name from Authorize.net = Payment Gateway Customer Name.

Create a Force.com Domain

  1. Go to Setup.
  2. In the Quick Find box, enter “Sites and Domains.”
  3. Click “Sites.”
  4. Enter a value for your Force.com domain.
  5. Click Check Availability.
  6. Review and accept the Site terms of use.
  7. Click Register My Force.com Domain.

Configure Your Site

  1. Go to Setup.

  2. In the Quick Find box, enter “Sites and Domains.”

  3. Click “Sites.”

  4. Click New.

    Create New Site

  5. Enter a Site Label, Site Name, and a Default Web Address. (We suggest using "webhook" or "stripe" for the Site Label and Site Name.)

  6. Set Active = "TRUE" (checked).

  7. For the Active Site Home Page field, click the Lookup icon and select "InMaintenance". (The page is not visible. It's just a placeholder because a value is required).

  8. Click Save.

Assign the Site Guest User Permission Set

  1. Navigate back to the Site you created.

  2. Click Public Access Settings.

  3. Click the View Users or Assign Users button.

  4. Click the link for the site guest user.

  5. Add the Blackthorn | Payments (Site Guest User) permission set to this user's record.

    Assign Payments Site Guest User PS

  6. Click Save.

Configure Webhooks in Authorize.net

In this section, you will gather the different components that will make up the URL before adding it to Authorize.net.

The URL will have the following format: https://SITE_DOMAIN_NAME/SITE_PATH/services/apexrest/bt_stripe/webhook/WEBHOOK_LABEL

  • SITE_DOMAIN_NAME = The Salesforce Domain Name for the Site you set up

  • SITE_PATH = The Path for the Site

  • WEBHOOK_LABEL = The value in the Payment Gateway Webhook Label field

  • “services/apexrest/bt_stripe/webhook” remains the same

Create a Salesforce Webhook Site URL

  1. Go to Setup.

  2. In the Quick Find box, enter “Sites and Domains.”

  3. Click “Sites.”

  4. Locate the site you just created and click the URL.

  5. Copy the URL.

  6. Replace “SITE_DOMAIN_NAME/SITE_PATH” with the copied URL.

  7. Leave “services/apexrest/bt_stripe/webhook” as is.

  8. Open the related Payment Gateway record.

  9. Copy the value in the Webhook Label field.

  10. Replace “WEBHOOK_LABEL” with the copied value from the Webhook Label field.

  11. To verify that the new URL works, open a new browser tab and paste the URL. You will see the following message.

Configure the URL in Authorize.net

  1. Go to your connected Authorize.net account dashboard.

  2. Click the Account tab.

  3. Click Settings.

  4. Click Webhooks.

    H_02_21_configure webhook authdot 1

  5. Click Add endpoint.

    H_02_21_configure webhook authdot 2

  6. Define a Name.

  7. In the Endpoint URL field, enter the Salesforce webhook Site URL you created.

  8. Set Status = "Active".

  9. Under Select Events, check "All Events."

  10. Click Save.

If you have multiple Authorize.net accounts connected to your Salesforce org and want to create a Webhook Endpoint for each in Authorize.net, you can use the same Salesforce Site. Change the WEBHOOK_LABEL part of the URL to the Webhook Label value on the Payment Gateway record you want to use.