https://github.com/angeloavv/flutter_nexi
Unofficial Flutter plugin for integrating Nexi/XPay payments on Android and iOS.
https://github.com/angeloavv/flutter_nexi
android flutter ios nexi payments
Last synced: 2 months ago
JSON representation
Unofficial Flutter plugin for integrating Nexi/XPay payments on Android and iOS.
- Host: GitHub
- URL: https://github.com/angeloavv/flutter_nexi
- Owner: AngeloAvv
- License: gpl-3.0
- Created: 2025-05-20T20:47:00.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2026-04-10T06:46:06.000Z (2 months ago)
- Last Synced: 2026-04-10T08:36:28.828Z (2 months ago)
- Topics: android, flutter, ios, nexi, payments
- Language: Swift
- Homepage:
- Size: 556 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# flutter_nexi
> โ ๏ธ **Unofficial Flutter plugin** for integrating Nexi/XPay payments on Android and iOS.
[](https://pub.dev/packages/flutter_nexi)

[](https://github.com/AngeloAvv/flutter_nexi)
[](https://www.gnu.org/licenses/gpl-3.0.html)
[](https://github.com/sponsors/AngeloAvv)
## Overview
`flutter_nexi` is a cross-platform plugin that allows you to integrate Nexi's [XPay SDK](https://developer.nexi.it/) into your Flutter apps. It provides a simple interface to initiate and handle payments on both Android and iOS using the official native libraries under the hood.
> **Note:** This is not an official Nexi package. Use it at your own discretion and verify compliance with Nexi's terms and security requirements.
---
## Features
- โ
Payment processing via Nexi XPay
- ๐ฑ Native integration on Android and iOS
- ๐ Callback-based payment result handling
- ๐งช Test and production environment support
---
## Supported Platforms
- โ
Android (API 21+)
- โ
iOS (15.6+)
---
## Installation
Add the plugin to your `pubspec.yaml`:
```yaml
dependencies:
flutter_nexi: ^1.0.0
```
## How to Make a Payment
You can trigger a payment using the `FlutterNexi` class. Here's a minimal example of how to initiate a payment when a button is pressed:
```dart
import 'package:flutter/material.dart';
import 'package:flutter_nexi/flutter_nexi.dart';
class MyApp extends StatefulWidget {
@override
State createState() => _MyAppState();
}
class _MyAppState extends State {
// Initialize the plugin with your secret key
final _flutterNexiPlugin = FlutterNexi(secretKey: 'your_secret_key');
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Nexi Payment Example')),
body: Center(
child: FilledButton(
onPressed: () {
_flutterNexiPlugin.pay(
alias: 'your_alias',
codTrans: 'your_transaction_code',
amount: 1000, // in cents, i.e., โฌ10.00
currency: 'EUR',
);
},
child: const Text('Pay'),
),
),
),
);
}
}
```
## ๐ ProGuard Configuration (Android)
If you're building a **release version** of your app with **code shrinking and obfuscation** enabled (e.g., using R8 or ProGuard), you must add the following rules to prevent breaking Nexi's SDK functionality.
### โ Add to `android/app/proguard-rules.pro`:
```proguard
## Nexi Rules
-keep class it.angelocassano.flutter_nexi.** { *; }
-keep class it.nexi.xpay.** { *; }
# Suppress warnings for 3DS SDK classes
-dontwarn com.nets.igfs_3ds_sdk_android.dto.project.AuthenticationRequestParameters
-dontwarn com.nets.igfs_3ds_sdk_android.dto.project.ChallengeParameters
-dontwarn com.nets.igfs_3ds_sdk_android.dto.project.ConfigParameters
-dontwarn com.nets.igfs_3ds_sdk_android.dto.protocol.ErrorMessage
-dontwarn com.nets.igfs_3ds_sdk_android.event.CompletionEvent
-dontwarn com.nets.igfs_3ds_sdk_android.event.ProtocolErrorEvent
-dontwarn com.nets.igfs_3ds_sdk_android.event.RuntimeErrorEvent
-dontwarn com.nets.igfs_3ds_sdk_android.graphics.IUiCustomization
-dontwarn com.nets.igfs_3ds_sdk_android.graphics.UiCustomization
-dontwarn com.nets.igfs_3ds_sdk_android.service.IChallengeStatusReceiver
-dontwarn com.nets.igfs_3ds_sdk_android.service.ITransaction
-dontwarn com.nets.igfs_3ds_sdk_android.service.impl.ThreeDS2Service
```
## License
`flutter_nexi` is available under the GPLv3 license. See the LICENSE file for more info.