yandex_pay_auth

Optional auth module for the Yandex Pay Flutter SDK. Wraps the native auth flow and exposes:

  • YPayAuth.instance.authorize(...) — launches the auth UI.
  • YPayAuth.instance.logout() — clears auth state.
  • YPayAuth.instance.getAuthState() — current state (initial / authorized / unauthorized).
  • YPayAuth.instance.setPartnerAuthState(isAuthorized: ...) — declare external auth state to the SDK.
  • YPayAuth.instance.authStateStream / authResultStream — reactive updates.

This module is opt-in. If you don't add yandex_pay_auth to your pubspec, yandex_pay_core and yandex_pay_quickpay work without it.

Setup

dependencies:
  yandex_pay_quickpay: ^2.3.0
  yandex_pay_auth: ^2.3.0
import 'package:yandex_pay_core/yandex_pay_core.dart';
import 'package:yandex_pay_auth/yandex_pay_auth.dart';
import 'package:yandex_pay_quickpay/yandex_pay_quickpay.dart';

await YPay.initialize(
  environment: YPayEnvironment.sandbox,
  modules: [
    authModule(merchantId: 'your-merchant-id'),
    quickPayModule(merchantId: 'your-merchant-id'),
  ],
);

final result = await YPayAuth.instance.authorize();
final state = await YPayAuth.instance.getAuthState();

Companion packages

Documentation

Full integration guide: https://pay.yandex.ru/docs/ru/custom/quickpay/flutter/

License

Proprietary. See LICENSE.

Libraries

yandex_pay_auth