Viva Wallet POS Flutter

Viva Logo

Pub Pub Likes Pub Points Star on GitHub License: BSD-3-Clause

This is a Flutter plugin for Android and iOS integration with Viva Terminal.

You can download the POS app from:

Google Play Store

App Store

For demo access, you must use the demo version of the Viva.com Terminal App. Contact Viva.com for demo access.

Feel free to contribute to this project on GitHub.

Installation

Add the package to your project:

flutter pub add viva_wallet_pos

This will add the latest compatible version of viva_wallet_pos to your pubspec.yaml.

Then run:

flutter pub get

Getting Started

Using the library

Please see the example project for basic usage.

Have a look at the official developer page:

https://developer.vivawallet.com/apis-for-point-of-sale/card-terminal-apps/android-app/

All function and parameter names in the plugin follow the official documentation.

Sample sale

import 'package:flutter/foundation.dart';
import 'package:viva_wallet_pos/viva_wallet_pos.dart';

final pos = VivaWalletPos();

try {
  final response = await pos.sale(
    clientTransactionId: 'Invoice 1234',
    amount: 10.00,
    showRating: false,
    showReceipt: true,
    showTransactionResult: false,
  );

  _resultMessage(response.message);
} catch (e) {
  debugPrint(e.toString());
}

Sample ISV sale

import 'package:flutter/foundation.dart';
import 'package:viva_wallet_pos/viva_wallet_pos.dart';

final pos = VivaWalletPos();

try {
  final response = await pos.isvSale(
    amount: 10.0,
    tipAmount: 0.2,
    isvAmount: 0.1,
    clientTransactionId: 'CLIENT_TRANS_ID',
    isvClientId: 'ISV_CLIENT_ID',
    isvClientSecret: 'ISV_CLIENT_SECRET',
    isvMerchantId: 'ISV_MERCHANT_ID',
    isvClientTransactionId: 'ISV_CLIENT_TRANS_ID',
  );

  _resultMessage(response.message);
} catch (e) {
  debugPrint(e.toString());
}

Supported methods

Unsupported methods - work in progress

  • preauth request
  • capture pre-auth request
  • rebate request

All trademarks, logos and brand names are the property of their respective owners. Use of these names, trademarks and brands does not imply endorsement.