Kashir Hasan
Kashir Hasan

Reputation: 11

Payment Gateway Integration between Android app and Web Api

This is my first time integrating a payment gateway. I am trying to integrate FlutterWave Payment gateway in my application. Its an Android app native with .net Web Api/Rest as backend. We deduct amount from customer credit card and as soon as payment is completed, on success we update the role of user to Pro in database. I am stuck as where should I integrate the payment gateway.

  1. Gateway integration at Android Side : Open the payment gateway screen in android app and take information from user and call the flutterwave api from android app. On success, post the information to the our web api. Issue in this strategy is, if the mobile internet connection gets lost or app is closed, the payment would have been completed without our backend server knowing about it and we would have lost all information related to transaction.
  2. Gateway integration at Web Api side : Takes information from user in android app and post the information to our server. On the server, the flutterwave api is called with the posted information and response is saved in database and notified to android app. Advantage is no information is lost about the transaction but sending card/bank related information from android to Web Api will be secured or not, and how to integrate the OTP process in it. We have SSL on our domain and should I save the CVV in database ?

Upvotes: 1

Views: 1096

Answers (1)

Milad Karimifard
Milad Karimifard

Reputation: 440

To do that securely and correctly you must use WebHook. you pay on the Android side and do nothing else on this side. To notify and update data you must implement a webhook on the API side.

this is the documentation link for WebHook on FlutterWave

https://developer.flutterwave.com/docs/events#what-is-a-webhook

Upvotes: 0

Related Questions