{"id":25227576,"url":"https://github.com/abom-me/thawani_payment","last_synced_at":"2025-10-26T04:32:48.485Z","repository":{"id":65101443,"uuid":"581965619","full_name":"abom-me/thawani_payment","owner":"abom-me","description":"Flutter Package allowed you to add Thawani Payment For Flutter app","archived":false,"fork":false,"pushed_at":"2025-02-10T17:28:49.000Z","size":451,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T21:03:10.622Z","etag":null,"topics":["android","dart","flutter","flutter-package","ios","pubdev"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/thawani_payment","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abom-me.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-25T04:34:51.000Z","updated_at":"2024-09-06T11:21:44.000Z","dependencies_parsed_at":"2023-01-12T08:00:59.223Z","dependency_job_id":"e7582460-06f2-4231-b8a3-9e622e262c37","html_url":"https://github.com/abom-me/thawani_payment","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"d1f48fcef99c0bcb5b9d8ce3bafc6a735f8b9e5d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abom-me/thawani_payment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abom-me%2Fthawani_payment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abom-me%2Fthawani_payment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abom-me%2Fthawani_payment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abom-me%2Fthawani_payment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abom-me","download_url":"https://codeload.github.com/abom-me/thawani_payment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abom-me%2Fthawani_payment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281059645,"owners_count":26437056,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","dart","flutter","flutter-package","ios","pubdev"],"created_at":"2025-02-11T09:06:20.426Z","updated_at":"2025-10-26T04:32:48.103Z","avatar_url":"https://github.com/abom-me.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# thawani_payment:\n\n\u003cimg src='https://abom.me/packages/thawani_flutter.png'  \u003e\n\u003cbr\u003e\n\n\n####  A package helps you to use thawani checkout api , to add thawani payment in Flutter App\n\n------------------\n## # 👨‍💻 *Developed  by:*\n\n\u003cimg alt=\"profile\" src=\"https://abom.me/packages/profile.png\" width=\"50\" height=\"50\"  style=\" border-radius: 100%\"/\u003e\n\n**Nasr Al-Rahbi [@abom_me](https://twitter.com/abom_me)**\n\n## 👨🏻‍💻 Find me in  :\n[![Twitter](https://img.shields.io/badge/Twitter-%231DA1F2.svg?logo=Twitter\u0026logoColor=white)](https://twitter.com/abom_me)\n[![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?logo=Instagram\u0026logoColor=white)](https://instagram.com/abom.me)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin\u0026logoColor=white)](https://linkedin.com/in/nasr-al-rahbi-08a573245)\n[![Stack Overflow](https://img.shields.io/badge/-Stackoverflow-FE7A16?logo=stack-overflow\u0026logoColor=white)](https://stackoverflow.com/users/19994059/nasr-al-rahbi)\n\n---------------\n\u003cbr\u003e\n\n\n**thawani_payment** using the official [webview_flutter](https://pub.dev/packages/webview_flutter).\n\u003cbr\u003e\n\u003cbr\u003e\n### ⚠️ The Requirement ⚠️ :\n\n|             | Android | iOS    |\n| ----------- | ------- | ------ | \n| **Support** | \tSDK 19+ or 20+ | iOS 9+ \n\n\n\n\n## Setup:\n\nPubspec changes:\n\n```\n      dependencies:\n        thawani_payment: \u003clast_verison\u003e\n```\nSample example to add pay button :\n\n```dart\nimport 'package:thawani_payment/thawani_payment.dart';\n\nThawaniPayBtn(\n  api: 'API Key',\n          pKey: 'Publishable Key',\n          clintID: 'String',\n          onError: (e){},\n          products:[],\n          onCreate: (v) {},\n          onCancelled: (v){},\n          onPaid: (v){}, \n          );\n```\n-----\n\n\nSample example to add pay function :\n\n```dart\nimport 'package:thawani_payment/thawani_payment.dart';\n\nThawani.pay(\n  api: 'API Key',\n          pKey: 'Publishable Key',\n          clintID: 'String',\n          onError: (e){},\n          products:[],\n          onCreate: (v) {},\n          onCancelled: (v){},\n          onPaid: (v){}, \n          );\n```\n\n## Getting Started\n\n- The official  API Document From Thawani in \u003chttps://docs.thawani.om/\u003e.\n\n- **First You Should have Keys From Thawani**  [Thawani Checkout](https://thawani.om/checkout/)\n\n- And ensure to enable billing for the project.\n\n### Android\n\n1. You should however make sure to set the correct `minSdkVersion` in `android/app/build.gradle` if it was previously lower than 19:\n\n\n\n\n```groovy\nandroid {\n    defaultConfig {\n        minSdkVersion 19\n    }\n}\n```\n\n\n### Note\n\n- **This package will update if there any update in Thawani checkout**\n- Your use of the package is your personal choice. The developer of the package has nothing to do with errors that may occur with you during payment.\n- I recommend using the test mode to ensure that the package is free of errors before uploading it to users.\n\n\nSee the `example` directory for a complete sample app.\n\n\n### Parameters of the ThawaniPayBtn\n\n```dart\n\n  ///  API Code From Thawani Company\n  ///  For Test Mode: rRQ26GcsZzoEhbrP2HZvLYDbn9C9et\n  \n  final String api;\n\n/// The Publishable Key From Thawani Company\n/// For Test Mode: HGvTMLDssJghr9tlN9gr4DVYt0qyBy\n  \n  final String pKey;\n  \n  /// The Widget  Shown In The Button , By Default it have Text\n  /// Text(\"Pay\",style: TextStyle(color: Colors.white,fontSize: 17),)\n \n  final Widget? child;\n  \n  \n  /// Button Style\n  /// ButtonStyle(\n  ///     elevation: MaterialStateProperty.all(0),\n  ///     shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(10))),\n  ///    backgroundColor: MaterialStateProperty.all(const Color(0xff4FB76C)),\n  ///   )\n  \n  final ButtonStyle? buttonStyle;\n\n \n  /// The Clint Id to be generated by merchant to identify the session (From Thawani API Doc).\n  /// You can use The User ID As Clint ID\n  \n  final String clintID;\n\n \n  /// The customer would be redirected to successUrl if payment processed successfully (From Thawani API Doc).\n  /// In This Package , The URL Unuseful\n  \n  final String?  successUrl;\n \n \n  /// The customer would be redirected to successUrl if he decides to cancel the payment (From Thawani API Doc).\n  /// In This Package , The URL Unuseful\n \n  final String? cancelUrl;\n\n  \n  /// A list of products the customer is purchasing. maximum  100 products (From Thawani API Doc).\n  /// [\n  ///      {\n  ///        \"name\": \"product Name\",\n  ///         \"unit_amount\": the price by Baisa, \u003e=100 \u003c=5000000000\n  ///        \"quantity\": the quantity of the line product,  \u003e=1 \u003c=100\n  ///       }\n  ///     ]\n  \n  final List\u003cMap\u003e products;\n\n  \n  /// Useful for storing additional information about your products, customers (From Thawani API Doc).\n  /// storing Any Data about your products, customers(users)\n  /// EX:\n  /// { \"userName\":\"Nasr Al-Rahbi\", \"Twitter\":\"abom_me\"}\n \n  final Map? metadata;\n\n \n  /// Make It true If You Want Test The Package Or The Api\n  /// By Default It's false\n  /// testMode: false\n  \n  final bool? testMode;\n\n  \n  ///The Function And The Result Of Data After Create Session.\n  \n  final void Function(Create create) onCreate;\n\n  ///The Function And The Result Of Data If The User  Cancelled The Payment.\n \n  final void Function(StatusClass payStatus) onCancelled;\n\n  ///The Function And The Result Of Data If The User  Cancelled The Payment.\n \n  final void Function(StatusClass payStatus) onPaid;\n\n  ///The Function And The Reason Of The Error,  If Any Error Happen.\n  \n  final  Function(Map error)? onError;\n\n```\n## Real Example:\n\n![Photo Example](https://abom.me/packages/thawani-package.png)\n\n## 🤗 Special thanks :\n- For Khalfan [@pwkhalfan](https://github.com/pwkhalfan) , for helping me with Thawani Document\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabom-me%2Fthawani_payment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabom-me%2Fthawani_payment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabom-me%2Fthawani_payment/lists"}