The customer clicked “Pay.” What can go wrong?

The product is chosen. The size fits. The delivery terms work. The card is in hand. The customer clicks “Pay.” From the customer's side, the next few seconds look fairly simple.

By Nemanja Pavlović  ·  CEO / Founder

6 min read

The customer clicked “Pay.” What can go wrong?

A spinner appears, then a message that the order went through, and the story ends there. On the other side of the screen, much more just happened. Perhaps the store checked stock and sent a request to the payment processor. The bank approved or declined the transaction. The ERP, the business system behind the store, received a new order. The system picked a delivery method and passed the data to logistics. The stock count went down, the order confirmation was created and an email went out to the customer.

It takes only one link in that chain to answer the wrong way. At that moment, a very ordinary button becomes one of the most complex parts of any serious online store.

Checkout is more than a form

When people discuss a good checkout, they usually mean field count, guest checkout, the mobile layout or a buy button that stands out. All of these matter. But they are only the part of the story the customer sees.

Behind the checkout sits infrastructure that must answer a series of questions almost at once. Is the product still available? Is the price still the same? Does the discount still apply? Can the chosen delivery method reach this address? Did the payment go through? Did the order reach the internal system, and which location ships the product?

Even Shopify, whose checkout exists to standardize much of this, checks stock again during checkout. If the product sold out in the meantime, the customer sees a notice and cannot complete the purchase.

That is a small example of a big problem. What was true when the customer opened the product page is not always true when they click “Pay.”

The product is in the cart, but no longer in stock

Imagine there are two TVs left. A customer in Belgrade puts one in the cart. A few seconds later, a customer in Novi Sad does the same. At that moment, a physical store sells one unit. Who gets the last TV?

For a small store with a few orders a day, this looks like an extreme case. In large retail systems, it is not unusual. Stock data comes from several warehouses, physical stores or the ERP, and all of it must reach the online store fast enough. If the sync runs late, a customer can buy something the company no longer has.

At that point, the problem leaves the website. Someone must contact the customer, explain what happened, perhaps refund the money and offer an alternative. One wrong stock number just became a problem for customer support, logistics and the brand's reputation.

DHL's 2026 research shows how much availability matters at the end of a purchase. In its global survey, 65% of shoppers named an unavailable product as one of their reasons for giving up on an online purchase.

The card is fine, but the payment still failed

The message “Payment failed” sounds very final. But a failed transaction does not always mean the customer lacks the money or the bank declined the card. The request can time out. The connection to the bank can drop for a moment. The transaction can take the wrong route, or another short problem can occur between two systems.

In 2026, WooCommerce and Stripe surveyed more than 1,400 online shoppers in North America, Europe and Asia-Pacific. Among shoppers who left during checkout, 28% named a failed transaction as the reason. That was the most common checkout or payment problem in the survey. The authors point to routing errors, network timeouts and missed retries, and they call these “soft failures.”

For the customer, the situation is simple: they clicked “Pay” and got an error. For the system, a much harder question remains: what now?

  • Try again?
  • Send the same transaction by another route?
  • Ask the customer to pay again?
  • Keep the cart?
  • Hold the product, and for how long?

And most important of all: how do you make sure the customer does not pay twice?

The money is gone, but the store never heard about it

This is one of the worst cases for the customer experience. The customer completes the payment and the bank approves it. The money is reserved or charged. Then the connection between the payment system and the online store breaks.

Maybe the customer sees an error. Maybe the order is missing from their account. The confirmation email does not arrive. From the customer's side, the situation is very simple: the money is gone and there is no order.

That is why a serious payment system cannot rely only on what happened in the customer's browser. The backend must confirm the transaction status on its own. It must also handle replies that arrive late and events that arrive more than once.

This is the kind of infrastructure a customer never sees while it works perfectly. They see it only when it fails.

The payment went through, but the ERP never got the order

The online store can finish its part of the job perfectly, and the trouble only starts there. In a serious e-commerce system, the order travels on through other business systems. The ERP must record it. The warehouse must know what to prepare. Accounting needs the right data, logistics needs the address, and the order status must later return to the store.

What happens to the order if one of these systems is down right now? We cannot ask the customer to buy again, because they already paid. We also cannot drop the request because the ERP did not answer for five seconds.

That is why serious integrations plan for processing queues, retries, error logs and a way to continue once the system is back. All this time, the customer sees only “Thank you for your order.” And that is exactly how it must be.

Who will deliver the order?

The purchase went through, the product exists and the ERP knows about the order. Now the order must reach the customer. Maybe the store works with one courier, maybe with three. Maybe a partner like Wolt offers same-day delivery. Maybe large appliances need completely different logistics than headphones. Maybe the customer can pick the product up in a store or at a parcel locker.

Delivery is no longer a dropdown with a few options. The system needs the product's dimensions, the customer's address and the delivery zone. It also needs each courier's availability and working hours, and the stock in a specific warehouse or store. On top of that come the rules for which options the store can offer at all. And to the customer, all of it must look simple.

This is not a small detail. This year DHL surveyed 29,000 online shoppers in 29 countries. Of those, 67% said they once gave up on a purchase because the delivery options did not meet their expectations. Another 62% named cases where the payment method they wanted was missing.

In other words, you can build a perfect product page and spend serious money on marketing. Then you lose the customer in the last thirty seconds, because the system behind checkout is not set up well enough.

What if the customer clicks twice?

The page takes a little longer to load. The customer is not sure the first click registered, so they click again.

That is a normal human reaction. Systems must be built for it, so that the same request never creates two orders or two payments. The same goes for automatic retries. When a system gets no answer, it can send the request again.

But “I got no answer” and “the first request failed” are two different things. Maybe the request went through and only the confirmation never came back. That is why payment and order systems follow one important rule: repeating the same operation must not create unwanted duplicates.

To the customer, this is an invisible technical detail, until two identical charges show up on their card.

And only then comes the email

Once everything before it succeeds, we expect one more thing that looks almost trivial: the order confirmation.

But the email also depends on yet another system.

  • Is the email service up?
  • Did the store build the message correctly?
  • Are the amount, address and products right?
  • Did the customer type a valid email address?

It is interesting how much trust we put in that one message. When the confirmation arrives right after the purchase, we stop thinking about the process. When it is missing for a few minutes, we open the banking app to check.

That is why “Pay” is probably the most complex button in an online store

Online stores usually put the most attention into the visible part: product photos, filters, animations, product cards, banners and campaigns. Of course, all of that matters. But once a customer decides to give you money, the quality of the experience no longer depends only on the interface.

It depends on how the payment gateway, the bank, the store, the ERP, the warehouse and logistics talk to each other. It depends on what you planned for the moment one of them does not answer. Can the system tell a temporary error from a real decline? Can it recover without someone fixing things by hand?

The best checkout is often the one where the customer never notices how complex the system behind it is. They click “Pay,” wait a few seconds, get a confirmation and move on as if nothing special happened.

And behind that one click, a whole small digital logistics operation just took place.

AUTHOR

Nemanja Pavlović · CEO / Founder

Writes about strategy, sales and digital products.