Skip to content

m8ty_client_paymentscan

m8ty_client_paymentscan solves this with QR-based connection and payment scanning APIs, enabling customers to move payment data into the app quickly and accurately.

Payment scanner client for QR code-based payments. Enables scanning QR codes from web apps and processing payment QR codes.

Check the documentation of the m8ty_client_paymentscan library.

import 'package:dio/dio.dart';
import 'package:m8ty_client_paymentscan/m8ty_client_paymentscan.dart';
final client = M8tyClientPaymentscan();
client.setOAuthToken('ApiOAuth2', oauthToken);
Method Description
scanConnect Scan QR from webApp to enable Payment Scan QRs
scanPayment Scan Payment QR

Here some examples how the dart client can be used

final client = M8tyClientPaymentscan();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getPaymentScannerApi();
try {
final response = await api.scanConnect(
scanConnectRequestModel: ScanConnectRequestModel((b) {
// set required fields
}),
);
print('Connected: ${response.data}');
} on DioException catch (e) {
throw Exception(
'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}',
);
}
final client = M8tyClientPaymentscan();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getPaymentScannerApi();
try {
final response = await api.scanPayment(
// provide scanned QR data
);
print('Payment data: ${response.data}');
} on DioException catch (e) {
throw Exception(
'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}',
);
}