nordigen_integration 1.3.3 nordigen_integration: ^1.3.3 copied to clipboard
Dart/Flutter Package for Nordigen EU PSD2 AISP 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 = NordigenAccountInfoAPI(
accessToken: 'YOUR_TOKEN',
);
/// Step 2 and then selecting the first ASPSP
final ASPSP firstBank =
(await apiInterface.getASPSPsForCountry(countryCode: 'gb')).first;
/// Step 4.1
final RequisitionModel requisition = await apiInterface.createRequisition(
endUserID: 'exampleEndUser',
redirect: 'http://www.yourwebpage.com/',
reference: 'exampleRef42069666',
);
/// Step 4.2
final String redirectLink =
await apiInterface.fetchRedirectLinkForRequisition(
requisitionID: requisition.id,
aspspID: firstBank.id,
);
/// Open and Validate [redirectLink] and proceed with other functionality.
print(redirectLink);
}