Authorize.net

The Authorize.net add-on needs to be installed and activated to see the features mentioned in this documentation.

Connecting Ninja Forms to Authorize.net

The first step to using Authorize.net with Ninja Forms is entering your API Login ID and Transaction Key. This will allow your forms to communicate with Authorize.net and is a required first step before payments can be collected.

  1. To access your API Login ID and Transaction Key:

    Production CredentialsSandbox / Test Credentials
    image of authorize account screen, Authorize.net Live Credentials

    1. Log into the Merchant Interface.
    2. Click Account from the main toolbar.
    3. Click Settings in the main left-side menu.
    4. Click API Credentials & Keys.
    5. Select New Transaction Key.
    6. Note: When obtaining a new Transaction Key, you may choose to disable the old Transaction Key by clicking the box titled, Disable Old Transaction Key Immediately. You may want to do this if
      you suspect your previous Transaction Key is being used fraudulently.
    7. Click Submit to continue.
    8. Request and enter PIN for verification.
    9. Your new Transaction Key is displayed.

    For more information please refer to Authorize.net’s guide, What Are the API Login ID and Transaction Key?.

    image of authorize account screen, Authorize.net Sandbox Credentials

    1. Sign up for a Sandbox account here. image of authorize account screen, Authorize.net Sandbox Account
    2. Upon form submission, you will be redirected to your API Login ID and Transaction Key.  Copy the credentials and add them to the Sandbox API Login ID,
      and Sandbox Transaction Key fields.image of authorize account screen, Sandbox Credentials

    Authorize.net Testing Guide –  https://developer.authorize.net/hello_world/testing_guide.html

  2. Enter the API Login ID and Transaction key under Ninja Forms > Settings > Authorize.net
    Ninja Forms, settings, Athorize.net settings
  3. Click Save Settings.

Setting up an Authorize.net action

To add the action to any form, from the Emails & Actions tab click Add New Action and then the Authorize.net action from inside the Actions Window that opens.

image of the Emails and Actions tab of the form builder with Add New action and the authorize action highlighted within the actions window

With the action added to your form, select the total that will be sent to Authorize.net from the GET TOTAL FROM dropdown. You can select one of the following choices:

Fixed Amount

Charging a Fixed Amount

If the total sent to Authorize.net is going to be a fixed amount that never changes select the Fixed Amount option. Then, enter the amount into the ENTER AMOUNT
setting.

When the form is submitted, users will be prompted to pay this fixed amount via Authorize.net.

image of authorize action settings, Fixed Amount

Calculation

Using a Calculation to generate a total

If you are charging variable amounts per purchase via a Ninja Forms calculation, that total can be sent to Authorize.net
directly as the amount the user will be charged.  Simply select Calculation from the GET TOTAL FROM setting, and then select the calculation itself in the
SELECT CALCULATION
dropdown.

  When the form is submitted, users will be prompted to pay the calculation’s value via Authorize.net

image of authorize action settings, Authorize.net Calculation

Field

Using a form field as the total sent to Authorize.net

If your purchase total is contained within a field such as a Number field, you can have the value of that field sent directly to Authorize.net.  Simply select the Field
option from the GET TOTAL FROM setting, and then select the field that houses your total from the SELECT FIELD dropdown.

When the form is submitted, users will be prompted to pay the field’s value via Authorize.net.

image of authorize action settings, get total from fixed field

  1. Select the Email Address field from your form by clicking the merge tag icon and adding it to the EMAIL ADDRESS (REQUIRED) field.image of authorize action settings, email setting
  2. Click Done and Publish the form.

Subscription

A subscription allows multiple payments for the purchase of an installment-based payment.

image of authorize action settings, subscription settings

Here is how you set up a subscription payment with Authorize.net:

    1. Toggle the THIS IS A SUBSCRIPTION setting ON
    2. Map the First Name and Last Name fields from your form to the First Name and Last Name fields within the action.
    3. Enter a number in the TOTAL NUMBER OF PAYMENTS field. This setting will determine the total number of the payments.
  1. Add a number to the LENGTH OF PAYMENT PERIOD field and then select a period of time by choosing Months or Days from the dropdown. This setting will determine the frequency of the payments.
  2. Click Done and Publish the form

Trial Period

The Trial Period allows you to indicate a certain period of time at the beginning of the subscription for which a special trial period amount should be billed to the customer.

image of authorize action settings, Trial Payment settings

Here is how to set up a trial period with Authorize.net:

  1. Toggle the ENABLE TRIAL PERIOD setting ON
  2. Enter a number into the NUMBER OF TRIAL PAYMENTS field. Doing so will determine how many “trial” payments will be made before the subscription starts.
  3. Select the total from the GET TRIAL AMOUNT FROM dropdown, by choosing, Fixed Amount, Calculation, or Field.
  4. Click Done and Publish the form

Advanced Settings

Enabling Sandbox Mode

To enable payment testing, toggle the Sandbox Mode setting ON. The setting can be found under the Advanced settings of the Authorize.net action.

With the Sandbox API Login ID, and Sandbox Transaction Key entered as described in Connecting Ninja Forms to Authorize.net, submitting the form in this mode will allow you to test the form with Authorize.net.

This must be toggled off to accept live payments.

Authorize.net also provides a list of test credit cards that you can use while testing:

https://developer.authorize.net/hello_world/testing_guide.html

CUSTOMER BILLING DETAILS

Send Customer Billing Details to Authorize.net by enabling the SHOW BILLING DETAILS, toggle under the Advanced settings.

image of authorize action settings,  Billing Details settings

CUSTOMER SHIPPING DETAILS

Send Customer Shipping Details to Authorize.net by enabling the SHOW SHIPPING DETAILS, toggle under the Advanced setting.

image of authorize action settings, Shipping Details settings

Processing an Authorize.net Payment

  1. Upon submit, a popup will appear requiring the user to enter their Credit Card information and selecting Pay or Cancelimage of payment window that displays after submission
  2. If the payment is successful a green checkmark will appear and the remaining form actions will process.

Authorize.net Merge Tags

Last 4Card Type ( Brand )Transaction IDSubscription ID

{anet:last4}

This returns the last 4 digits of the Credit Card from the Authorize.net payment. The data from this merge tag is not populated until after the payment is made.

{anet:cardtype}

This returns the Credit Card type from the Authorize.net payment. The data from this merge tag is not populated until after the payment is made

{anet:transactionID}

This returns the Transaction ID from the Authorize.net payment. The data from this merge tag is not populated until after the payment is made.

{anet:subscriptionID}

This returns the Subscription ID from the Authorize.net payment. The data from this merge tag is not populated until after the payment is made.