{"id":21639972,"url":"https://github.com/donnc/hot-recharge-flutter","last_synced_at":"2025-08-02T07:41:42.797Z","repository":{"id":53749845,"uuid":"339788864","full_name":"DonnC/hot-recharge-flutter","owner":"DonnC","description":"perform airtime topup across all networks and zesa recharge in mobile app with flutter hot-recharge plugin","archived":false,"fork":false,"pushed_at":"2022-08-21T10:53:12.000Z","size":1049,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T17:01:22.961Z","etag":null,"topics":["flutter","flutterdevzw","hot-recharge","mobile-topup","zesa","zimbabwe"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/hot_recharge","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/DonnC.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":"2021-02-17T16:39:55.000Z","updated_at":"2025-03-21T02:37:58.000Z","dependencies_parsed_at":"2022-08-13T02:50:40.591Z","dependency_job_id":null,"html_url":"https://github.com/DonnC/hot-recharge-flutter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DonnC/hot-recharge-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonnC%2Fhot-recharge-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonnC%2Fhot-recharge-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonnC%2Fhot-recharge-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonnC%2Fhot-recharge-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DonnC","download_url":"https://codeload.github.com/DonnC/hot-recharge-flutter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonnC%2Fhot-recharge-flutter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348786,"owners_count":24236306,"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-08-02T02:00:12.353Z","response_time":74,"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":["flutter","flutterdevzw","hot-recharge","mobile-topup","zesa","zimbabwe"],"created_at":"2024-11-25T04:15:50.457Z","updated_at":"2025-08-02T07:41:42.726Z","avatar_url":"https://github.com/DonnC.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Hot Recharge](https://ssl.hot.co.zw/)\nperform airtime topup across all networks, vouchers and zesa recharge with hot-recharge flutter plugin\n\n- ℹ Not an official hot-recharge flutter plugin\n- a flutter plugin port of [hot-recharge python library](https://pypi.org/project/hot-recharge/) and [hot-recharge node package](https://www.npmjs.com/package/hotrecharge)\n\n## screenshots\n![mobile-topup](https://raw.githubusercontent.com/DonnC/hot-recharge-flutter/main/Docs/demo.gif)\n\n## Plugin installation\n- add latest version of `hot_recharge` to your `pubspec.yaml` file\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n\n  hot_recharge:\n```\n\n## Sign Up\n- needs a hot recharge co-operate account, sign up [here](https://ssl.hot.co.zw/register.aspx)\n- or contact hot-recharge for a proper account\n- ![sign up](https://raw.githubusercontent.com/DonnC/hot-recharge-flutter/main/Docs/images/signup_cooperate.png)\n\n## Authentication keys\n- `accessCode` := the email address used on registration\n- `accessPswd` := the password of the account used on registration\n  \n```dart\n// import hot-recharge plugin\nimport 'package:hot_recharge/hot_recharge.dart';\n\n// create api instance\nhotRecharge = HotRecharge(\n    accessCode: '\u003cyour-email\u003e', \n    accessPswd: '\u003cyour-pwd\u003e',\n    enableLogger: false, // flag to true to enable detailed log while testing, use while testing ONLY\n);\n```\n\n## Features\n- [✔]  perfom airtime topup\n- [✔]  perfom zesa recharge\n- [✔]  query airtime topup transaction\n- [✔]  query zesa transaction\n- [✔]  get account airtime balance\n- [✔]  get account zesa balance\n- [✔]  check zesa customer\n- [❌] perform evd transaction\n- [❌] perform bundle topup\n- `(...)` and more\n\n## Performing requests\n- all requests returns an instance of `ApiResponse` response model\n- this shows how to perform api requests to hot-recharge services\n\n#### topup number\n```dart\n// supports both mobile and '08xxxx...' numbers\nfinal bal = await hotRecharge.topupNumber(1.50, '07xxxxxx');\n\n// check response status\nif (bal.rechargeResponse == RechargeResponse.SUCCESS) {\n      final PinlessRecharge result = bal.apiResponse;\n      showSnackbar(message: result.replyMsg);\n    }\n\n    // there was a problem\n    else {\n      showSnackbar(message: 'failed to sent airtime: ${bal.message}');\n    }\n\n```\n#### query transaction\n```dart\n// query a previous transaction agent reference for reconcilliation\nfinal result = await hotRecharge.queryTopupTransaction('previous-agent-reference');\n\nprint(result);\n\n```\n\n#### Custom messages\n- the api supports sending `OPTIONAL` custom messages to the user as confirmation messages\n- you can customize how the message will arrive like on the client | user side\n- certain placeholders have to be used and total message length should be less than 150 chars\n- --\n- **For airtime topup**\n  \ncustom Message place holders to use and their representation on end user:\n-  `%AMOUNT% - $xxx.xx`\n-  `%INITIALBALANCE% - $xxx.xx`\n- `%FINALBALANCE% - $xxx.xx`\n-  `%TXT% - xxx texts`\n-  `%DATA% - xxx MB`\n-  `%COMPANYNAME% - as defined by Customer on the website www.hot.co.zw`\n-  `%ACCESSNAME% - defined by Customer on website – Teller or Trusted User or branch name`\n  `\n\n- example\n  ```dart\n  final mesg = 'Recharge of \\$ %AMOUNT% is successful.\\nThe best %COMPANYNAME%!';\n\n  var response = await hotRecharge.topupNumber(\n      2.0,\n      '07xxxxxxxx',\n      customMessage: mesg,\n    );\n\n  print(response);\n   ```\n---\n- **For zesa transactions**\n  \ncustom Message place holders to use and their representation on end user:\n- `%AMOUNT% - $xxx.xx`\n- `%KWH% - Unit in Kilowatt Hours(Kwh)`\n- `%ACOUNTNAME% - Account holdername of meter number`\n- `%METERNUMBER% - meter number`\n- `%COMPANYNAME% - as defined by Customer on the website www.hot.co.zw`\n\n\n\n## Note on Zesa Recharges\n### Requirements \n- A method  for Purchasing ZESA Tokens \n- It is a ZESA requirement that any purchase must be **verified**. As such please ensure that you use the `checkCustomerDetail()` method \n```dart\n    final result = await api.checkZesaCustomer(meterNumber);\n\n    // check response status\n    if (result.rechargeResponse == RechargeResponse.SUCCESS) {\n        ZesaCustomerDetail details = result.apiResponse;\n        var customerInfo = details.customerInfo;\n\n        // prompt for user to verify info obtained from api\n        zesaUserPromptDialog(message: customerInfo.customerName);\n    }\n\n    // there was a problem\n    else {\n      showSnackbar(message: 'failed to check zesa user: ${result.message}');\n    }\n  ```\n\n- and prompt the customer to confirm the details **before** calling this method (`api.rechargeZesa(...)`). \n- There is a new transaction state specifically for ZESA that is Pending verification indicated by **reply code 4** (`RechargeResponse.PENDING`). Transactions in this state can result in successful transactions after a period of time once ZESA complete transaction.\n- You must call Query ZESA method (`api.queryZesaTransaction(...)`) periodically until a permanent resolution of the transaction occurs. This polling of a pending transaction should not exceed more that **4 request a minute**. Resending of transactions that have not yet failed can result in the duplication of transaction and lose of funds. \n- Please note ZESA does not allow *refunds* so the cost of any errors cannot be recovered. \n\n\n## Support 🤿\n- A little support can go a long way\n- For general questions and discussions please make use of [github discussions here](https://github.com/DonnC/hot-recharge-flutter/discussions)\n- You can help by making `PR` on any changes you would like to contribute to\n- `Fork` or `star` this repo, it will help us lot \n\n- `With 💙 from FlutterDevZW ` by [@DonnC](https://github.com/DonnC) \u0026 [@iamngoni](https://github.com/iamngoni)\n\n## Getting Started\n\nThis project is a starting point for a Dart\n[package](https://flutter.dev/developing-packages/),\na library module containing code that can be shared easily across\nmultiple Flutter or Dart projects.\n\nFor help getting started with Flutter, view our \n[online documentation](https://flutter.dev/docs), which offers tutorials, \nsamples, guidance on mobile development, and a full API reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnc%2Fhot-recharge-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonnc%2Fhot-recharge-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnc%2Fhot-recharge-flutter/lists"}