{"id":32171180,"url":"https://github.com/beamkenya/ex_mpesa","last_synced_at":"2025-12-11T23:45:14.460Z","repository":{"id":52507326,"uuid":"360850195","full_name":"beamkenya/ex_mpesa","owner":"beamkenya","description":"Daraja API(Mpesa) Payment Library for Elixir","archived":false,"fork":false,"pushed_at":"2021-04-27T12:35:54.000Z","size":53,"stargazers_count":8,"open_issues_count":5,"forks_count":2,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-09-27T01:35:09.863Z","etag":null,"topics":["daraja-api","elixir","elixir-lang","mpesa-api","payment"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beamkenya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-23T10:41:50.000Z","updated_at":"2025-08-22T11:00:11.000Z","dependencies_parsed_at":"2022-09-06T15:11:18.720Z","dependency_job_id":null,"html_url":"https://github.com/beamkenya/ex_mpesa","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/beamkenya/ex_mpesa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beamkenya%2Fex_mpesa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beamkenya%2Fex_mpesa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beamkenya%2Fex_mpesa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beamkenya%2Fex_mpesa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beamkenya","download_url":"https://codeload.github.com/beamkenya/ex_mpesa/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beamkenya%2Fex_mpesa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280304890,"owners_count":26308061,"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-21T02:00:06.614Z","response_time":58,"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":["daraja-api","elixir","elixir-lang","mpesa-api","payment"],"created_at":"2025-10-21T17:43:41.832Z","updated_at":"2025-10-21T17:43:42.848Z","avatar_url":"https://github.com/beamkenya.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\u003cimg src=\"assets/mpesa.png\" width=\"140\"\u003e\u003c/p\u003e\n\n[![Actions Status](https://github.com/beamkenya/ex_mpesa/workflows/Elixir%20CI/badge.svg)](https://github.com/beamkenya/ex_mpesa/actions) ![Hex.pm](https://img.shields.io/hexpm/v/ex_mpesa) ![Hex.pm](https://img.shields.io/hexpm/dt/ex_mpesa) [![Coverage Status](https://coveralls.io/repos/github/beamkenya/ex_mpesa/badge.svg?branch=develop)](https://coveralls.io/github/beamkenya/ex_mpesa?branch=develop)\n\n# ExMpesa \n\n\u003e Payment Library For Most Mpesa(Daraja) Payment API's in Kenya. Let us get this :moneybag:\n\n## Table of contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Documentation](#documentation)\n- [Contribution](#contribution)\n- [Contributors](#contributors)\n- [Licence](#licence)\n\n## Features\n\n- [x] STK Transaction Validation\n- [x] B2C\n- [x] B2B\n- [x] C2B\n- [x] Reversal\n- [x] Transaction Status\n- [x] Account Balance\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `ex_mpesa` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_mpesa, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Configuration\n\nCreate a copy of `config/dev.exs` or `config/prod.exs` from `config/dev.sample.exs`\nUse the `sandbox` key to `true` when you are using sandbox credentials, chnage to `false` when going to `:prod`\n\n### Mpesa (Daraja)\n\nMpesa Daraja API link: https://developer.safaricom.co.ke\n\nAdd below config to dev.exs / prod.exs files\nThis asumes you have a clear understanding of how [Daraja API works](https://developer.safaricom.co.ke/get-started).\n\nYou can also refer to this Safaricom Daraja API Tutorial: https://peternjeru.co.ke/safdaraja/ui/ by Peter Njeru\n\n```elixir\nconfig :ex_mpesa,\n    consumer_key: \"72yw1nun6g1QQPPgOsAObCGSfuimGO7b\",\n    consumer_secret: \"vRzZiD5RllMLIdLD\",\n    mpesa_short_code: \"174379\",\n    mpesa_passkey: \"bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919\",\n    mpesa_callback_url: \"http://91eb0af5.ngrok.io/api/payment/callback\"\n```\n\n## Documentation\n\nThe docs can be found at [https://hexdocs.pm/ex_mpesa](https://hexdocs.pm/ex_mpesa).\n\n### Quick Examples\n\n#### Mpesa Express (STK)\n\n```elixir\n  iex\u003e ExMpesa.Stk.request(%{amount: 10, phone: \"254724540000\", reference: \"reference\", description: \"description\"})\n      {:ok,\n        %{\n        \"CheckoutRequestID\" =\u003e \"ws_CO_010320202011179845\",\n        \"CustomerMessage\" =\u003e \"Success. Request accepted for processing\",\n        \"MerchantRequestID\" =\u003e \"25558-10595705-4\",\n        \"ResponseCode\" =\u003e \"0\",\n        \"ResponseDescription\" =\u003e \"Success. Request accepted for processing\"\n        }}\n```\n\n## Contribution\n\nIf you'd like to contribute, start by searching through the [issues](https://github.com/beamkenya/ex_mpesa/issues) and [pull requests](https://github.com/beamkenya/ex_mpesa/pulls) to see whether someone else has raised a similar idea or question.\nIf you don't see your idea listed, [Open an issue](https://github.com/beamkenya/ex_mpesa/issues).\n\nCheck the [Contribution guide](contributing.md) on how to contribute.\n\n## Contributors\n\nAuto-populated from:\n[contributors-img](https://contributors-img.firebaseapp.com/image?repo=beamkenya/ex_mpesa)\n\n\u003ca href=\"https://github.com/beamkenya/ex_mpesa/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.firebaseapp.com/image?repo=beamkenya/ex_mpesa\" /\u003e\n\u003c/a\u003e\n\n## Licence\n\nExPesa is released under [MIT License](https://github.com/appcues/exsentry/blob/master/LICENSE.txt)\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=for-the-badge)](#)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeamkenya%2Fex_mpesa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeamkenya%2Fex_mpesa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeamkenya%2Fex_mpesa/lists"}