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.
- To access your API Login ID and Transaction Key:
Production CredentialsSandbox / Test Credentials- Log into the Merchant Interface.
- Click Account from the main toolbar.
- Click Settings in the main left-side menu.
- Click API Credentials & Keys.
- Select New Transaction Key.
- 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. - Click Submit to continue.
- Request and enter PIN for verification.
- 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?.
- Sign up for a Sandbox account here.
- 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.
Authorize.net Testing Guide – https://developer.authorize.net/hello_world/testing_guide.html
- Enter the API Login ID and Transaction key under Ninja Forms > Settings > Authorize.net
- 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.
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:
- Select the Email Address field from your form by clicking the merge tag icon and adding it to the EMAIL ADDRESS (REQUIRED) field.
- Click Done and Publish the form.
Subscription
A subscription allows multiple payments for the purchase of an installment-based payment.
Here is how you set up a subscription payment with Authorize.net:
-
- Toggle the THIS IS A SUBSCRIPTION setting ON
- Map the First Name and Last Name fields from your form to the First Name and Last Name fields within the action.
- Enter a number in the TOTAL NUMBER OF PAYMENTS field. This setting will determine the total number of the payments.
- 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.
- 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.
Here is how to set up a trial period with Authorize.net:
- Toggle the ENABLE TRIAL PERIOD setting ON
- 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.
- Select the total from the GET TRIAL AMOUNT FROM dropdown, by choosing, Fixed Amount, Calculation, or Field.
- 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.
CUSTOMER SHIPPING DETAILS
Send Customer Shipping Details to Authorize.net by enabling the SHOW SHIPPING DETAILS, toggle under the Advanced setting.
Processing an Authorize.net Payment
- Upon submit, a popup will appear requiring the user to enter their Credit Card information and selecting Pay or Cancel
- If the payment is successful a green checkmark will appear and the remaining form actions will process.
Authorize.net Merge Tags
{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.