Skip to content
pubscout

tosspayments_widget_sdk_flutter

2.3.0, released 4 weeks ago by an unverified publisher

Integrate Toss Payments widgets and payment flows into Flutter applications.

Unverified publisher
$ flutter pub add tosspayments_widget_sdk_flutter

What it does

Provides widget integration for the Toss Payments SDK on Flutter, allowing developers to render payment methods, handle agreements, request payments, and manage payment redirects.

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

Use it when

  • You need to integrate Toss Payments into an Android or iOS Flutter app.
  • You want to use Toss Payments checkout widgets and agreement components.

Skip it when

  • You are using a payment gateway other than Toss Payments.
  • Your target platforms do not include Android or iOS.

Strengths

  • Official widget SDK support for Toss Payments in Flutter.
  • Handles payment methods, agreements, and app-to-app redirects (such as Alipay/Antom).

Weaknesses

  • Requires platform-specific configuration (such as Android INTERNET permission and cleartext traffic settings).
  • Limited to a single payment gateway ecosystem.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
5

Requires setting Android INTERNET permission and enabling usesCleartextTraffic in AndroidManifest.xml.

import 'package:flutter/material.dart';
import 'package:tosspayments_widget_sdk_flutter/model/payment_info.dart';
import 'package:tosspayments_widget_sdk_flutter/model/payment_widget_options.dart';
import 'package:tosspayments_widget_sdk_flutter/payment_widget.dart';
import 'package:tosspayments_widget_sdk_flutter/widgets/agreement.dart';
import 'package:tosspayments_widget_sdk_flutter/widgets/payment_method.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: PaymentWidgetExamplePage(),
    );
  }
}

class PaymentWidgetExamplePage extends StatefulWidget {
  const PaymentWidgetExamplePage({super.key});

  @override
  State<PaymentWidgetExamplePage> createState() {
    return _PaymentWidgetExamplePageState();
  }
}

class _PaymentWidgetExamplePageState extends State<PaymentWidgetExamplePage> {
  late PaymentWidget _paymentWidget;

  @override
  void initState() {
    super.initState();
    _paymentWidget = PaymentWidget(clientKey: "test_gck_docs_Ovk5rk1EwkEbP0W43n07xlzm", customerKey: "a1b2c3d4e5f67890");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SafeArea(
            child: Column(children: [
              Expanded(
                  child: ListView(children: [
                    PaymentMethodWidget(
                      paymentWidget: _paymentWidget,
                      selector: 'methods',
                    ),
                  ]))
            ])));
  }
}

Alternatives

Packages that do the same job and could replace tosspayments_widget_sdk_flutter.

Works with

Packages commonly used together with tosspayments_widget_sdk_flutter: ones it builds on, ones built on it, and its own family.