AuthorizeNet.Core 8.1.0

dotnet add package AuthorizeNet.Core --version 8.1.0
                    
NuGet\Install-Package AuthorizeNet.Core -Version 8.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AuthorizeNet.Core" Version="8.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuthorizeNet.Core" Version="8.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AuthorizeNet.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AuthorizeNet.Core --version 8.1.0
                    
#r "nuget: AuthorizeNet.Core, 8.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AuthorizeNet.Core@8.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AuthorizeNet.Core&version=8.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AuthorizeNet.Core&version=8.1.0
                    
Install as a Cake Tool

AuthorizeNet.Core

A modern .NET client for the Authorize.Net payment gateway REST/XML API.

AuthorizeNet.Core is a multi-targeted build of the Authorize.Net SDK that ships the AuthorizeNet assembly, letting you authorize and capture card payments, manage customer profiles, run recurring (ARB) subscriptions, and query transaction and batch details from any current .NET application.

Supported frameworks

Multi-targets:

  • .NET 8.0 (net8.0)
  • .NET 9.0 (net9.0)
  • .NET 10.0 (net10.0)

Installation

Install the package from NuGet:

dotnet add package AuthorizeNet.Core

Or from the Package Manager Console:

Install-Package AuthorizeNet.Core

Package id: AuthorizeNet.Core — assembly name: AuthorizeNet.

Getting started

Set your merchant credentials and target environment, then execute a request through its controller. Use Environment.SANDBOX for testing and Environment.PRODUCTION for live transactions.

using AuthorizeNet;
using AuthorizeNet.Api.Contracts.V1;
using AuthorizeNet.Api.Controllers;
using AuthorizeNet.Api.Controllers.Bases;

// 1. Select the environment
ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = Environment.SANDBOX;

// 2. Provide merchant authentication (API Login ID + Transaction Key)
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication =
    new merchantAuthenticationType
    {
        name = "YOUR_API_LOGIN_ID",
        ItemElementName = ItemChoiceType.transactionKey,
        Item = "YOUR_TRANSACTION_KEY"
    };

// 3. Build the payment
var creditCard = new creditCardType
{
    cardNumber = "4111111111111111",
    expirationDate = "1228",
    cardCode = "123"
};

var transactionRequest = new transactionRequestType
{
    transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),
    amount = 19.95m,
    payment = new paymentType { Item = creditCard }
};

// 4. Execute
var request = new createTransactionRequest { transactionRequest = transactionRequest };
var controller = new createTransactionController(request);
controller.Execute();

createTransactionResponse response = controller.GetApiResponse();

if (response?.messages.resultCode == messageTypeEnum.Ok)
{
    Console.WriteLine($"Transaction ID: {response.transactionResponse.transId}");
}

Do not commit real credentials to source control; read the API Login ID and Transaction Key from configuration or environment variables at runtime.

Features

  • Payment transactions (authorize, capture, refund, void) via createTransactionController
  • Customer profiles and payment profiles (CIM)
  • Automated Recurring Billing (ARB) subscriptions
  • Transaction, batch, and settled-batch reporting
  • Hosted payment and hosted profile page requests
  • Sandbox and production environment switching

License

Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AuthorizeNet.Core:

Package Downloads
AuthNet

Wrapper for Authorize.Net

net3000.authorizenet

Authorize.Net payment API integration library for Net3000 solutions. Provides credit card payment processing, refunds, and recurring subscriptions via the Authorize.Net SDK.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.1.0 7,788 7/26/2026
8.0.1 217,493 10/12/2024
8.0.0 2,491 10/12/2024
6.2.0 54,405 7/10/2022

Multi-targets net8.0, net9.0, and net10.0. Added net9.0/net10.0 support; dropped end-of-life net6.0.