Online payments are payments you make on a website or an app, without a card machine or a cash counter. For instance, you might be buying a kurta, booking a train ticket on IRCTC or paying for a food order. You choose UPI, a card, net banking or a wallet. Then you approve the payment on your phone.
For you, it is one step. But several different products are involved, and different companies build them.
The first thing you see is the payment page. This page usually belongs to a payment gateway, not to the shop. The gateway collects your payment details and sends them to the banks.
Next, your bank must approve the payment. The gateway first sends the payment to the shop's own bank. In payments, the shop's bank is called the acquiring bank, or acquirer. It receives card and UPI payments on behalf of the shop. For a card payment, the acquiring bank sends the payment to a card network, such as Visa or RuPay. The card network then sends it to your bank. On the way, a fraud detection system checks the payment for signs of fraud. Finally, your bank approves or declines the payment. All of this takes about two seconds.
The money itself does not move in those two seconds. It moves later, usually on the next working day, together with thousands of other payments. Banks call these two steps authorisation and settlement.
Some newer products also appear on the payment page. Buy now, pay later lets you pay the price in monthly EMIs, even if you do not have a credit card. Embedded insurance offers you a small insurance or warranty just before you pay.
The shop never stores your real card number. It stores a token instead. A token is a different number that represents your card. It works only for that one shop. So even if someone steals it, they cannot use it to pay anywhere else.
After a sale, the shop sometimes has to send money out as well. For example, it may have to refund a customer. A marketplace also has to pay the sellers whose products were sold. Payouts software sends these payments, to thousands of bank accounts at once. When a software company sells to customers in other countries, a merchant of record can handle the tax rules of each country on its behalf.