{"id":24200223,"url":"https://github.com/codeboxrcodehub/flutter-bkash","last_synced_at":"2025-09-21T23:32:31.692Z","repository":{"id":59879090,"uuid":"538950465","full_name":"codeboxrcodehub/flutter-bkash","owner":"codeboxrcodehub","description":"Flutter/dart package for payment gateway bKash (Bangladesh)","archived":false,"fork":false,"pushed_at":"2023-11-26T18:40:11.000Z","size":2758,"stargazers_count":16,"open_issues_count":7,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-23T22:56:41.404Z","etag":null,"topics":["bangladesh","bkash","bkash-payment-gateway","dart","flutter","payment","payment-gateway"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_bkash","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeboxrcodehub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-20T11:19:50.000Z","updated_at":"2024-07-13T20:37:33.000Z","dependencies_parsed_at":"2023-02-17T18:16:04.527Z","dependency_job_id":null,"html_url":"https://github.com/codeboxrcodehub/flutter-bkash","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fflutter-bkash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fflutter-bkash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fflutter-bkash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeboxrcodehub%2Fflutter-bkash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeboxrcodehub","download_url":"https://codeload.github.com/codeboxrcodehub/flutter-bkash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233808445,"owners_count":18733585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bangladesh","bkash","bkash-payment-gateway","dart","flutter","payment","payment-gateway"],"created_at":"2025-01-13T20:41:38.528Z","updated_at":"2025-09-21T23:32:31.683Z","avatar_url":"https://github.com/codeboxrcodehub.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\" \u003e\n  \u003cimg src=\"https://www.bkash.com/images/favicon.png\"\u003e\n\u003c/p\u003e\n\n \u003ch1 align=\"center\"\u003ebKash(BD) Mobile Finance Payment Gateway Flutter Package\u003c/h1\u003e\n\u003cp align=\"center\" \u003e\n\u003c/p\u003e\n\n\n[![Pub](https://img.shields.io/pub/v/flutter_bkash.svg)](https://pub.dartlang.org/packages/flutter_bkash)\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)]()  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)]() \n[![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n\nThis is a [Flutter package](https://pub.dartlang.org/packages/flutter_bkash) for [bKash](https://www.bkash.com/) BD Payment Gateway. This package can be used in flutter project. We created this package while working for a project and thought to release for all so that it helps.\n\n\u003e :warning: Please note that, you have to contact with bKash sales team for any kind of dev or production access keys or tokens. We don't provide any test account or access keys or don't contact us for such\n\nCheck the package in \u003ca target=\"_blank\" href=\"https://github.com/codeboxrcodehub/flutter-bkash\" rel=\"noopener\"\u003egithub\u003c/a\u003e and also available in \u003ca href=\"https://pub.dartlang.org/packages/flutter_bkash\" rel=\"noopener nofollow\" target=\"_blank\"\u003eflutter/dart package\u003c/a\u003e\n## How to use:\nDepend on it, Run this command With Flutter:\n```\n$ flutter pub add flutter_bkash\n```\nThis will add a line like this to your package's `pubspec.yaml` (and run an implicit **`flutter pub get`**):\n```\ndependencies:\n    flutter_bkash: ^0.3.1\n```\nAlternatively, your editor might support flutter pub get. Check the docs for your editor to learn more. Import it, Now in your Dart code, you can use:\n```\nimport 'package:flutter_bkash/flutter_bkash.dart';\n```\n## Features\n- Pay using bKash without an agreement\n- Create a bKash agreement for future payments\n- Pay using bKash with an agreement\n\n## Usage\nOfficial Link for API documentation and demo checkout\n- [bKash API Specifications](https://developer.bka.sh/v1.2.0-beta/reference)\n- [bKash Payment Checkout Demo](https://merchantdemo.sandbox.bka.sh/frontend/checkout)\n\n### Initialize the `FlutterBkash` instance:\n\n***Sandbox***\n```\nfinal flutterBkash = FlutterBkash();\n```\n***Production*** \n```\nfinal flutterBkash = FlutterBkash(\n\tcredentials: BkashCredentials(\n    username: \"app_username\",\n    password: \"app_password\",\n    appKey: \"app_key\",\n    appSecret: \"app_secret\",\n    isSandbox: false,\n  ),\n);\n```\n\u003e Make sure to replace the provided credentials with your own bKash sandbox or production credentials depending on your development environment.\n\n### Pay without Agreement\nTo make a payment without an agreement, use the `pay` method:\n\n***Request***\n```\nfinal result = await flutterBkash.pay(\n      context: context, // BuildContext context\n      amount: 100.0, // amount as double\n      merchantInvoiceNumber: \"invoice123\",\n);\n```\n***Response***\n```\nBkashPaymentResponse(\n\ttrxId: AFI60BAC94, \n\tpayerReference:  , \n\tpaymentId: TR0011fd4uZMS1687062024354, \n\tcustomerMsisdn: 01877722345, \n\tmerchantInvoiceNumber: tranId, \n\t_executeTime: 2023-06-18T10:22:31:623 GMT+0600\n)\n```\n### Create Agreement\nTo create a new agreement, use the `createAgreement` method:\n\n***Request***\n```\nfinal result = await flutterBkash.createAgreement(context: context);\n```\n***Response***\n```\nBkashAgreementResponse(\n\tpayerReference:  , \n\tpaymentId: TR0000RCHQGmX1687063332607, \n\tcustomerMsisdn: 01877722345, \n\tagreementId: TokenizedMerchant02P1AIJ7G1687063381235, \n\t_executeTime: 2023-06-18T10:43:01:235 GMT+0600\n)\n```\n### Pay with Agreement\nTo make a payment with an existing agreement, use the `payWithAgreement` method:\n\n***Request***\n```\nfinal result = await flutterBkash.payWithAgreement(\n  context: context, // BuildContext context\n  amount: 100.0, // type as double\n  agreementId: \"agreement123\",\n  merchantInvoiceNumber: \"invoice123\",\n);\n```\n***Response***\n```\nBkashPaymentResponse(\n\ttrxId: AFI60BAC94, \n\tpayerReference:  , \n\tpaymentId: TR0011fd4uZMS1687062024354, \n\tcustomerMsisdn: 01877722345, \n\tmerchantInvoiceNumber: tranId, \n\t_executeTime: 2023-06-18T10:22:31:623 GMT+0600\n)\n```\n### Error Handling\nThe methods mentioned above may throw a `BkashFailure` exception in case of an error. You can catch and handle the exception using a try-catch block:\n```\ntry {\n  // Make a payment or create an agreement\n} on BkashFailure catch (e) {\n  // Handle the error\n  print(e.message);\n}\n```\n\nExamples for see the `/example` folder.\n\n**Here is the example code** [link](https://github.com/codeboxrcodehub/flutter-bkash/blob/master/example/lib/main.dart)\n\n**Example Video Demo**\n\n\u003cdiv align=\"center\"\u003e\n  \u003cvideo src=\"https://github.com/codeboxrcodehub/flutter-bkash/assets/19654129/5f9e12ee-b5cb-4dc2-a522-0c631f1f7032\" controls\u003e\u003c/video\u003e\n\u003c/div\u003e\n\n\n### Importance Notes\n- Read the comments in the example of code\n- See the documents and demo checkout [bKash API Specifications](https://developer.bka.sh/v1.2.0-beta/reference), [bKash Payment Checkout Demo](https://merchantdemo.sandbox.bka.sh/frontend/checkout)\n\n\n## Contributing\n**Core Maintainer**\n- [Md Riadul Islam](https://github.com/rdnasim)\n- [ABDULLAH AL MASUM](https://github.com/dev-masum)\n\nContributions to the **flutter_bkash** package are welcome. Please note the following guidelines before submitting your pull request.\n\n- Follow [Effective Dart: Style](https://dart.dev/guides/language/effective-dart/style) coding standards.\n- Read bKash API documentations first.Please contact with bKash for their api documentation and sandbox access.\n\n## License\n\nflutter_bkash package is licensed under the [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause).\n\nCopyright 2023 [Codeboxr.com Team](https://codeboxr.com/team-codeboxr/). We are not affiliated with bKash and don't give any guarantee.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeboxrcodehub%2Fflutter-bkash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeboxrcodehub%2Fflutter-bkash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeboxrcodehub%2Fflutter-bkash/lists"}