{"id":18985136,"url":"https://github.com/safaricom/lnmonlineandroidsample","last_synced_at":"2025-04-07T12:05:37.221Z","repository":{"id":38549173,"uuid":"105259815","full_name":"safaricom/LNMOnlineAndroidSample","owner":"safaricom","description":"Lipa Na MPESA Online (STK Push) Android Sample Application. This app demonstrates an e-commerce purchase and checkout process via Mpesa and Daraja :smile:","archived":false,"fork":false,"pushed_at":"2024-05-26T17:13:31.000Z","size":1537,"stargazers_count":129,"open_issues_count":16,"forks_count":128,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-31T10:03:41.953Z","etag":null,"topics":["mpesa","mpesa-android","mpesa-api","mpesa-payments","mpesaandroid","mvvm-android","retrofit"],"latest_commit_sha":null,"homepage":"https://developer.safaricom.co.ke/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/safaricom.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-09-29T10:20:50.000Z","updated_at":"2025-02-19T09:42:55.000Z","dependencies_parsed_at":"2024-11-23T09:02:02.208Z","dependency_job_id":"8cebdac5-0933-444b-ade6-c0349d2c437a","html_url":"https://github.com/safaricom/LNMOnlineAndroidSample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safaricom%2FLNMOnlineAndroidSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safaricom%2FLNMOnlineAndroidSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safaricom%2FLNMOnlineAndroidSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safaricom%2FLNMOnlineAndroidSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safaricom","download_url":"https://codeload.github.com/safaricom/LNMOnlineAndroidSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648976,"owners_count":20972945,"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":["mpesa","mpesa-android","mpesa-api","mpesa-payments","mpesaandroid","mvvm-android","retrofit"],"created_at":"2024-11-08T16:24:50.043Z","updated_at":"2025-04-07T12:05:37.171Z","avatar_url":"https://github.com/safaricom.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lipa Na Mpesa Android Sample\n------------------------------\nThis app demonstrates how to impeliment Lipa Na MPESA Online.\nDocumentation on the API can be found on [Safaricom Developer Portal] (https://developer.safaricom.co.ke/docs)\n\n### Requirements\n\n* JDK Version 1.7 \u0026 above\n* Android Studio\n\n### Getting Safaricom Credentials\n1. Create an account on the [Safaricom Developer Portal] (https://developer.safaricom.co.ke/)\n2. Create a Lipa na MPESA Online App\n\n### Project Setup\n1. Rename  `sample.gradle.properties` file to `gradle.properties` then add you `Consumer key` and `Consumer secret`.\n2. Copy `sample-google-services.json` inside `app` directory and rename it to `google-services.json`. This will ensure your project build without an error.\n\n#### NB\n`sample-google-services.json` is just a sample file to help you bypass build error due to a `google-services.json` missing. \n\n####  Firebase Setup\nIn order to send push notifications to the user, you will need to setup [FCM - Firebase Cloud Messaging Service] (https://firebase.google.com/docs/cloud-messaging/android/client). AndroidHive has an awesome [tutorial](https://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm) on this. \n\n###  Screenshots\n\n##### Add an item to the cart: \n![alt text](https://github.com/safaricom/LNMOnlineAndroidSample/blob/master/art/a.jpg \"Screen A\")\n\n##### Add a customers phone number: \n![alt text](https://github.com/safaricom/LNMOnlineAndroidSample/blob/master/art/b.jpg \"Screen B\")\n\n##### The STK push payment popup is sent to the customer phone: \n![alt text](https://github.com/safaricom/LNMOnlineAndroidSample/blob/master/art/c.jpg \"Screen C\")\n\n##### MPESA confirmation message: \n![alt text](https://github.com/Jaymo/LNMOnlineAndroidSample/blob/master/art/d.jpg \"Screen D\")\n\n##### Payment confirmation from the API callback: \n![alt text](https://github.com/safaricom/LNMOnlineAndroidSample/blob/master/art/e.jpg \"Screen E\")\n\n### Libraries Used\n1. [Sweet alerts] (https://github.com/pedant/sweet-alert-dialog)\n2. [Butterknife] (https://github.com/JakeWharton/butterknife)\n3. [Retrofit] (http://square.github.io/retrofit/)\n4. [GSON] (https://github.com/google/gson)\n5. [FireBase] (https://firebase.google.com/docs/android/setup)\n6. [Okhttp] (http://square.github.io/okhttp/)\n7. [okio] (https://github.com/square/okio)\n8. [OkHttp Interceptors](https://github.com/square/okhttp/wiki/Interceptors)\n9. [Timber] (https://github.com/JakeWharton/timber)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafaricom%2Flnmonlineandroidsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafaricom%2Flnmonlineandroidsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafaricom%2Flnmonlineandroidsample/lists"}