moyasar
3.0.6, released 5 weeks ago by moyasar.com
Accept payments via Apple Pay, Samsung Pay, STC Pay, and Credit Card using Moyasar.
What it does
Provides Flutter widgets and API bindings to process payments through Moyasar with managed 3DS handling. It supports Apple Pay, Samsung Pay, STC Pay, and Credit Cards, automatically managing widget visibility depending on platform availability.
AI-written summary of version 3.0.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to accept regional and international payments in a Flutter application via Moyasar.
- You want built-in widgets for Apple Pay, Samsung Pay, STC Pay, and Credit Cards with automatic platform availability checking.
Skip it when
- You use a payment gateway other than Moyasar.
- You are processing in-app purchases through Apple App Store or Google Play Billing.
Strengths
- Widgets automatically hide themselves when payment methods are unavailable on the current device.
- Managed 3DS handling for credit card transactions.
- Native PassKit implementation for Apple Pay without external pay package dependencies.
Weaknesses
- Apple Pay currency is currently restricted to SAR.
- Requires specific platform configurations such as Apple Pay developer credentials and Samsung Pay metadata.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Requires a Moyasar account and API keys, plus platform-specific steps like Apple Pay configuration in Xcode and Samsung Pay meta-data in AndroidManifest.xml.
import 'package:flutter/material.dart';
import 'package:moyasar/moyasar.dart';
class Checkout extends StatelessWidget {
Checkout({super.key});
final paymentConfig = PaymentConfig(
publishableApiKey: 'YOUR_PUBLISHABLE_API_KEY',
amount: 25758,
description: 'Order #1324',
creditCard: CreditCardConfig(saveCard: false, manual: false),
);
void onPaymentResult(result) {
if (result is PaymentResponse && result.status == PaymentStatus.paid) {
// Paid
}
}
@override
Widget build(BuildContext context) {
return CreditCard(config: paymentConfig, onPaymentResult: onPaymentResult);
}
}Alternatives
Packages that do the same job and could replace moyasar.
- flutter_stripe
Choose this if you need to process payments using Stripe instead of Moyasar.
92Compare - in_app_purchase
Choose this if you are selling digital goods or subscriptions through Apple App Store and Google Play billing rather than using a payment gateway.
94Compare
Works with
Packages commonly used together with moyasar: ones it builds on, ones built on it, and its own family.