Skip to main content

acurateco_flutter 1.0.0 copy "acurateco_flutter: ^1.0.0" to clipboard
acurateco_flutter: ^1.0.0 copied to clipboard

discontinued

A simple Acurateco API wrapper

flutter_acurateco #

A Flutter package that provides integration with the Acurateco Payment Platform via WebView. It supports full-cycle operations including payment initialization, redirect handling, status checking, refunding, and voiding.


Features #

  • Seamless checkout experience using WebView
  • Support for Purchase, Refund, Void, and Status Check operations
  • Easy-to-use API for building custom payment flows
  • Full control over redirect and error handling via callbacks

Getting Started #

1. Install the package #

Add this to your pubspec.yaml:

dependencies:
  flutter_acurateco: ^1.0.0

Then run:

flutter pub get

2. Initialize the SDK #

Acurateco().initialize(
  backendUrl: 'backend-url',
  merchantKey: 'your-merchant-key',
  password: 'your-api-password',
);

Full Example #

import 'package:flutter/material.dart';
import 'package:flutter_acurateco/acurateco_flutter.dart';

void main() => runApp(const AcuratecoExampleApp());

class AcuratecoExampleApp extends StatelessWidget {
  const AcuratecoExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Acurateco Flutter Example',
      home: Scaffold(
        appBar: AppBar(title: const Text('Acurateco Example')),
        body: const Center(child: AcuratecoDemo()),
      ),
    );
  }
}

Inside AcuratecoDemo:

@override
void initState() {
  super.initState();

  Acurateco().initialize(
    backendUrl: 'https://checkout.transakcia.com',
    merchantKey: 'your-merchant-key',
    password: 'your-password',
  );

  var request = AcuratecoRequest(
    operation: AcuratecoOperation.purchase,
    successUrl: "https://example.com/success",
    cancelUrl: "https://example.com/cancel",
    errorUrl: "https://example.com/error",
    expiryUrl: "https://example.com/expiry",
    order: AcuratecoOrder(
      number: "order-1234",
      amount: "100.00",
      currency: "USD",
      description: "Example purchase",
    ),
    customer: Customer(name: "John Doe", email: "john@example.com"),
    billingAddress: BillingAddress(
      country: "US",
      state: "CA",
      city: "Los Angeles",
      district: "Beverlywood",
      address: "Moor Building",
      houseNumber: "17/2",
      zip: "123456",
      phone: "347771112233",
    ),
  );

  _controller = CheckoutController(
    paymentRequest: request,
    onSuccessRedirect: (url) => print("Success: $url"),
    onCancelRedirect: (url) => print("Cancelled: $url"),
    onErrorRedirect: (url) => print("Error: $url"),
    onRedirectCallback: (url) => print("Redirect: $url"),
    onError: (e) => print("Error: ${e.message}"),
  );
}

To open the payment screen:

showDialog(
  context: context,
  builder: (_) => Dialog(
    child: SizedBox(
      width: 400,
      height: 600,
      child: AcuratecoCheckout(controller: _controller),
    ),
  ),
);

API Methods #

Check Payment Status #

final status = await Acurateco().checkStatus(paymentId: '123');
print('Status: ${status.status}');

Refund Payment #

final result = await Acurateco().refundPayment(
  paymentId: '123',
  amount: '100.00',
);

Void Payment #

final result = await Acurateco().voidPayment(paymentId: '123');

Redirect Callbacks #

Callback Description
onSuccessRedirect Called on success URL redirect
onCancelRedirect Called on cancel URL redirect
onErrorRedirect Called on error URL redirect
onRedirectCallback Called on any redirect URL
onError Called on WebView or initialization error

📄 License #

MIT © 2025 Your Name or Company


📬 Support #

For questions, issues, or feature requests — please open an issue on GitHub.

0
likes
140
points
10
downloads

Documentation

API reference

Publisher

verified publisherakurateco.com

Weekly Downloads

A simple Acurateco API wrapper

Homepage

License

MIT (license)

Dependencies

crypto, flutter, http, webview_flutter

More

Packages that depend on acurateco_flutter