> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorize.net integration

> Set up the Authorize.net Cometly integration to send transactions and new subscriptions as events, so each payment is tied to the ad behind it.

The Authorize.net Cometly integration sends transactions and new subscriptions from your Authorize.net account to Cometly as events (tracked actions such as a purchase or a new subscription). You connect Authorize.net with an API Login ID and a Transaction Key. Cometly then registers the webhook (the notification Authorize.net sends for each transaction) in your Authorize.net account for you, so there is no webhook URL to copy and paste.

With your payments in Cometly, you can attribute them back to your ads and marketing channels. You see which ad or channel produced each payment, with the amount recorded on the event.

## Before you start

* Install the Cometly pixel (the tracking script that records visits to your site). See [Install and verify the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md).
* Have your Authorize.net **API Login ID** and **Transaction Key** ready. You can find them in your Authorize.net account under **Account > Settings > API Credentials & Keys**.

## Step 1: Connect your Authorize.net account

1. In Cometly, click **Integrations** in the sidebar.
2. Open the **Authorize.net** card (category **Payments**).
3. Fill in the form:
   * **Account name**: a name for this connection, so you can recognise it later.
   * **API Login ID**
   * **Transaction Key**
4. Click **Save**.

The connection appears under **My Connections** with a **Connected** badge. Click the connection to choose which spaces (the separate workspaces in your Cometly account) can use it (**Share Access** or **Remove Access**).

> [!NOTE]
>
> You can also connect an account while you configure an event (Step 3): open the **Account** dropdown and click **Connect new Authorize.net account**.

## Step 2: Create the event

1. Click **Events Manager** in the sidebar.
2. Click **Create Event**.
3. Under **App / Integration**, select **Authorize.net**.
4. Select the event name (for example **Purchase**), or click **Create New Event** to add your own.
5. Click **Create**.

The event appears in the Events Manager with the status **Draft**. Click **Configure** on that row to continue.

## Step 3: Choose an account and trigger

On the **Configure Integration** page:

1. Under **Account**, select the Authorize.net connection you saved in Step 1.

2. Under **Trigger**, choose when the event should be sent to Cometly:

   | Trigger | When it fires |
   | - | - |
   | **Authorization Transaction Created** | An authorization transaction was created |
   | **Authorization and Capture Transaction Created** | An authorization and capture transaction was created |
   | **Capture Transaction Created** | A capture transaction was created |
   | **Customer Subscription Created** | A subscription was created |

3. Click **Continue**.

> [!WARNING]
>
> Once selected, the **Account** and **Trigger** cannot be modified. To change them later, you need to create a new event.

If Cometly shows an error about an incorrect API Login ID and Transaction Key, go back to **Integrations > Authorize.net**, save the correct credentials under the same account name, and try again.

## Step 4: Receive a sample record

1. On the **Receive Data** step, click **Check for Data**.
2. Select the record that appears and click **Continue With Selected Record**.

If no record shows up, no events have been sent yet. Click **Save & Return When Data is Ready**, then come back to the event in the Events Manager to map your data once events are sent.

## Step 5: Map the fields

On the **Configure Mapping** step, tell Cometly which fields from the Authorize.net record map to each Cometly field.

* **Email** and **Event Time** are required. If the record has no usable timestamp, choose **The time we receive the event** under **Dynamic Data**.
* For payment events, click **Add Field** and map **Amount** so the payment value is recorded with the event.
* Add any other fields you want to track (for example **First Name**, **Last Name**, **Phone**, **Order Id**).

Click **Save & Continue**.

## Step 6: Add filters (optional) and activate

Filters let you control which events get processed. Only events that pass all filters are tracked in Cometly. This step is optional.

Click **Activate** to finish. Your event is now active and incoming Authorize.net data is processed automatically.

## Check it worked

Go to **Events Manager > Events Log** to see the events Cometly has received and their status. After your next Authorize.net transaction or subscription that matches the trigger, it appears there.

## Frequently asked questions

### Can I track both payments and subscriptions from Authorize.net in Cometly?

Yes. Each event uses one trigger, and the trigger cannot be changed after you select it. Create one event for each trigger you want to track, for example one for **Authorization and Capture Transaction Created** and one for **Customer Subscription Created**, and select the same Authorize.net account in each.

### What Authorize.net data can I map to Cometly fields?

When Authorize.net notifies Cometly, Cometly looks up the full transaction (or the subscription, for **Customer Subscription Created**) in your Authorize.net account. The details Authorize.net holds for it appear in the sample record, where you can map them to Cometly fields such as **Email** and **Amount**.

### Can I connect an Authorize.net sandbox account to Cometly?

No. Cometly connects to Authorize.net's live environment, so use the **API Login ID** and **Transaction Key** from your live Authorize.net account. Sandbox credentials are not accepted when Cometly sets up the trigger.

## Next steps

* [Send these conversions back to your ad platforms with the Conversion API](https://docs.cometly.com/guides/conversion-api/overview.md)
* [Use the Events Log to check what Cometly received](https://docs.cometly.com/support/troubleshooting/general/event-log.md)
* [Understand how events work in Cometly](https://docs.cometly.com/guides/events/how-events-work.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.