Inttegro Dart SDK

The official typed Dart client for server-side Inttegro integrations. This package does not depend on Flutter and is separate from the mobile payment-sheet SDK. Never embed a server API key in a Flutter, browser, or other customer-facing app.

dart pub add inttegro
import 'dart:io';
import 'package:inttegro/inttegro.dart' as inttegro;
import 'package:inttegro/order.dart' as order;

final client = inttegro.Client(
  apiKey: Platform.environment['INTTEGRO_API_KEY']!,
);
final foundOrder = await client.orders.lookup(
  const order.LookupRequest(orderId: 'order_...'),
);
print(foundOrder.id);
client.close();

All methods return domain values; wire response envelopes remain private.

Resource libraries

package:inttegro/inttegro.dart provides the client, request options, exceptions, telemetry interfaces, and other SDK-wide types. Contract models live in public libraries that mirror the API resources:

package:inttegro/financial_account.dart
package:inttegro/order.dart
package:inttegro/payment.dart
package:inttegro/refund.dart

Import only the resource libraries your integration uses. Give each one a snake_case prefix matching its API resource; the prefix supplies the context that concise names such as Status, CreateRequest, and Page intentionally omit:

import 'package:inttegro/inttegro.dart' as inttegro;
import 'package:inttegro/financial_account.dart' as financial_account;
import 'package:inttegro/payment.dart' as payment;

Future<financial_account.FinancialAccount> createFinancialAccount(
  inttegro.Client client,
  financial_account.CreateRequest request,
) => client.financialAccounts.create(request);

bool isPaid(payment.Payment value) => value.status == payment.Status.paid;

For example, payment.Status and financial_account.CreateRequest are distinct types even though their source filenames do not repeat the resource name. Dart directories do not create namespaces; the public library and its import prefix provide that boundary.

Each contract model has one top-level type under lib/src/<resource>/<type>.dart and is a part of the corresponding lib/<resource>.dart library. Models are first-class source: they do not live in a generated directory or a monolithic generated-model file. See CONTRIBUTING.md before adding or moving a contract type.

Observability and error reporting

Provide a Telemetry and/or ErrorReporter implementation to Client. Telemetry emits prepared, received, decoded, and failed lifecycle events without API keys, request bodies, or resource identifiers. Error reports are not constructed unless a reporter is configured. The default unexpected policy reports transport, decoding, unknown, and server failures.

See the API reference and Inttegro Studio.

Libraries

app
Application credentials, relationships, and request models.
balance
Currency balance snapshots and balance lookup models.
balance_transaction
Balance transactions, allocations, and pagination models.
bank_account
Bank-account types and country-specific account details.
broadcast
Broadcast requests, delivery details, and cancellation models.
checkout
Checkout settings, customer details, and checkout-facing statuses.
chime
Chime messages, recipients, schedules, and transmission models.
country
Country specifications and bank-directory models.
customer
Customer records, addresses, balances, and request models.
file
Stored files, delivery details, sources, and request models.
Shareable file links, access rules, delivery, and request models.
financial_account
Financial accounts, institutions, owners, and account request models.
inttegro
Client and SDK-wide types for server-side Inttegro integrations.
message_template
Message templates, variables, previews, and rendering request models.
money
Monetary amounts, amount parameters, and supported currency values.
order
Orders, line items, documents, checkout settings, and request models.
otp
One-time-password transactions, delivery, and verification models.
payment
Payments, attempts, required next actions, and confirmation models.
payment_method
Payment methods, verification, settings, and tokenization request models.
payout
Payouts, failures, destinations, schedules, and settings models.
price
Catalog prices, inline product details, and price request models.
product
Products, attributes, media, fulfillment, and request models.
purchase_intent
Purchase intents, buy-page presentation, variants, and request models.
refund
Refunds, reasons, settlements, line items, and request models.
secret_key
Secret keys, usage records, authentication results, and request models.
shared
Contract types shared by more than one Inttegro resource library.
upload_request
Upload requests, constraints, attempts, reviews, and fulfillment models.
wallet
Wallet types and mobile-money network values.