The Smarter Way
Search…
⌃K

Flutter

Let your Flutter app has an amazing and seamless payment experience by using Ottu SDK which is Flutter. Ottu offers, various and customizable UI screen in addition to elements which can be used out of the box to get your user’s payment information. Ottu supports your user interface by low level APIs, empowering you to build a custom experience.

Features

Simplified security: Keeping PCI compliance is as easy as collecting credit card numbers with our simplified security. Instead of passing through your server, Ottu receives the sensitive data directly.
Apple Pay: Integrate seamlessly with Apple Pay.
Native UI: Native UI and elements to collect payment details.
Localized: English, Arabic.
Apple's in-app purchase APIs should be utilized for selling product or services provide by your app, and you can use Ottu SDK for other purpose.

Privacy

Collecting data by Ottu checkout SDK in order to enhance our services and product, and for sure data confidentially, is highly appreciated.
The Ottu requires Flutter >=2.0 or above is compatible with android and iOS.
You have to get a session token by using Ottu public API to initiate the required SDK. See REST API
Ottu is available through pub.dev. To install, add the following line to your pupspec.yaml:
ottu: <latest version>
In your .dart file, just import Ottu package and initialize Ottu SDK.
import 'package:ottu/ottu.dart';
//extend PaymentDelegate class
class _HomeScreenState extends State<HomeScreen> implements PaymentDelegate {
// create instance of ottu
Ottu ottu = Ottu();
void makePayment() async {
try {
//add context,sessionid,api_key,paymentDelegate's object and language(ENTER_LANGUAGE_ID_en_or_ar)
await ottu.open(context, "sessionid","api_key", this, sdkLanguage: "language");
} catch (e) {
//catch errors
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
child: const Text('Open SDK'),
onPressed: () {
makePayment();
},
),
),
);
}
//callback functions
@override
void cancelCallback(PaymentStatus paymentStatus) {
//handle payment fail.
}
@override
void successCallback(PaymentStatus paymentStatus) {
//handle payment success.
}
@override
void beforeRedirect(PaymentStatus paymentStatus) {
//handle payment before redirect.
}
@override
void errorCallback(PaymentStatus paymentStatus) {
//handle error.
}
}
To integrate Apple Pay, you need to enable Apple Pay in capabilities in your project.

Licenses