section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
363 stars 889 forks source link

[Android] Creating a Callback URL for Safaricom Daraja API - (Lipa na Mpesa) with Firebase Cloud Functions in Android #4328

Closed osirevaline closed 2 years ago

osirevaline commented 2 years ago

[Android] Creating a Callback URL for Safaricom Daraja API - (Lipa na Mpesa) with Firebase Cloud Functions in Android

Proposed article introduction

Adding Lipa Na Mpesa features to your Android has been made easier with the introduction of Daraja API developed by Safaricom. It is the wish of every developer to receive all the information that Safaricom sends when a user of their app does a transaction because some payments go through and some fail. This information is useful in updating records in your Application.

A callback is an asynchronous API request that originates from the API server and is sent to the client in response to an earlier request sent by that client.

As an Android developer, having a callback URL means that you need to have a REST backend that will receive a response. This might be expensive. We can create a simple API with Firebase Cloud Functions that will help us to receive the data for the callback URL.

Key takeaways

Article quality

My article will be unique because there is no clear article or blog post that tries to explain about creating a callback URL in Android, most of them are for web applications.

References

N/A

Templates to use as guides

WanjaMIKE commented 2 years ago

Seems like a helpful topic. Let's ensure that it adds value to the community. Thanks