パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.14.3

sumup

SumUp SDK を使用するための Flutterラッパー。このプラグインを使用すると、アプリはAndroidおよびiOSでSumUp端末に簡単に接続し、ログインしてカード決済を受け入れることができます。

AndroidiOS
30日間ダウンロード
385
いいね数
42
Pub ポイント
160

パッケージをインストール

flutter pub add sumup

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

sumup パッケージは、Android および iOS の Flutter アプリにカード決済機能をスムーズに統合できるようにする、SumUp SDK の Flutter ラッパーです。開発者は SumUp ターミナルに接続し、ユーザーの認証を行い、アプリ内で直接支払い処理を行うことができます。シンプルさと信頼性を重視して設計されており、ネイティブ SDK とのやり取りの複雑さを抽象化しつつ、セキュアな取引処理を維持しています。最小限のセットアップでモバイル販売ポイント機能が必要なビジネスに最適です。

用途

  • モバイルPOSシステム
  • 対面小売決済
  • 移動中のサービス請求
  • イベントチケットアプリ
  • 中小企業向け決済ソリューション

主な機能

  • ネイティブ SumUp SDK 統合
  • 安全なカード決済処理
  • クロスプラットフォーム対応(Android および iOS)
  • 簡単なターミナル接続
  • ユーザー認証フロー

適している対象

  • リテールアプリ
  • サービスベースのビジネス
  • イベント主催者
  • フリーランスが支払いを受け入れています
  • 電子商取引拡張機能

注意事項

  • SumUpのMerchantアカウントが必要です
  • サポートされている地域に限定
  • SumUp端末ハードウェアに依存
  • 支払い規制への適切な準拠が必要です
  • バックグラウンド実行には追加の構成が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

sumup

pub package likes popularity pub points

A Flutter plugin for the SumUp SDK. Supports card reader and Tap-to-Pay payments on Android and iOS.

Partner Links

Support this project by purchasing SumUp terminals through our affiliate links for your country:

Prerequisites

  1. Registered for a merchant account via SumUp's country websites (or received a test account).
  2. Received a SumUp card terminal: Solo, Air, Air Lite, PIN+ terminal, Chip & Signature reader, or SumUp Air Register.
  3. Requested an Affiliate (Access) Key and registered your application ID via the SumUp Dashboard.
  4. Flutter 3.44+ and Dart 3.12+.
  5. iOS deployment target 16.0+ and Xcode 26.2+ (iOS 16.7+ for Tap-to-Pay; 17.5+ recommended).
  6. Android minSdkVersion 26+ (30+ for Tap-to-Pay), targetSdkVersion 36, Java 17, Android Gradle Plugin 9.2.1, and Gradle 9.5.1.

Migrating from 0.14.x

Version 0.15.0 adopts the native SDK 7.x toolchains.

  • Upgrade the app to Flutter 3.44+ / Dart 3.12+. SumUp Android SDK 7.1 requires Kotlin 2.4.0, while Flutter 3.44 still needs its temporary AGP 9 compatibility mode for this explicit KGP version. In the host app's android/gradle.properties, set:
    android.builtInKotlin=false
    android.newDsl=false
    
    Declare org.jetbrains.kotlin.android version 2.4.0 with apply false in android/settings.gradle:
    plugins {
        id "org.jetbrains.kotlin.android" version "2.4.0" apply false
    }
    
    Then apply it in android/app/build.gradle:
    plugins {
        id "org.jetbrains.kotlin.android"
    }
    
    Flutter 3.44 reports this legacy-KGP path as temporary; keep the two compatibility flags until Flutter can use the vendor-required Kotlin version through AGP's built-in Kotlin integration.
  • Compile and target Android API 36 with Java 17, AGP 9.2.1, and Gradle 9.5.1.
  • Keep Android minSdk 26 for card-reader-only apps. Configuring Tap-to-Pay credentials enables the TTP implementation; the host app must then also set minSdk to 30.
  • Use an iOS 16 deployment target with Xcode 26.2 or later. Swift Package Manager is recommended; SumUp will stop publishing new CocoaPods SDK releases after October 31, 2026.

Android rollback warning: after an app has initialized SumUp Android SDK 7.1.0, downgrading that installation to a version backed by an older native SDK is not supported. Validate the migration with a sandbox merchant and use a staged rollout.

iOS rollback warning: before downgrading from SumUp iOS SDK 7.1.2, upload all pending Offline Payments. If a downgrade is unavoidable, upload them first, delete the app, and then install the version backed by the older SDK.

Installing

Add sumup to your pubspec.yaml:

dependencies:
  sumup:

Import sumup:

import 'package:sumup/sumup.dart';

Getting Started

// 1. Initialise the SDK with your Affiliate Key
await Sumup.init(affiliateKey);

// 2. Log in — either interactively or with an OAuth token
await Sumup.login();
// or
await Sumup.loginWithToken(token);

// 3. (Optional) Ask the user to pick / configure a card reader
await Sumup.openSettings();

