Seerbit Flutter SDK can be used to integrate the SeerBit payment gateway into your flutter application.
Register for a merchant account on Seerbit Merchant Dashboard to get started.
Dart sdk: ">=2.12.0-0 <3.0.0"
Flutter: ">=1.22.2"
Android: minSdkVersion 17 and add support for androidx (see AndroidX Migration to migrate an existing app)
iOS: --ios-language swift, Xcode version >= 12
flutter pub get seerbit_flutter
If you have any problems, questions or suggestions, create an issue here or send your inquiry to [email protected]
You should already have your API keys. If not, go to dashboard.seerbitapi.com.
import 'package:flutter/material.dart';
import 'package:seerbit_flutter/seerbit_flutter.dart';
class CheckOut extends StatelessWidget {
const CheckOut({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: () => SeerbitMethod.startPayment(
context,
PayloadModel(
currency: 'NGN',
email: "[email protected]",
description: "A pair of new shoes",
fullName: "Jane Doe",
country: "NG",
transRef: DateTime.now().toString(),
amount: "100",
callbackUrl: "your callback url",
publicKey: "YOUR PUBLIC KEY",
closeOnSuccess: false,
closePrompt: false,
setAmountByCustomer: false,
pocketRef: "",
vendorId: "",
customization: CustomizationModel(
borderColor: "#000000",
backgroundColor: "#004C64",
buttonColor: "#0084A0",
paymentMethod: [PayChannel.card,PayChannel.account, PayChannel.transfer],
confetti: false,
logo: "logo_url || base64",
)
),
onSuccess: (response) {},
onCancel: (_) {}),
),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red),
),
child: Text(
'Checkout',
style: TextStyle(color: Colors.white),
));
}
}
OnSuccess
you will recieve a Map containing the response from the payment request.
During the payment process you can simply end the process by calling
SeerbitMethod.endPayment(context);
This ends the payment and removes the checkout view from the screen.