Demystifying Online Payments – What happens when you make an online purchase and what can go wrong?

Demystifying Online Payments – What happens when you make an online purchase and what can go wrong?

We are talking about payments and how the payment works in the online world now as a developer most of the time you interact with a payment system just to integrate it in an e-commerce website or your clients website and that’s pretty much it you don’t really know what happens after that you’re given the entire product you have shipped it but as a consumer there’s a lot that happens in between there’s a lot of problems that you face and especially the problem when your account from your account the money was deducted but you never got the product instantaneously there is sometimes a delay you get into the mess and a whole bunch of things so I’ll divide this Article into variety of scenarios or variety of cases like what kind of things happen when you make a payment online now in the past also I have created a Article which has a lot of technical jargons in it like how these tokens are being made and how these tokens reach to each other and a whole bunch of other things in this Article I’ll keep it absolutely at a ground level so that everybody who is making a purchase online can understand what goes wrong and what goes right when you need to hit that panic button and how the things will process or reverse back and how things will get sorted out so let’s get started and talk about the online payment systems at a very ground level before I talk about this online payment systems let me inform you that I do have my fair share of experience in working with variety of payment gateways I’ve integrated with them I’ve studied a lot about their API and variety of projects including Braintree PayPal stripe Razer pay insta mojo pay you money PayTM and a whole bunch of others as well but this is not regarding that this is regarding about general purchasing just like I purchase on websites like Flipkart or swiggy or Amazon or any other as well so let’s start with the cases or scenarios that happens when you make an online purchase case numero-uno case number one this is the most easiest one and all the merchants and all the clients and everybody just loves it in the one of the previous Article I also mentioned that when you purchase from any website you don’t make payment to the direct owner of that website for example when you make a payment from Amazon or any food web sites like swiggy you are not making payment directly to the owner of that website you are making a payment through a payment gateway and these payment gateways based on the deals that we have cracked with them sometimes charges 3% to 0.5 percent based on variety of scenarios and amount of transactions that are being made on a website you’re making a payment to those payment gateways and those payment gateways just don’t send us the direct money they send us a token and that token and information is there whether the payment was successful was it authorized was it canceled what happened with that so we just work on these websites through that payment gateway so let me clear this up you make a payment on to a website the website opens up the payment gateway you make a payment on the payment gateway and payment gateway passes us the information onto the website that’s clear up now also during that there are a variety of compliances that we have to follow like there is one PCI compliance which is payment card industry data security compliance I know it’s a big word in big jargon but these payment gateway actually helps us to follow all these compliances and all these rules and regulation now moving back onto the part where I was talking about how these payment gateway works so scenario number one in the scenario number one I would love to keep two things which are absolutely simple case number one you’ve made a payment it got authorized it got authorized it got a success successfully it was processed on the website successfully you got your course you got your food delivery or whatever you were asking off everything goes nicely everybody loves it and in the sub part of this like part two in that case you have entered the card information probably wrong probably the name on the card was entered wrong or the pin was wrong or maybe there was insufficient balance in that case you got a decline or the failure and that’s also fine these all things are actually being loved by merchants because there is a total transparency either it got it or we don’t got it so is something which every merchant loves the things get tricky in the case number two the case number two is actually tricky in which you make a payment the payment was deducted from your account but on the website it says payment was not made or transaction failed or you didn’t got the product so what is happening in that case now before I go further it’s totally okay to hit that panic button during this mode because you made a payment you were expecting that the things will get into my account or the order will be successful and it didn’t Got and your amount was also detected now this is something that usually happens with the network traffic now because on these payment gateways sometimes the traffic is too high to make all these payments now this is a very rare case scenario probably in thousands of you’ll get be the one person or probably sometimes in 10,000 he will be the one person but they do occur they do happen a lot so in that case you made a payment your payment was deducted but your payment was in the queue of the bank to successfully allow it to be deducted but since you got the message of deduction but the process or the payment was still in the queue now these websites which we design probably learned code online or swiggy they are designed that we wait for the token to come from the payment gateway for a limited amount of time we cannot keep our payment gateway open like forever we have to shut it down and we have to wait for that token so if that token comes after when the Gateway was closed from our website your payment now is in the air it got adducted from your account but it never reached to our account so in that case the transaction actually comes into the different stage which is known as authorized State in that case your payment was deducted it’s there marked as authorized that you can deduct it but it never reached to the payment website so in that case what the merchant does it goes manually and capture that payment so we have to process such things manually so sometimes these cases are resolved when you write a mail to the organization or sometimes they keep on checking these things every 12 to 14 hours like in our case we check such things like every 14 hours or 15 hours and we manually check whether there was some authorized payment or not it happens it happens a lot when you have huge number of transactions going on in every single day so these things are pretty common to happen so in that case whom to blame I would say the network congestion should be blamed it’s not the merchant who is doing anything wrong it’s not that you are doing anything wrong it’s just the traffic that sometimes keep things in the middle and things get messy there the scenario number three is actually the worst case scenario for the merchant side as well as for the customer side these are a very rare scenario but trust me they also happen these are very rare like in five thousand or ten thousand to one the ratio is pretty high but they do occur I have seen a lot of them so how the scenario works you make a payment on the website the payment was deducted from your end but somehow the bank processed the wrong signal to the payment gateway and it processed the wrong signal as failed to the payment gateway payment gateway will further send the information to the website that this transaction was failed but now since you have got the payment deducted from your account but the payment gateway and the website got the signal of failed transaction things get messy payment was deducted from your outside merchants a is we got your transaction has failed what to do now in that case the bank is actually responsible for that but banks are very tricky you cannot blame the banks directly they are pretty cautious about it so what they do after a few hours probably three to four hours is the window that I have personally seen in the three to four hours they send another signal to the same payment that was processed and they mark this payment as authorized so what will happen after three to four hours they change their signal from failed to authorized and these are late marked as authorized in that case merchant has couple of options either he can refund that payment or can capture that payment and process the order or whatever he likes to do but this is a pretty panicky situation you are saying that my payment got deducted merchant is saying don’t know where your pavement is it says it it is marked as failed and after three hours the payment was processed so you blame the merchants that hey you said it was failed then how come you were able to process it later on now in that case obviously the bank is somebody who is to be blamed but they don’t accept their fault right away they just market later on so again this is a situation where I would recommend just to wait for a few moments probably three to four hours and things will get sorted out hopefully but the good thing is since all of these websites and payment gateways follow the PCI compliance there is never going to be a scenario where your payment was deducted and you didn’t got the product all these payment gateways are made or designed in such a way that they are on the auto refund policy if some some of the purchase that you have made is marked as authorized and the merchant is not able to capture that eventually after two to three days they will be automatically

