Package selection guidance compiled from public package information, community data, and project usage.
Tobias is a Flutter plugin that enables seamless authentication and payment integration using native Android, iOS, and OpenHarmony AliPay SDKs. It allows developers to leverage AliPay's secure and widely adopted payment infrastructure within their Flutter applications. The plugin provides a bridge between Flutter and platform-specific AliPay functionalities, ensuring smooth user experiences across supported devices. With minimal setup, it supports both in-app payments and user authentication via AliPay, making it ideal for e-commerce and finance-focused apps.
Use cases
In-app purchases with AliPay
User authentication via AliPay
Cross-platform payment solutions
E-commerce apps targeting Chinese markets
Mobile wallet integrations
Key features
Native AliPay SDK integration
Support for Android, iOS, and OpenHarmony
Secure payment and authentication flows
Minimal configuration required
Platform-specific optimizations
Suitable for
Flutter developers building payment-enabled apps
Apps targeting users in China or regions using AliPay
Developers needing native AliPay functionality
Projects requiring cross-platform payment support
Startups integrating AliPay quickly
Considerations
Requires AliPay account and merchant setup
Limited to AliPay-supported regions
Dependent on native SDK versions
May require additional compliance checks
OpenHarmony support is experimental
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
For iOS, you have to configure your Xcode project manually. See iOS Configuration.
for OpenHarmony, you have to add scheme alipays to module.json5 in your project like this:
{"module":{"querySchemes":["alipays"],}}
iOS Configuration
Breaking change in 6.0.0: tobias no longer modifies your Xcode project during pod install.
The tobias: section in pubspec.yaml (url_scheme, no_utdid, ios.ignore_security,
ios.universal_link) is obsolete and is ignored. Configure the following by hand.
Swift Package Manager
tobias supports both Swift Package Manager and CocoaPods. To use SPM, enable it once:
flutter config --enable-swift-package-manager
Nothing else is required — Flutter picks up ios/tobias/Package.swift automatically. If SPM is
not enabled, the CocoaPods podspec is used as before.
1. Info.plist
Add your own url scheme (a unique string used to resume your app, _ is not allowed):
The result is map contains results from AliPay.The result also contains an external filed named platform which
means the result is from iOS or android.
Result sample:
Copyright 2018 OpenFlutter Project
Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.