
Here PayTM takes care of communicating with bank and completing the payment.ĥ.

Bank Transaction: User completes the payment by choosing the options provided. Redirecting to PayTM: Once the checksum is generated, user will be redirected to PayTM payment screen showing multiple payment options like Debit / Credit card, Wallet, Net Banking etc., In this step, if the generated checksum is wrong, user will redirected back to app with error status.Ĥ. The checksum has to be generated considering the mandatory fields and Merchant ID.ģ. Order Id & Checksum: The next step is to generate checksum considering the order ID. This order ID has to be unique each time user redirected to PayTM payment screen, otherwise PayTM throws duplicate order id error.Ģ. This will insert a new order row or update existing row in db and generate unique Order ID.

Preparing Order: Once customer selects the items, the cart items will be sent to backend server. Below is lifecycle of a transaction from initiation to payment completion.ġ. Transactions – To show the list of transactions made by a user.Ĭompleting the checkout involves number of calls between app, backend and PayTM server.Payment screen – To make the necessary calls to backend server before redirecting user to payment gateway.Cart – A BottomSheet view to maintain the cart items.Home – To list down the available products along with name, thumbnail and price.Login, Register screens to login or create a new user.It has database ( Realm), network layer ( Retrofit) and payment options. The example app I have created is very minimal with very limited screens. I also tried making it simple as much as possible so that every beginner can understand it. So, I have prepared a sample project (both web and mobile) and provided the code on Github.

As writing an e-commerce app needs a bit of coding and architecture, everything can’t be covered in a single article. Today, in this article we are going to see how to integrate the PayTM gateway in a simple (bit complex actually 😛 ) e-commerce app.