refunded back into your account so it’s not like your payment is going to be stuck somewhere where nobody is looking it will either get processed in the merchant side or if merchant is not manually capturing it it will hundred-percent be processed back in your account who too much of the information in just one Article but there is one thing more which is how these refund actually works and why does this refund actually take so much of the time so when you make a payment on the online website and you expect that payment will go through there it’s not like that the payment gateway sends the token and just after a few minutes of the token it transfers the payment it rarely happens that and your refund is highly dependent on the payment cycle of that payment gateway and the website so let’s just say you buy a product and you didn’t like that product or you want a refund for that product so in that case your refund will be marked to be refunded but your refund will be processed on the day when that transaction will be processed on the merchant account it’s a little bit confusing thing but these payments are being hold by the payment gateway for X number of days sometimes three days sometimes one day sometimes four day depends what kind of deal you were able to crack so until then that payment is just there it is marked some time as refund sometimes marked as to be processed to merchant whatever will happen will happen after two days or three days so if the payment was marked as refund after three days your payment will start processing and since there are two banks involved here the bank of the payment gateway and your bank they also have to synchronize so in that process sometimes it takes two more days and that’s why your refund takes four to five days and sometimes more than a week to process your payment back so here it’s it’s a complicated world in the in the systems and when you work on a start-up or anything these are the information that are very crucial to you and you should know them now surely I would accept that these kinds of information is not usually accessible to the developer because we never actually do so much of the work in the payment gateway and in the recent few years only I got involved so much in the payment gateways and I got this much of the information so I thought let’s just share it with you as well now in case you would like me to more explain about these payment gateways and probably design something mode or a comparison Article on different kind of payment gateways do let me know in the comments section I have plenty of experience with variety of payment gateways .

Leave a Reply