buck_box_sdk 1.0.3 copy "buck_box_sdk: ^1.0.3" to clipboard
buck_box_sdk: ^1.0.3 copied to clipboard

Flutter plugin for BuckBox SDK. To know more about BuckBox, visit https://bustto.com/

BuckBox Flutter SDK #

BuckBox Flutter SDK helps merchant apps open a secure BuckBox checkout flow for UPI and card payments.

Requirements #

To start a BuckBox checkout, provide:

  • Merchant API key.
  • Bearer authorization token.
  • Payment amount.
  • Unique merchant transaction ID.
  • Platform value, such as Android or iOS.
  • Checkout environment, either staging or production.
  • Payer details, including first name, last name, email, and phone number.
  • Success, failure, and processing callback handlers.

Installation #

Add the package to your Flutter app and import the public SDK surface:

import 'package:buck_box_sdk/buck_box_sdk.dart';

Usage #

final sdk = BuckBoxSDK();

final checkoutStarted = await sdk.initSdk(
  context,
  BuckBoxInitConfig(
    apiKey: '<merchant-api-key>',
    authorization: '<bearer-token>',
    amount: 500,
    merchantTxnId: 'ORD-123',
    platform: BuckBoxPlatform.android,
    environment: BuckBoxEnvironment.production,
    payerDetails: const BuckBoxPayerDetails(
      firstName: 'Rahul',
      lastName: 'Sharma',
      email: 'rahul.sharma@example.com',
      phone: '9876543210',
    ),
    onSuccess: (payload) {
      // Show merchant success UI.
    },
    onFailure: (payload) {
      // Show merchant failure UI.
    },
    onProcessing: (payload) {
      // Show merchant pending/processing UI.
    },
  ),
);

initSdk returns true when checkout opens and false when validation fails or another checkout is already in progress.

Environments #

environment: BuckBoxEnvironment.staging

or

environment: BuckBoxEnvironment.production

Production is used by default.

0
likes
130
points
295
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for BuckBox SDK. To know more about BuckBox, visit https://bustto.com/

Homepage

License

unknown (license)

Dependencies

connectivity_plus, cryptography, device_info_plus, encrypt, flutter, http, url_launcher, webview_flutter

More

Packages that depend on buck_box_sdk

Packages that implement buck_box_sdk