nordigen_integration 1.7.7 nordigen_integration: ^1.7.7 copied to clipboard
Dart/Flutter Package for Nordigen's EU PSD2 AISP Banking API Integration, with relevant Data Models.
example/nordigen_integration_example.dart
import 'package:nordigen_integration/nordigen_integration.dart';
Future<void> main() async {
/// Step 1
final NordigenAccountInfoAPI apiInterface =
await NordigenAccountInfoAPI.fromSecret(
secretID: 'secret_id',
secretKey: 'secret_key',
);
/// Step 2 and then selecting the first Bank/Institution
final Institution firstBank =
(await apiInterface.getInstitutionsForCountry(countryCode: 'gb')).first;
/// Step 3
final EndUserAgreementModel endUserAgreementModel =
await apiInterface.createEndUserAgreement(
maxHistoricalDays: 90,
accessValidForDays: 90,
institutionID: firstBank.id,
);
/// Step 4
final RequisitionModel requisition =
await apiInterface.createRequisitionAndBuildLink(
agreement: endUserAgreementModel.id,
institutionID: firstBank.id,
redirect: 'http://www.yourwebpage.com/',
reference: 'exampleRef42069666',
);
/// Open and Validate in [link] and proceed with other functionality.
print('Validate: ${requisition.link}');
}