# Authorize.net Module

https://docs.wisecp.com/en/authorize-net-module

Take card payments through Authorize.net on your own checkout form, and refund a paid invoice from the invoice screen.

## Reaching the Screen

Go to **Settings → Financial → Payment Gateways**, open **All Modules** and click the **Authorize.net** card: `{admin}/modules/payment?module=AuthorizeNet`

Adding the gateway to the method list clients see is covered in [Payment Modules](https://docs.wisecp.com/en/payment-modules).

## What Is on the Screen

A short settings form: two Authorize.net credentials, one switch and the shared gateway settings every module carries.

The client types the card into your own checkout form and Authorize.net charges it at once. The result comes back in the same step, so the invoice closes without waiting for anything.

The module refunds a paid invoice through the gateway. It does not keep cards, does not open subscriptions and offers no installments. Automatic renewal payments need a gateway that keeps cards.

## Before You Configure It

- An Authorize.net merchant account, or a developer account for testing. The two have separate credentials.
- The currency you charge in enabled on that account.
- A new Transaction Key generated in the merchant interface. It is shown once, so copy it there and then.

## Fields

- **Login ID**: The API login id of your Authorize.net account. Required.
- **Transaction Key**: Authenticates charge and refund requests. Required.
- **Sandbox Mode**: Sends every call to the Authorize.net test environment. On by default, so untick it once you enter live credentials.

**Status**, **Commission Rate (%)**, **Converting Currency**, **Accepted Amount Range** and the country lists work the same way in every gateway. See [Payment Modules](https://docs.wisecp.com/en/payment-modules). **Callback URL**, **Success URL** and **Failed URL** cannot be edited: copy them with the icon at the end of the field.

## Tasks

### Take the credentials from Authorize.net

1. Sign in to the Authorize.net merchant interface. For testing, sign in to your developer account instead.
2. In the new interface, open **Account → Account and API Settings → API Credentials & Keys**. In the classic interface, use **Account → Security Settings → API Credentials & Keys**.
3. Copy the API Login ID, then choose **New Transaction Key** and confirm with the PIN you receive.
4. Copy the new key immediately. The old key stays valid for 24 hours unless you select **Disable Old Transaction Key Immediately**.

### Enter the credentials

1. Open the module card and tick **Status**. The other fields stay locked until you do, and nothing else is saved while it is off.
2. Replace the values in **Login ID** and **Transaction Key** with your own.
3. Untick **Sandbox Mode** when the credentials are live ones, and leave it ticked while you test.
4. Click **Save Changes**. Clients who pick this method now see the card form.

With sandbox credentials, pay a test invoice using an Authorize.net test card. Check the provider transaction and the invoice's **Paid** status.

### What the client goes through

1. The client picks this method at checkout, on an invoice or when adding funds.
2. The client types the card number, the expiry date and the security code.
3. Authorize.net answers in the same step. A refusal is shown on the form with the reason the gateway gave.
4. An accepted charge closes the invoice and the service is activated.

### Refund a payment

Wait until the charge is settled at Authorize.net. Void an unsettled charge in the provider account; this module does not void it automatically.

1. Open the paid invoice: `{admin}/invoices/detail?id={invoice}`
2. Under **Summary → Change Status**, select **Refunded** and **Refund via payment gateway**. Click **Update Status**.
3. Authorize.net returns the amount collected for that invoice, which can be a part of a larger charge.
4. When the invoice carries no gateway reference, the refund fails and the status stays as it was. Refund it from your Authorize.net account instead.

## Things to Watch

> **The card arrives with sample credentials**
> 
> A fresh module card already carries a login id and a transaction key that are not yours, and **Sandbox Mode** is ticked. Replace both values before you take any real payment. Left as they are, charges go somewhere you do not control and no money reaches your account.

> **No notification address to register**
> 
> The result arrives with the charge, so this gateway needs no webhook at Authorize.net. There is no field for a signature key either, and a notification sent to the callback address is refused. Leave the address unused.

> **No kept cards, no subscriptions**
> 
> Clients type the card again for every payment, and renewal invoices are not charged on their own. Choose a gateway that keeps cards under **Card Storage Module** when you want automatic renewal payments.

## Required Privileges

**Payment Module Settings** (`MODULES_PAYMENT_SETTINGS`) is required. Invoice refunds also require `INVOICES_OPERATION`.

## Related Articles

- [Payment Modules](https://docs.wisecp.com/en/payment-modules)
- [Invoice Detail Overview](https://docs.wisecp.com/en/invoice-detail-overview)
- [Module Management](https://docs.wisecp.com/en/module-management)
