authnet_dart 1.0.2 copy "authnet_dart: ^1.0.2" to clipboard
authnet_dart: ^1.0.2 copied to clipboard

Community Authorize.Net SDK for Dart and Flutter: payments, CIM, ARB, reporting, tokenization, wallets, webhooks. Not affiliated with or endorsed by Authorize.Net or Visa.

authnet_dart #

authnet_dart: typed payments for Dart and Flutter

pub package CI License: MIT Dart SDK

The easiest entry point to the community-maintained Authorize.Net SDK for Dart and Flutter. One import provides typed payments, eCheck, PayPal, customer profiles (CIM), recurring billing (ARB), reporting, Accept.js, Accept Hosted, wallet token helpers, and verified webhooks.

Not affiliated with, endorsed by, or certified by Authorize.Net or Visa.

Install #

dart pub add authnet_dart
import 'package:authnet_dart/authnet_dart.dart';

Quick start #

final client = AuthNetClient(
  config: AuthNetConfig(
    apiLoginId: apiLoginId,
    transactionKey: transactionKey,
    environment: AuthNetEnvironment.sandbox,
  ),
);

final result = await client.charge(PaymentRequest(
  amount: 19.99,
  method: PaymentMethod.opaqueData,
  billing: BillingDetails(firstName: 'Jane', lastName: 'Doe'),
  opaqueData: OpaqueData(
    dataDescriptor: descriptor,
    dataValue: nonce,
  ),
));

if (result.isApproved) {
  print('Approved: ${result.transactionId}');
}

client.close();

For a Flutter application, obtain the one-time nonce with the exported Accept.js or Accept Hosted helpers, then send it to your backend for the charge. Never ship a production Transaction Key in a distributed app.

Umbrella or modular packages? #

Use authnet_dart when you want the simplest install and expect to use more than one part of the SDK. The same APIs are also available separately:

Package Use it directly when
authnet_core You need payments, CIM, ARB, or reporting only.
authnet_server You are adding webhook verification and management to a backend.
authnet_flutter You need Accept.js, Accept Hosted, wallets, or the gated direct client.

The umbrella contains no alternate implementation: it re-exports those three packages, so moving between umbrella and modular dependencies does not require learning a second API.

Documentation #

Start with the integration-mode guide, then use each modular package README for complete operations and examples. Questions belong in GitHub Discussions, bugs in the issue tracker, and vulnerabilities in private security reporting.

1
likes
160
points
125
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Community Authorize.Net SDK for Dart and Flutter: payments, CIM, ARB, reporting, tokenization, wallets, webhooks. Not affiliated with or endorsed by Authorize.Net or Visa.

Repository (GitHub)
View/report issues
Contributing

Topics

#authorize-net #payments #flutter #payment-gateway #subscriptions

License

MIT (license)

Dependencies

authnet_core, authnet_flutter, authnet_server

More

Packages that depend on authnet_dart