AuthorizeNet.Core
8.1.0
dotnet add package AuthorizeNet.Core --version 8.1.0
NuGet\Install-Package AuthorizeNet.Core -Version 8.1.0
<PackageReference Include="AuthorizeNet.Core" Version="8.1.0" />
<PackageVersion Include="AuthorizeNet.Core" Version="8.1.0" />
<PackageReference Include="AuthorizeNet.Core" />
paket add AuthorizeNet.Core --version 8.1.0
#r "nuget: AuthorizeNet.Core, 8.1.0"
#:package AuthorizeNet.Core@8.1.0
#addin nuget:?package=AuthorizeNet.Core&version=8.1.0
#tool nuget:?package=AuthorizeNet.Core&version=8.1.0
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 | Versions 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. |
-
net10.0
- System.Configuration.ConfigurationManager (>= 10.0.0)
-
net8.0
- System.Configuration.ConfigurationManager (>= 8.0.0)
-
net9.0
- System.Configuration.ConfigurationManager (>= 9.0.0)
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.
Multi-targets net8.0, net9.0, and net10.0. Added net9.0/net10.0 support; dropped end-of-life net6.0.