Moyasar का उपयोग करके अपने Flutter ऐप में आसानी से भुगतान स्वीकार करें। इस SDK के साथ, आप Apple Pay, Samsung Pay, STC Pay और क्रेडिट कार्ड (मैनेज्ड 3DS स्टेप के साथ) के माध्यम से तेजी से और सुरक्षित रूप से भुगतान स्वीकार कर सकते हैं।
सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Moyasar एक Flutter/Dart पैकेज है जो मोबाइल एप्लिकेशन में बिना किसी दिक्कत के और सुरक्षित भुगतान एकीकरण की अनुमति देता है। यह Apple Pay, Samsung Pay, STC Pay और आंतरिक 3DS प्रमाणीकरण के साथ क्रेडिट कार्ड सहित कई भुगतान विधियों का समर्थन करता है। Flutter का उपयोग करने वाले विकासकर्ताओं के लिए डिज़ाइन किया गया, यह Android और iOS प्लेटफॉर्म पर भुगतान स्वीकार करने की प्रक्रिया को सरल बनाता है। SDK सुरक्षा मानकों के अनुपालन को सुनिश्चित करता है और उपयोगकर्ताओं को एक चिकनी खरीदारी अनुभव प्रदान करता है।
उपयोग
एप्लिकेशन इन-परचेज़
ई-कॉमर्स ऐप्स
सब्सक्रिप्शन सेवाएं
डिजिटल सेवा भुगतान
मोबाइल वॉलेट इंटीग्रेशन
मुख्य विशेषताएँ
Apple Pay और Samsung Pay के समर्थन के लिए
STC Pay एकीकरण
3DS के साथ क्रेडिट कार्ड भुगतान
क्रॉस-प्लेटफ़ॉर्म सुविधा (Android और iOS)
सुरक्षित भुगतान प्रसंस्करण
इनके लिए उपयुक्त
ई-कॉमर्स एप्लिकेशन बनाने वाले फ्लटर डेवलपर्स
मध्य पूर्व बाजारों का लक्ष्य बनाए व्यवसाय
बहु-भुगतान विधि समर्थन की आवश्यकता वाले ऐप्स
त्वरित भुगतान एकीकरण के लिए विकासकर्ता
विचार योग्य बातें
मोयासर खाता और API कीज़ के वैध होने की आवश्यकता है
समर्थित भुगतान विधियों तक सीमित
बाहरी भुगतान गेटवे की स्थिरता पर निर्भर
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Moyasar Flutter SDK
Accept payments in your Flutter app through Apple Pay, Samsung Pay, STC Pay, and Credit Card — with the 3DS step handled for you.
Method
Platforms
Widget
Credit Card (with managed 3DS)
iOS, Android
CreditCard
Apple Pay
iOS
ApplePay
Samsung Pay
Android (Samsung devices)
SamsungPay
STC Pay
iOS, Android
STCPay
Every widget hides itself when its method isn't available on the device, so you can drop them all into one screen without platform checks.
Install
flutter pub add moyasar
Requires Flutter >=1.17.0, Dart >=2.18.2 <4.0.0, and iOS 12.0+.
You'll need a Moyasar account — get your API keys.
Samsung Android devices only. Add the spay_sdk_api_level meta-data to your AndroidManifest.xml — see the integration guide. The SDK bundles Samsung's official Flutter plugin, so no app-level override is needed.
The widget hides itself when Samsung Pay isn't ready. To check explicitly in a custom flow:
final eligible = awaitSamsungPayEligibility.isEligible(paymentConfig);
final result = awaitSamsungPayEligibility.check(paymentConfig); // with diagnosticsdebugPrint('${result.reason}'); // ready, notAndroid, notReady, sdkError, timeout...
Credit Card & STC Pay
Both render a full form and accept an optional locale. Localization.ar() also switches the layout to RTL; individual strings can be overridden through its named parameters.
Override the API host, e.g. https://apimig.moyasar.com.
applyCoupon
bool?
null
Set false to skip coupon application.
ApplePayConfig
Field
Type
Default
Description
merchantId
String
required
Must match Xcode and your dashboard.
label
String
required
Store name in the payment sheet.
manual
bool
required
Authorize now, capture later.
saveCard
bool
required
Tokenize for later charges.
merchantCapabilities
List<String>
["3DS", "debit", "credit"]
Must include "3DS".
supportedCountries
List<String>
["SA"]
Widening this raises fraud risk.
SamsungPayConfig
Field
Type
Default
Description
serviceId
String
required
From the Samsung merchant dashboard.
merchantName
String
required
Shown in the payment sheet.
orderNumber
String?
auto-generated
[A-Za-z0-9-], max 36 chars. Returned as samsungpay_order_id in the response metadata.
manual
bool
false
Authorize now, capture later.
CreditCardConfig
saveCard (bool, required) — tokenize after a successful payment.
manual (bool, required) — authorize now, capture later.
PaymentSplit
Divide a payment among recipients, in compliance with SAMA and ZATCA. Aggregation clients only — splits on other payments are ignored. The splits must total the payment amount.
With a custom Credit Card UI, 3DS is your responsibility: when status is initiated, open (result.source as CardPaymentResponseSource).transactionUrl in a web view and watch for the redirect to PaymentConfig.callbackUrl.
STC Pay takes two steps — start the payment, then verify the OTP:
final result = awaitMoyasar.pay(
apiKey: paymentConfig.publishableApiKey,
paymentRequest: PaymentRequest(paymentConfig, StcRequestSource(mobile: '0512345678')),
);
final transactionUrl = (result.source asStcResponseSource).transactionUrl!;
final verified = awaitMoyasar.verifyOTP(
transactionURL: transactionUrl,
otpRequest: OtpRequestSource(otpValue: '1234'),
);
Testing
Credit Card — test cards work against the sandbox.
Apple Pay — use a real device; the simulator can't complete an authorization. Test amounts.
Samsung Pay — requires a Samsung device. The example app uses flavors: flutter run --flavor default_ (Apple Pay) or --flavor spay (Samsung Pay). See example/CONFIGURATION_GUIDE.md.
Deprecations
STCPaymentComponent is deprecated and will be removed in the next major version — it's a drop-in rename to STCPay.