square_pos 0.1.3 copy "square_pos: ^0.1.3" to clipboard
square_pos: ^0.1.3 copied to clipboard

Flutter wrapper for the Square POS SDK. With this plugin, your app can easily request payment via the Square POS app on Android and iOS.

Square POS SDK for Flutter #

pub package likes popularity pub points

A Flutter wrapper to use the Square POS SDK.

With this plugin, your app can easily request payment via the Square POS app on Android and iOS.

Prerequisites #

  1. Registered for a Square developer account via Square.
  2. Deployment Target iOS 12.0 or higher.
  3. Android minSdkVersion 21 or higher.

Add URL schemes (iOS) #

  1. Add the request URL scheme as a LSApplicationQueriesSchemes key into your Info.plist file to indicate that your application uses the square-commerce-v1 URL scheme to open Square Point of Sale.
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>square-commerce-v1</string>
</array>
  1. Add your custom response URL scheme as CFBundleURLTypes keys in your Info.plist file.
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>YOUR_BUNDLE_URL_NAME</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>myapp-url-scheme</string>
    </array>
  </dict>
</array>

Installing #

Add square_pos to your pubspec.yaml:

dependencies:
  square_pos:

Import square_pos:

import 'package:square_pos/square_pos.dart';

Getting Started #

Init SquarePos SDK:

SquarePos.init(applicationID, callbackScheme);

Check if Square POS is installed on device:

SquarePos.canRequest;

Complete a transaction:

var request = SquarePosPaymentRequest(
    money: SquarePosMoney(amountCents: 100, currencyCode: "USD"),
    supportedTenderTypes: [
        SquarePosTenderType.card,
        SquarePosTenderType.cardOnFile,
        SquarePosTenderType.squareGiftCard
    ]);
SquarePos.requestPayment(request);

Available APIs #

SquarePos.init(applicationID, callbackScheme);

SquarePos.canRequest;

SquarePos.requestPayment(request);
1
likes
160
pub points
0%
popularity

Publisher

verified publisherovatu.com

Flutter wrapper for the Square POS SDK. With this plugin, your app can easily request payment via the Square POS app on Android and iOS.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on square_pos