// 4. Optionally warm up the reader before checkout
await Sumup.prepareForCheckout();

// 5. Run a checkout
var payment = SumupPayment(
    title: 'Coffee',
    total: 3.50,
    currency: 'EUR',
    foreignTransactionId: '', // leave empty to auto-generate a unique ID
    saleItemsCount: 1,
    skipSuccessScreen: false,
    tip: 0.0,
);

var checkout = await Sumup.checkout(SumupPaymentRequest(payment));
// checkout.success          — bool
// checkout.transactionCode  — String
// checkout.amount           — double (not available on Android Tap-to-Pay)
// checkout.currency         — String (not available on Android Tap-to-Pay)
// checkout.products         — List<SumupProduct>; iOS and Android card reader only
// checkout.merchantCode     — String; Android Tap-to-Pay only
// checkout.cardScheme       — String; Android Tap-to-Pay only
// checkout.errors           — String; non-null when success is false

Available APIs

Sumup.init(affiliateKey);

Sumup.login();
Sumup.loginWithToken(token);

Sumup.isLoggedIn;
Sumup.merchant;

Sumup.openSettings();
Sumup.prepareForCheckout();
Sumup.isTipOnCardReaderAvailable;
Sumup.isCardTypeRequired;       // iOS only
Sumup.isCheckoutInProgress;     // iOS only

// Card reader checkout
Sumup.checkout(SumupPaymentRequest(payment));

// Tap-to-Pay checkout
Sumup.checkout(SumupPaymentRequest(payment, paymentMethod: PaymentMethod.tapToPay));
Sumup.checkTapToPayAvailability();  // → TapToPayAvailabilityResult
Sumup.presentTapToPayActivation();  // iOS only; no-op on Android

Sumup.logout();

Tap-to-Pay (TTP)

Accept contactless payments directly on compatible smartphones, without any additional hardware.

iOS

Requirements:

  • iPhone XS or later, iOS 16.7+ (17.5+ recommended); iPad is not supported
  • Entitlement com.apple.developer.proximity-reader.payment.acceptance added to your project (requires approval from Apple)
  • See Apple's HIG for Tap to Pay on iPhone

Setup:

  1. Log in with Sumup.login() or Sumup.loginWithToken().
  2. Call Sumup.checkTapToPayAvailability(). If isActivated is false, call Sumup.presentTapToPayActivation() to run the one-time activation flow.
  3. Use PaymentMethod.tapToPay in your request:
    var request = SumupPaymentRequest(payment, paymentMethod: PaymentMethod.tapToPay);
    var checkout = await Sumup.checkout(request);
    
Android

Tap-to-Pay is opt-in (since 0.14.2). The TTP SDK (com.sumup.tap-to-pay:utopia-sdk) lives in a private SumUp Maven repository. By default the plugin builds without it — no credentials, no private-repo access, no 401. The card-reader (merchant-sdk) checkout path works fully in this mode. You only need the steps below if you actually want Tap-to-Pay. (If you previously hit Could not resolve com.sumup.tap-to-pay:utopia-sdk … 401 Unauthorized, upgrade to 0.14.2+ and simply don't set the property.)

Requirements:

  • NFC-enabled physical device, Android 11 (API 30)+
  • Set the host application's minSdk to 30 when enabling Tap-to-Pay.
  • Enable core-library desugaring in the host app module, as required by Tap-to-Pay 1.1.1+:
    android {
        compileOptions {
            coreLibraryDesugaringEnabled true
        }
    }
    
    dependencies {
        coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
    }
    
  • Get Tap-to-Pay Maven credentials from SumUp (contact integration@sumup.com), then add them to your user-level ~/.gradle/gradle.properties (or pass them via -P / environment). Do not commit the credentials to the app repository. The plugin reads both credentials and automatically wires the private Maven repo and compiles the utopia-sdk dependency — you do not add it to your own build.gradle.
    SUMUP_TTP_MAVEN_USERNAME=...
    SUMUP_TTP_MAVEN_PASSWORD=...
    
    For environment-only configuration, use the names above or Gradle's standard ORG_GRADLE_PROJECT_SUMUP_TTP_MAVEN_USERNAME and ORG_GRADLE_PROJECT_SUMUP_TTP_MAVEN_PASSWORD variables.
  • SumUp sandbox merchants can test with a debuggable build. Live merchants require a non-debuggable build with USB Debugging and Developer Options disabled.

Usage:

  1. You must use Sumup.loginWithToken(accessToken) — token login is required for the TTP SDK to authenticate in the background.
  2. Use PaymentMethod.tapToPay in your request:
    var request = SumupPaymentRequest(payment, paymentMethod: PaymentMethod.tapToPay);
    var checkout = await Sumup.checkout(request);
    

Note: The Android TTP SDK does not return amount or currency in the transaction result. If you need them, query the SumUp Transactions API using checkout.transactionCode or checkout.foreignTransactionId.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。