decentro_in_collections 1.0.0 copy "decentro_in_collections: ^1.0.0" to clipboard
decentro_in_collections: ^1.0.0 copied to clipboard

Collections

decentro_in_collections #

Collections

For more information, please visit https://decentro.tech

Requirements #

Dart 2.12 or later

Installation & Usage #

pub.dev #

dependencies:
  decentro_in_collections:
    version: 1.0.0

Github #

dependencies:
  decentro_in_collections:
    git: https://github.com/decentro-in/decentro-in-collections-sdk/tree/master/dart.git

Local #

To use the package in your local drive, add the following dependency to your pubspec.yaml

dependencies:
  decentro_in_collections:
    path: /path/to/decentro_in_collections

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:decentro_in_collections/decentro_in_collections.dart';

final decentro = Decentro(
    clientId: "CLIENT_ID",
    clientSecret: "CLIENT_SECRET",
    moduleSecret: "MODULE_SECRET",
    providerSecret: "PROVIDER_SECRET",
);

final generatePaymentLinkRequest = GeneratePaymentLinkRequest(
    referenceId: "ABCDEF12345",
    payeeAccount: "00000000000000000",
    amount: 4,
    purposeMessage: "Welcome to Decentro",
    generateQr: 0,
    expiryTime: 10,
    customizedQrWithLogo: 0,
    generateUri: 0,
);


try {
    final result = decentro.collections.generatePaymentLink(generatePaymentLinkRequest);
    print(result);
} catch (e) {
    print('Exception when calling collections.generatePaymentLink: $e\n');
}

Documentation for API Endpoints #

All URIs are relative to https://in.staging.decentro.tech

Class Method HTTP request Description
CollectionsApi generatePaymentLink POST /v2/payments/upi/link Generate payment link
CollectionsApi getTransactionStatus GET /v2/payments/transaction/{transaction_id}/status Get transaction status
CollectionsApi issueCollectRequest POST /v2/payments/collection Issue collect request
CollectionsApi issueUpiRefund POST /v2/payments/upi/refund Issue UPI Refund
CollectionsApi validateUpiHandle POST /v2/payments/vpa/validate Validate UPI handle

Documentation For Models #