Skip to content
pubscout

yookassa_payments_flutter

2.0.1, released 5 weeks ago by yoomoney.ru

Flutter SDK for processing payments and tokenization via YooKassa API.

WASM-ready
$ flutter pub add yookassa_payments_flutter
Source repository

What it does

Allows integrating the YooKassa payment interface into Flutter applications for Android and iOS. It uses native YooKassa mobile SDKs underneath to handle tokenization, payment forms, and payment confirmation methods like 3-D Secure, SberPay, SBP, and Alfa Pay.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to accept payments in your Flutter app using the YooKassa payment gateway.
  • You want native payment forms and built-in handling for SberPay, SBP, Alfa Pay, and bank cards.

Skip it when

  • Your target payment gateway is not YooKassa.
  • You are targeting platforms other than Android and iOS.

Strengths

  • Provides ready-to-use native payment and tokenization UI forms for Android and iOS.
  • Supports a wide array of payment methods including YooMoney, SberPay, SBP, and Alfa Pay.
  • Allows explicit version control of underlying native SDKs.

Weaknesses

  • Requires manual configuration of platform-specific deeplinks and URL schemes for external banking apps.
  • Android app process death during an external payment flow can cause payment results to not be delivered.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires setting a client application key and shop ID from YooKassa. Android requires setting up app schemes in build.gradle, and iOS requires setting up application schemes in Info.plist and handling links in AppDelegate.

var clientApplicationKey = "<Ключ для клиентских приложений>";
var amount = Amount(value: "999.9", currency: Currency.rub);
var shopId = "<Идентификатор магазина в ЮKassa>";
var tokenizationModuleInputData = TokenizationModuleInputData(
    clientApplicationKey: clientApplicationKey,
    title: "Космические объекты",
    subtitle: "Комета повышенной яркости, период обращения — 112 лет",
    amount: amount,
    shopId: shopId,
    savePaymentMethod: SavePaymentMethod.on);
var result = await YookassaPaymentsFlutter.tokenization(tokenizationModuleInputData);

Alternatives

Packages that do the same job and could replace yookassa_payments_flutter.