How many customers want to pay, and my shop still loses the order? Declined payments, false declines and soft declines

TL;DR

Difficulty: Intermediate

Customers who are declined at the payment step have already decided to buy, and most shops never see them.

  • Measure the checkout success rate at the payment step, not only the provider's authorisation rate: in the example 1,980 of 2,150 checkouts (92.1%) end in an order.
  • Of the 170 lost checkouts, only 40 are hard declines. 130 are soft declines, abandoned or failed 3D Secure challenges and technical errors.
  • Better data, exemptions that are allowed to work, one safe retry for technical failures, a second way to pay inside the error, clear messages and a basket that survives recover 52 orders a month, £12,393 a year in contribution.
  • Record every attempt with its decline and advice code, and repeat a half hour check every quarter.

A customer has chosen the products, the address and the delivery, presses Pay, and the payment fails. No report counts that lost order. This chapter shows who declines a payment and why, which declines a shop can win back, and how to measure and fix the leak in a Rails and Solidus shop.

The order that was already won

A customer has found the lamp, put it in the basket, typed in the delivery address and chosen a delivery slot. They press "Pay". Then the page says the payment did not go through, and a few seconds later they are gone.

Every marketing report counts that person as a success. They clicked an advert, they browsed, they reached checkout. Yet no order exists, no money arrived, and nobody at the shop ever hears about it. This is the quietest leak in eCommerce, because it happens after the hardest part of selling is already done.

This chapter answers one question: how many customers want to pay, and my shop still loses the order? You will learn how a card payment is approved or declined, what the authorisation rate is and why almost no shop knows its own, which declines are final and which are not, what a false decline is, and what a shop can actually change: strong authentication done properly, retries within the card networks' rules, saved cards that stay valid, the right second way to pay, error messages that keep the customer, and a basket that survives the failure. Then you will find the leak in your own data, with SQL against a Solidus database and a small Rails subscriber that records every attempt, and you will put a number on it.

It builds on the map of quiet leaks in the first chapter of this series, which ranks this leak among the others. Where this chapter mentions conversion before the payment step, the chapter on the eCommerce funnel covers it. This chapter starts at the moment the customer has decided.

Example: Priya's 170 missing orders

The example for the whole series is Wrenfield Home, an online homeware shop in Leeds (wrenfieldhome.example) run by Priya, with Callum as her developer and data engineer. It sells about 1,400 products, has 110,000 sessions and 1,980 orders a month at an average order value of £72 including VAT. Each order leaves a contribution of £19.86 before marketing, worked out line by line in the chapter on contribution margin per order. The shop runs on Ruby on Rails and Solidus with PostgreSQL, and takes cards and wallets through Stripe and PayPal.

In June, 2,150 checkouts reached the payment step. 1,980 of them ended in an order. That is 92.1%, and Priya had never seen the figure before Callum worked it out. The other 170 checkouts ended without an order, although the customer had already chosen what to buy, where to send it and how to pay.

Of those 170, Callum's analysis later in this chapter shows that 40 were declines the shop could never have turned round: suspected fraud, no money on the card, a card that was simply invalid. The other 130 were recoverable: soft declines from the customer's bank, authentication steps that were abandoned or failed, and technical errors. With the fixes described below, Wrenfield Home recovers 40% of those 130, which is 52 orders a month. At £19.86 each, that is worth £12,393 a year in contribution. Every figure here is the invented example's, and the rest of the chapter shows where each one comes from.

What happens in the two seconds after "Pay"

To fix a decline you need to know who said no. A card payment online passes through five parties, and only one of them is the shop.

  1. The shop collects the card details (or, more often today, lets the payment provider's form collect them) and asks for the money.
  2. The payment provider, Stripe in the example, packages the request and sends it on. Its form also runs the authentication step when one is needed.
  3. The acquirer is the bank or licensed firm that accepts card payments on the shop's behalf and settles the money into the shop's account. With a provider like Stripe the shop rarely sees it as a separate party.
  4. The card network, Visa, Mastercard or American Express, carries the message between the acquirer and the bank that issued the card, and sets the rules all parties follow.
  5. The issuer is the customer's own bank. It decides. It looks at the card, the account balance, the customer's habits, the shop, the amount and the data that came with the request, and answers yes or no in well under a second.

The answer is called an authorisation. An approved authorisation reserves the money on the customer's card. Taking the money is a second step called capture, which Solidus can do at once or later, for example when the parcel ships. A decline comes back with a reason code, and that code is the most useful piece of data in this chapter.

Before the issuer decides, it may ask the customer to prove they are the cardholder: a confirmation in the banking app, a code by text message, a fingerprint. That step is 3D Secure, the card networks' authentication protocol, and in the UK and the European Economic Area (EEA) it is how strong customer authentication is usually done for cards. If the issuer is satisfied from the data alone, the customer never sees a thing. That is called the frictionless flow. If the issuer wants proof, the customer gets a challenge.

Example: one £72 order on its way to the bank

Priya's customer in Bristol orders a table lamp and two cushions for £72 and pays with a debit card. Callum's Solidus checkout hands the payment to Stripe's form on the payment step. Stripe sends the request through its acquiring side to Visa, and Visa routes it to the customer's bank.

The bank looks at the request. The card is a year old, the customer has bought online many times, the billing postcode matches, and the amount is ordinary. It approves without a challenge. Stripe tells Solidus, the payment moves to completed, and the order is placed. The whole journey took about two seconds.

Change one detail and the result changes. If the same customer had moved house and typed the old billing postcode, the bank might have asked for a challenge in the app. If they were on a train with no signal, the challenge would time out. Nothing would be wrong with the card, the customer or the shop, and the order would still be lost.

Tap or click to open full screen and move around

The authorisation rate, and why almost no shop knows its own

The authorisation rate is the share of payment attempts the issuers approve. It sounds like a number every shop would watch. Almost none do, for three reasons.

First, the shop's own reports start at the order. A checkout that ended in a decline never becomes an order, so it never appears in the sales report, the analytics revenue or the accounting. Second, the payment provider shows the number, but it sits in a dashboard the owner rarely opens, and it counts attempts, not customers. Third, it is easy to measure the wrong thing, because one customer can make several attempts.

That last point matters, so it is worth two definitions.

A=napprovednattemptsA = \frac{n_{\text{approved}}}{n_{\text{attempts}}}

AA is the authorisation rate, napprovedn_{\text{approved}} is the number of payment attempts the issuers approved, and nattemptsn_{\text{attempts}} is the number of attempts sent to the issuers. This is the provider's view. It tells you how the banks treat your payments. Foundations: ratios and rates explains ratios like this one from scratch.

S=nordersncheckoutsS = \frac{n_{\text{orders}}}{n_{\text{checkouts}}}

SS is the payment success rate of the checkout, nordersn_{\text{orders}} is the number of checkouts that ended in an order, and ncheckoutsn_{\text{checkouts}} is the number of checkouts that reached the payment step. This is the customer's view, and it is the one that pays the bills. The same Foundations section on ratios and rates covers it.

The two rates move differently. If a customer is declined twice and succeeds on the third try, the authorisation rate counts two failures and the checkout counts a success. A shop that only looks at AA panics about declines that cost nothing. A shop that only looks at SS misses that customers are fighting their way through.

Example: two rates for the same month

In June, Wrenfield Home's 2,150 checkouts at the payment step produced 2,390 payment attempts, because some customers tried a second card or tried the same card again. This attempt count is an invented figure for the example. The issuers approved 1,980 attempts, one for each order.

A=1,9802,390=0.828A = \frac{1{,}980}{2{,}390} = 0.828

So A=82.8%A = 82.8\% of attempts were approved. That looks alarming.

S=1,9802,150=0.921S = \frac{1{,}980}{2{,}150} = 0.921

So S=92.1%S = 92.1\% of checkouts ended in an order. That looks reassuring. Both are true. The 240 extra attempts (2,390−2,1502{,}390 - 2{,}150) are customers who were declined and tried again, and many of them succeeded. The 170 checkouts that never became orders (2,150−1,9802{,}150 - 1{,}980) are the leak. From here on, this chapter counts checkouts, because a lost checkout is a lost order.

Hard declines, soft declines and the ones in between

When an issuer says no, it sends a reason. Card networks use short numeric codes, and payment providers translate them into readable ones. Stripe returns a decline code such as insufficient_funds or do_not_honor, the raw network decline code, and an advice code that tells the shop what to do next: do_not_try_again, try_again_later or confirm_card_data.1 Mastercard calls its advice codes Merchant Advice Codes.

Declines fall into two broad families.

  • Hard declines will not change if you ask again. The card is reported lost or stolen, the account is closed, the card number is invalid, the issuer suspects fraud. Retrying is pointless and, as a later section shows, can cost money.
  • Soft declines might change. The bank could not be reached, the issuer wants authentication first, the attempt tripped a temporary limit, or the bank declined for a reason it does not share. A second attempt, a different moment or a different method can succeed.

The trouble is the large middle. Stripe's own documentation notes that issuers categorise most declines as generic, so the exact reason stays unclear, and that issuers discuss the specifics only with their own cardholders.2 generic_decline and do_not_honor cover everything from real fraud to a bank's model being nervous about a shop it has not seen before.

Decline code (Stripe)What it meansFamilyWhat the shop can do
insufficient_fundsNot enough money or credit on the cardHard for this attemptOffer another way to pay, such as PayPal or pay later
fraudulent, stolen_card, lost_cardSuspected fraud, or a card reported stolen or lostHardShow the same message as a generic decline, nothing more
incorrect_number, incorrect_cvc, expired_cardThe details typed in do not matchFixable by the customerAsk them to check the details or use another card
generic_decline, do_not_honorDeclined, reason not sharedUsually softClear message, a second way to pay, better data next time
authentication_requiredThe issuer wants strong authenticationSoftRun the 3D Secure step and let the customer finish it
issuer_not_available, processing_errorThe bank or a system could not be reachedSoftTry once more, then ask the customer

The table follows Stripe's published list of decline codes and its next steps for each.1 Other providers use their own names for the same network codes, and the logic carries over.

Example: Wrenfield Home's 170 failures by reason

Callum groups the 170 checkouts that ended without an order by the last reason recorded for each. All counts are the example's.

  • Hard, 40: 14 suspected fraud or cards reported lost or stolen, 16 insufficient funds, 10 card details that were wrong and never corrected.
  • Soft declines from the issuer, 62: mostly generic_decline and do_not_honor, a few try_again_later.
  • Authentication, 48: 31 customers abandoned the 3D Secure challenge, 17 failed it.
  • Technical, 20: 12 timeouts between the shop and the provider, 8 issuer_not_available or processing_error.

The 40 hard declines are 23.5% of the failures (40÷17040 \div 170). The 130 in the other three groups are 76.5%. That split is the first surprise for most owners: three quarters of the lost checkouts were not the customer's card being bad.

Invented example for Wrenfield Home. Of 170 checkouts that reached the payment step but ended without an order, 62 were soft declines from the issuer, 48 were 3D Secure challenges abandoned or failed, 20 were technical errors, 16 were insufficient funds, 14 were suspected fraud or lost and stolen cards, and 10 were card details never corrected. The first three groups, 130 checkouts, are recoverable. Tap or click to open full screen and move around

False declines: the good customer the bank turned away

A false decline is a payment the issuer declined although the customer was the genuine cardholder with every intention of paying. From the issuer's side it looked risky. From the shop's side it was a sale.

Issuers are cautious for a reason. In the 2025 report on payment fraud by the European Banking Authority (EBA) and the European Central Bank (ECB), remote card payments made up around 83% of all card fraud in the EEA in 2024, although they were only around 28% of the value of card transactions. The fraud rate for remote card payments was 0.091% of value, against 0.007% at the till.3 In the UK, UK Finance reported that remote purchase fraud cases rose by 22% in 2024 to nearly 2.6 million, with losses of just under £400 million.4 A bank that sees those numbers tunes its models to say no when in doubt, and online shops pay for that doubt in declined good customers.

How many declines are false? Nobody publishes an independent, measured answer. Issuers do not reveal it, and the figures that circulate come mostly from vendors selling fraud tools, which makes them marketing, not measurement. I leave them out. What is published is what customers say: in Baymard Institute's survey of reasons for abandoning a checkout, 10% of those who abandoned named a declined card.5 That is a share of abandoners, not of payments, but it tells you the problem is common enough for shoppers to remember it.

The honest approach is to estimate your own false declines from your own data, using signals that a declined customer was probably genuine.

Example: were the 62 soft declines good customers?

Callum takes the 62 checkouts that ended in a soft decline and checks three signals in the Solidus database for each: did the same customer account or email have an earlier paid order, did the delivery address match an earlier delivered order, and did the customer come back and pay within seven days? All counts below are invented for the example.

  • 44 of the 62 belonged to customers with at least one earlier paid order at the same address.
  • 19 of those 44 came back within seven days and paid, often with PayPal.
  • 25 of those 44 never came back.

44 out of 62 is 71% of the soft declines coming from people the shop already knew and had already been paid by. These are not fraudsters. They are regular customers whose bank hesitated. The 25 who never came back are the clearest picture of a false decline the shop can get, and they are worth more than an average new customer, because they had already bought before.

This does not prove that every soft decline was false. It shows where to look, and it gives Priya a reason to care: the leak is mostly her best customers.

Strong customer authentication and 3D Secure, done right

Strong customer authentication is the legal requirement that a payer proves who they are with two independent things: something they know (a PIN or password), something they have (a phone or card) or something they are (a fingerprint or face). In the UK, regulation 100 of the Payment Services Regulations 2017 requires the payment service provider to apply it when a payer initiates an electronic payment, and to link the authentication dynamically to the amount and the payee for remote payments.6 The detailed rules, including the exemptions, sit in the Financial Conduct Authority's (FCA) technical standards on strong customer authentication, which the FCA has amended since Brexit, most recently by an instrument in force from 19 March 2026.7 This chapter is general information about how these rules affect a shop, not legal advice.

Notice who the law addresses: the payment service providers, mostly the issuer. The shop does not authenticate anyone. What the shop controls is how well its checkout carries the authentication step, and how much data it sends so the issuer can decide without a challenge.

Exemptions: when the issuer may skip the challenge

The rules allow some payments without strong authentication. Two matter most for a shop.

  • Low value. Stripe's documentation gives the UK limit as under £25 a payment, but the issuer may still ask once the payments since the last authentication exceed £85 in total or number five.8
  • Transaction risk analysis. The payment provider or issuer may exempt a payment it judges low risk in real time, if its own fraud rate stays below set thresholds. Stripe lists 0.13% for payments up to £85, 0.06% up to £220 and 0.01% up to £440, and says UK merchants currently have access to this exemption up to £220.8

Two warnings come with exemptions. The issuer can always refuse the exemption and ask for authentication anyway, so the checkout must be able to run the challenge every time. And when an exemption is granted, the shop loses the liability shift: a payment authenticated with 3D Secure that is later disputed as fraud usually becomes the issuer's problem, an exempted one stays the shop's.9 Exemptions trade a smoother checkout for a little more fraud risk. For a shop with low fraud and ordinary baskets, that trade is usually worth it.

Why customers abandon the challenge

3D Secure in its current version supports the frictionless flow, where the issuer decides from data alone, and the challenge flow, where the customer must act.10 The challenge is where checkouts die. The customer has to leave the page, open the banking app, find the notification, confirm, and come back. Every step is a chance to lose them: the app is not installed on this phone, the notification never arrives, the session times out, the challenge opens in a small window a phone browser hides, or the customer simply does not understand what is happening.

What the shop can change:

  • Send rich data. The more the issuer knows, the more often it decides without a challenge. Full billing address, email, phone number and the customer's account history all help. Stripe's form sends device data on its own, and the shop's job is to pass the rest.
  • Let the provider request exemptions. With Stripe, the provider requests applicable exemptions on the shop's behalf. Check that it is switched on and that your fraud settings do not force a challenge on every payment.
  • Keep the challenge inside the checkout. Use the provider's current form, which shows the challenge in the page, not a pop up a phone blocks.
  • Explain it in one line. "Your bank may ask you to confirm this payment in its app" before the button turns surprise into a routine step.
  • Offer wallets. With Apple Pay, for example, the customer authorises the payment on their own device with biometrics or the device passcode, as Apple's security guide describes,11 which is usually quicker than a bank challenge.

Example: the 48 failed authentications

Of Wrenfield Home's 48 checkouts lost at authentication, 31 were abandoned challenges and 17 failed ones. Callum checks the setup and finds three problems, all invented for the example: the checkout did not pass the customer's phone number to Stripe, a custom fraud rule asked for 3D Secure on every payment above £50, and the payment step showed no word about the bank's app.

The average order of £72 is above the £25 low value limit, so that exemption rarely applies. It is well below the £220 limit for transaction risk analysis, so most of Priya's orders are candidates for an exemption, if the custom rule stops forcing a challenge. Callum removes the rule, passes the phone number and the full billing address, and Priya adds one line of copy above the button.

The result after the change: 19 of the 48 lost checkouts are recovered each month. Some because the issuer no longer challenges, some because customers now finish the challenge. That is a recovery of 19÷48=39.6%19 \div 48 = 39.6\% in this group.

Retrying a soft decline without breaking the network rules

The obvious fix for a soft decline is to try again. The card networks know this, and they limit it, because a stream of retries on the same card looks like a fraudster testing numbers.

The rules differ by network and change from time to time, so the safest source is your payment provider. PayPal's guide for merchants, dated May 2026, summarises them like this: Visa groups its decline codes into four categories and allows no retries at all after a category 1 decline, the kind where the issuer will never approve, and up to 20 retries in 30 days after the softer categories. Mastercard bars further attempts on the same card after certain hard decline codes, is introducing a fee after 10 retries in 24 hours on soft declines, and charges a fee when a merchant retries after a decline that came with Merchant Advice Code 03 or 21.12 Stripe, more cautious, recommends no more than eight retries for charges that permit retries at all, and warns that issuers may read extra retries as possible fraud, which can raise declines for legitimate charges too.2

For a checkout, where the customer is present, these limits are rarely the problem. The problem is retrying the wrong declines. The rule of thumb:

  • Never retry when the advice code says do_not_try_again, or the code is a hard one. Offer another way to pay.
  • Retry once, automatically, only for technical failures: a timeout, issuer_not_available, processing_error. Wait a moment first.
  • Ask the customer for everything else: check the details, finish the authentication, or choose another method.

One technical detail protects the customer's money. When a request to the provider times out, the shop does not know whether the payment went through. Sending it again could charge the customer twice. Stripe solves this with idempotency keys: the shop sends a unique key with each request, and if it repeats the request with the same key, Stripe returns the result of the first one instead of performing the operation again.13 Any server side retry must reuse the key.

Example: Callum's decline policy, test first

Callum writes the rule as a small Ruby object, and because I work test first, the tests come before the code. They pin the three behaviours that matter most.

# spec/services/decline_policy_spec.rb
require "rails_helper"

RSpec.describe DeclinePolicy do
  it "never retries a card the issuer marked do not try again" do
    result = described_class.for(decline_code: "do_not_honor", advice_code: "do_not_try_again")
    expect(result.action).to eq(:offer_other_method)
  end

  it "never tells the customer that a card was reported stolen" do
    result = described_class.for(decline_code: "stolen_card", advice_code: nil)
    expect(result.message_key).to eq(:generic)
  end

  it "retries an unreachable issuer exactly once" do
    result = described_class.for(decline_code: "issuer_not_available", advice_code: "try_again_later")
    expect(result.action).to eq(:retry_once)
  end

  it "asks the customer to check a mistyped card number" do
    result = described_class.for(decline_code: "incorrect_number", advice_code: "confirm_card_data")
    expect(result.action).to eq(:ask_to_check)
  end
end

Then the code that makes them pass. Data.define creates a small immutable value object and needs Ruby 3.2 or later, which Rails 8 requires anyway.

# app/services/decline_policy.rb
class DeclinePolicy
  Result = Data.define(:action, :message_key)

  # Codes whose real reason must never be shown to the customer
  CONCEAL = %w[fraudulent stolen_card lost_card pickup_card merchant_blacklist].freeze
  # Temporary failures where one automatic retry is reasonable
  RETRY_ONCE = %w[issuer_not_available processing_error reenter_transaction].freeze
  # Details the customer can correct
  CHECK_DETAILS = %w[incorrect_number incorrect_cvc invalid_expiry_month
                     invalid_expiry_year incorrect_zip expired_card].freeze

  def self.for(decline_code:, advice_code:)
    if advice_code == "do_not_try_again" || CONCEAL.include?(decline_code)
      Result.new(action: :offer_other_method, message_key: :generic)
    elsif RETRY_ONCE.include?(decline_code)
      Result.new(action: :retry_once, message_key: :bank_busy)
    elsif advice_code == "confirm_card_data" || CHECK_DETAILS.include?(decline_code)
      Result.new(action: :ask_to_check, message_key: :check_details)
    else
      Result.new(action: :offer_other_method, message_key: :generic)
    end
  end
end

The order of the branches is deliberate. The concealment check comes first, so a stolen card can never fall through to a branch with a more specific message. Everything unknown ends in the safest place: a clear generic message and a second way to pay. Callum's change for the 20 technical failures is one automatic retry for the temporary codes, with the same idempotency key on any server side request, plus a longer timeout on the shop's side. It recovers 8 of the 20 a month, 40% of the group.

Tap or click to open full screen and move around

Saved cards that stay valid: network tokens

Returning customers often pay with a card saved in their account. Saved cards decline for a reason that has nothing to do with money: the card was replaced. It expired, or the bank reissued it after a fraud scare, and the stored number and expiry date are no longer valid.

Network tokens address this. Instead of storing the card number, the provider stores a token issued by the card network for this shop, and the network keeps it current when the underlying card changes. Stripe describes network tokens as working with Visa, Mastercard and American Express to replace card numbers for online payments, and keeping them current even when the card data changes.14 Card account updater services, run by the networks, do a similar job for stored card numbers. For one off purchases the effect is modest. For subscriptions it is large, and the later chapter on expired cards and failed renewals goes into it in depth. Moving saved cards between providers without losing them is covered in the article on migrating payment tokens and saved cards, and what card storage means for your compliance scope in the article on PCI DSS.

Example: nine saved cards that had been replaced

Among the 62 soft declines, Callum finds 9 payments with a saved card whose stored expiry date had already passed or whose bank had reissued the card. The customer saw "declined" and had no idea why. All counts are the example's.

Stripe's network tokens and card account updater are available on Priya's account, but saved cards were collected years ago through an old integration. Callum checks that new cards are saved through the current Payment Intents flow, and adds one change to the checkout: when a saved card declines, the payment step opens the card form straight away with the message "Your saved card may have been replaced by your bank. Add the new one and it will be saved for next time." Most of these nine customers simply add the new card.

A second way to pay, offered at the right moment

Some declines cannot be rescued on the same card. Insufficient funds is the clearest case. Stripe's own advice for that decline is to consider offering a buy now, pay later option.2 The same is true for an unclear soft decline: the customer may have a second card, a PayPal account or a wallet on their phone that their bank treats differently.

The leak here is often a design one. The checkout shows the decline, and the customer has to find the other methods themselves, often by going back a step. A better checkout shows the alternatives right inside the error, with the basket and the address kept. For a UK shop that usually means cards, Apple Pay and Google Pay, PayPal and, where the margin allows its fees, a pay later option such as Klarna. Each method has its own fees, which the later chapter on payment fees and payouts weighs against the orders it wins.

Example: the second way to pay recovers soft declines

After Callum's change, a soft decline at Wrenfield Home shows the message, keeps the basket and the address, and puts PayPal and the wallet buttons directly underneath. Together with the richer data and the help for replaced saved cards, the soft decline group improves: of the 62 soft declines a month, 25 now end in an order, a recovery of 25÷62=40.3%25 \div 62 = 40.3\%. These counts are the example's.

The 16 customers with insufficient funds are counted as hard declines and stay out of the recovery figure, although some of them now pay with PayPal or pay later. Any of those orders are a bonus on top of the £12,393, not part of it.

Error messages that keep the customer

A decline message has two readers: the customer, who wants to know what to do, and a possible fraudster, who wants to know what worked. Stripe's guidance settles the conflict: for fraudulent, stolen_card and lost_card, do not report the specific reason, and present it like a generic decline.1 For everything the customer can fix, be specific.

Good decline copy follows the style rules for any error: say what happened, say what to do next, never blame. It also says the one thing an anxious customer wants to know, which is whether money has left their account.

SituationMessage on the payment step
Generic, fraud or unknown"Your bank didn't approve this payment, so nothing has been taken. Your basket is saved. You can try another card, PayPal or Apple Pay."
Details to check"The card number, expiry date or security code doesn't match. Please check them and try again."
Bank not reachable"Your bank didn't answer in time. Trying once more now."
Authentication not finished"Your bank needs you to confirm this payment in its app. Your basket is saved, so you can confirm and carry on."

Example: the old message and the new one

Before the change, every decline at Wrenfield Home showed the same text from the payment form's default: "Your card was declined." No word on what happened to the money, no hint of another method, and on a phone the payment buttons were above the message and out of sight.

The new messages above replaced it. Priya reads each one aloud before it goes live, which is the simplest test of whether it sounds like a person. The message for the generic case does most of the work, because generic declines are the largest group.

Keep the basket when the payment fails

A failed payment should never cost the customer their basket, their address or their delivery choice. In Solidus it does not by default: the order stays in the payment state of the checkout, with its line items and addresses, and the customer can try again. The default checkout flow goes through address, delivery, payment and confirm, and the payment step only appears when a payment is required.15

Where baskets get lost is in customisations: a custom front end that clears the session on error, a checkout that redirects to the basket page after a failure, or a guest checkout that does not keep the order when the customer leaves and comes back. The test is simple. Decline a payment on purpose in staging, then close the tab and come back from the same device. If the basket, address and delivery choice are not all still there, that is part of the leak.

Example: what Callum found in staging

Callum runs the test with Stripe's test cards, which return specific declines on purpose, such as 4000000000000002 for a generic decline and 4000000000009995 for insufficient funds.16 On desktop everything survives. On the shop's mobile layout, a failed payment sends the customer back to the basket page, and the delivery slot has to be chosen again. It is a small thing, invented for the example, and it explains part of why the soft decline group lost so many customers on phones. He fixes it in the same release.

Finding the leak in your own data

You can measure all of this with three sources: the payment provider's reports, the shop's own database, and a small table that records every attempt.

The payment provider's reports

Stripe shows declines and their reasons in its Dashboard, and suggests excluding repeat attempts by looking at the card's fingerprint rather than the charge, because one customer can make several attempts.2 PayPal shows declined and abandoned payments in its activity reports. These views are good for the reasons behind declines. They are poor for the checkout view, because the provider does not know which attempts belonged to the same checkout or which customer finally paid by another method.

The Solidus database: how many checkouts reach the payment step

Solidus records every state change of an order in the spree_state_changes table, with the previous and the next state.17 An order that moved into the payment state reached the payment step. An order with a completed_at date became an order. That gives the checkout success rate SS directly.

-- PostgreSQL. Checkouts that reached the payment step in June 2026,
-- and how many of them became an order.
WITH reached_payment AS (
  SELECT DISTINCT sc.stateful_id AS order_id
  FROM spree_state_changes sc
  WHERE sc.stateful_type = 'Spree::Order'
    AND sc.next_state = 'payment'
    AND sc.created_at >= '2026-06-01'
    AND sc.created_at <  '2026-07-01'
)
SELECT
  count(*) AS checkouts_at_payment,
  count(*) FILTER (WHERE o.completed_at IS NOT NULL) AS orders,
  round(100.0 * count(*) FILTER (WHERE o.completed_at IS NOT NULL) / count(*), 1) AS success_pct
FROM reached_payment rp
JOIN spree_orders o ON o.id = rp.order_id
WHERE o.email NOT ILIKE '%@wrenfieldhome.example';  -- leave out staff test orders
checkouts_at_paymentorderssuccess_pct
2150198092.1

The filter on the email removes the shop's own test and staff orders, about 40 a year in the example's data, which would otherwise count as checkouts. An order that reached payment in June and completed in early July still counts as an order, which is what you want.

The Solidus database: what happened to each payment

The spree_payments table holds one row per payment with a state. A payment starts in checkout and can move to processing, pending, completed, failed, void or invalid.18 With the official Stripe extension, solidus_stripe, the payment's response_code holds the ID of the Stripe PaymentIntent, and a failed payment intent webhook marks the Solidus payment as failed.19

-- PostgreSQL. Payment states by payment method, June 2026.
SELECT pm.name AS payment_method, p.state, count(*) AS payments
FROM spree_payments p
JOIN spree_payment_methods pm ON pm.id = p.payment_method_id
WHERE p.created_at >= '2026-06-01' AND p.created_at < '2026-07-01'
GROUP BY pm.name, p.state
ORDER BY pm.name, p.state;

This shows how many payments failed per method. It does not show why. The webhook that marks a payment as failed fires once per payment, and the Solidus log entry it writes does not keep the decline code. One PaymentIntent can also hold several attempts. For the reasons, you need every attempt.

Recording every attempt

Callum adds a table for payment attempts and fills it from Stripe's webhooks. The solidus_stripe extension publishes each Stripe webhook it is configured for on Solidus's event bus, with the original Stripe name prefixed by stripe., and lets the shop add its own subscribers.19 The charge object Stripe sends carries the outcome of each attempt: the network status, the type (authorized, issuer_declined, blocked and so on), the reason, the advice code, the network's own decline code, and the card's brand, country and funding type.20

# db/migrate/20260702090000_create_payment_attempts.rb
class CreatePaymentAttempts < ActiveRecord::Migration[8.0]
  def change
    create_table :payment_attempts do |t|
      t.integer  :order_id, index: true
      t.string   :stripe_charge_id, null: false, index: { unique: true }
      t.string   :stripe_payment_intent_id, index: true
      t.string   :status, null: false          # succeeded or failed
      t.string   :outcome_type                 # authorized, issuer_declined, blocked, invalid
      t.string   :network_status
      t.string   :decline_code                 # outcome.reason, for example do_not_honor
      t.string   :advice_code                  # do_not_try_again, try_again_later, confirm_card_data
      t.string   :network_decline_code
      t.string   :card_brand
      t.string   :card_country, limit: 2
      t.string   :card_funding
      t.integer  :amount_minor, null: false
      t.string   :currency, limit: 3
      t.datetime :attempted_at, null: false
      t.timestamps
    end
    add_foreign_key :payment_attempts, :spree_orders, column: :order_id
  end
end
# config/initializers/solidus_stripe.rb
SolidusStripe.configure do |config|
  # Also register these events in the Stripe Dashboard webhook settings
  config.webhook_events = %i[charge.succeeded charge.failed]
end

Rails.application.config.to_prepare do
  PaymentAttemptSubscriber.new.subscribe_to(Spree::Bus)
end
# app/subscribers/payment_attempt_subscriber.rb
class PaymentAttemptSubscriber
  include Omnes::Subscriber

  handle :"stripe.charge.succeeded", with: :record
  handle :"stripe.charge.failed", with: :record

  def record(event)
    charge = event.data.object
    card = charge.payment_method_details&.card
    intent = SolidusStripe::PaymentIntent.find_by(stripe_intent_id: charge.payment_intent)

    PaymentAttempt.find_or_create_by!(stripe_charge_id: charge.id) do |attempt|
      attempt.order_id = intent&.order_id
      attempt.stripe_payment_intent_id = charge.payment_intent
      attempt.status = charge.status
      attempt.outcome_type = charge.outcome&.type
      attempt.network_status = charge.outcome&.network_status
      attempt.decline_code = charge.outcome&.reason
      attempt.advice_code = charge.outcome&.advice_code
      attempt.network_decline_code = charge.outcome&.network_decline_code
      attempt.card_brand = card&.brand
      attempt.card_country = card&.country
      attempt.card_funding = card&.funding
      attempt.amount_minor = charge.amount
      attempt.currency = charge.currency
      attempt.attempted_at = Time.zone.at(charge.created)
    end
  end
end

Three details deserve a word. find_or_create_by! on the unique charge ID makes the subscriber safe when Stripe sends the same webhook twice, which webhooks are allowed to do. The amount stays in minor units, pence, exactly as Stripe sends it, so no rounding creeps in. And the table holds no card number, no name and no address: the brand, country and funding type are enough to analyse declines.

That last point is also the law. The attempts are linked to orders, so they are personal data under the UK General Data Protection Regulation (UK GDPR), and its data minimisation principle asks that you hold only what is adequate, relevant and limited to the purpose.21 The Information Commission (formerly the Information Commissioner's Office, ICO) explains the principle in its guidance.22 Keep the table to these columns, mention payment analysis in your privacy notice, and delete attempts on the same schedule as the orders they belong to.

Reading the attempts

With a month of attempts recorded, two queries answer most questions. The first compares approval by card country, because cards issued abroad often decline more.

-- PostgreSQL. Approval of payment attempts by card origin, June 2026.
SELECT
  CASE
    WHEN card_country IS NULL THEN 'Unknown'
    WHEN card_country = 'GB'  THEN 'UK card'
    ELSE 'Card issued abroad'
  END AS card_origin,
  count(*) AS attempts,
  count(*) FILTER (WHERE status = 'succeeded') AS approved,
  round(100.0 * count(*) FILTER (WHERE status = 'succeeded') / count(*), 1) AS approval_pct
FROM payment_attempts
WHERE attempted_at >= '2026-06-01' AND attempted_at < '2026-07-01'
GROUP BY 1
ORDER BY attempts DESC;

The second lists the reasons, so you can see which group to work on first.

-- PostgreSQL. Failed attempts by reason and advice, June 2026.
SELECT coalesce(decline_code, outcome_type) AS reason,
       advice_code,
       count(*) AS failed_attempts
FROM payment_attempts
WHERE status = 'failed'
  AND attempted_at >= '2026-06-01' AND attempted_at < '2026-07-01'
GROUP BY 1, 2
ORDER BY failed_attempts DESC;

To get back from attempts to checkouts, join on order_id and keep the last attempt per order. That is how Callum produced the 170 failures by reason earlier in this chapter. Timeouts that never reached Stripe will not appear in the webhooks, so the shop's own error log fills that gap.

Example: the payment step by method and card origin

Callum combines both views for June, using the last method each checkout tried. All figures are the example's.

Method at the last attemptCheckouts at paymentOrdersSuccess rate
Card issued in the UK1,4801,37092.6%
Card issued abroad15011878.7%
Apple Pay or Google Pay21020396.7%
PayPal31028993.2%
Total2,1501,98092.1%

Two things stand out. Wallets succeed most often, which fits the earlier point that they authenticate on the customer's own device. And cards issued abroad, only 150 checkouts, lose more than one in five. That is too small a group to chase first, and a good one to watch: if Priya starts advertising abroad, it will grow.

Putting a number on the leak

Now the maths, which is short. The recovered orders are the sum, over the recoverable groups, of each group's size times the share the fixes recover.

Δn=∑grg ng\Delta n = \sum_{g} r_g \, n_g

Δn\Delta n is the number of orders recovered each month, gg runs over the recoverable groups (soft declines, authentication, technical errors), ngn_g is the number of lost checkouts in group gg, and rgr_g is the share of that group the fixes recover. Each rgr_g is an expected share, an average over many months, which Foundations: expected value explains. The yearly value in contribution is then:

V=12 Δn cV = 12 \, \Delta n \, c

VV is the yearly value, 1212 is the months in a year, and cc is the contribution per order before marketing. Contribution is the right measure, not revenue, because a recovered order still costs the goods, the fees and the delivery. Planning on the expected value is right here because the fixes run every month, so the good and the bad months average out.

Example: 52 orders and £12,393 a year

The three groups and the share recovered, from the sections above:

Δn=0.403×62+0.396×48+0.400×20=25+19+8=52\Delta n = 0.403 \times 62 + 0.396 \times 48 + 0.400 \times 20 = 25 + 19 + 8 = 52

Each product is rounded to whole orders, because a shop cannot recover a fraction of one. Δn=52\Delta n = 52 of the 130 recoverable checkouts is exactly 40%. The yearly value:

V=12×52×19.86=12,392.64V = 12 \times 52 \times 19.86 = 12{,}392.64

That is about £12,393 a year in contribution, or £1,032.72 a month. In revenue, the same 52 orders are worth 52×72=3,74452 \times 72 = 3{,}744 pounds a month, or £44,928 a year, which is the figure a marketing report would quote. Contribution is the honest one.

The payment step improves from 1,980 orders out of 2,150 checkouts to 2,032 out of 2,150:

Safter=2,0322,150=0.945S_{\text{after}} = \frac{2{,}032}{2{,}150} = 0.945

So SS rises from 92.1% to Safter=94.5%S_{\text{after}} = 94.5\%, and the lost checkouts fall from 170 to 118 a month.

Invented example for Wrenfield Home. The shop starts at 1,980 orders a month. Better data, a second way to pay and help with replaced saved cards recover 25 soft declines. Removing a forced challenge and explaining the bank step recover 19 failed authentications. One safe retry for technical errors recovers 8. The total is 2,032 orders a month, 52 more, worth 12,393 pounds a year in contribution. Tap or click to open full screen and move around

Is the improvement real, or just a good month?

A rise from 92.1% to 94.5% could be luck. One month of 2,150 checkouts is a sample, and a sample's rate wobbles. A confidence interval says how much. For a rate pp measured on nn checkouts, the approximate 95% interval is:

p±1.96p (1−p)np \pm 1.96 \sqrt{\frac{p\,(1-p)}{n}}

pp is the measured success rate, nn is the number of checkouts it was measured on, 1.961.96 is the multiplier for 95% confidence, and the square root is the standard error, the typical wobble of a rate measured on nn cases. Foundations: confidence intervals explains where this comes from and when the approximation is good enough. With thousands of checkouts and rates away from 0% and 100%, it is.

Example: June against September

Before the fixes, p=0.921p = 0.921 and n=2,150n = 2{,}150:

1.960.921×0.0792,150=1.96×0.0058=0.0111.96 \sqrt{\frac{0.921 \times 0.079}{2{,}150}} = 1.96 \times 0.0058 = 0.011

So June's true rate lies roughly between 90.9% and 93.2%. After the fixes, in September, p=0.945p = 0.945 on the same number of checkouts:

1.960.945×0.0552,150=1.96×0.0049=0.0101.96 \sqrt{\frac{0.945 \times 0.055}{2{,}150}} = 1.96 \times 0.0049 = 0.010

So between about 93.5% and 95.5%. For the difference of 2.4 points, the standard errors combine as 0.00582+0.00492=0.0076\sqrt{0.0058^2 + 0.0049^2} = 0.0076, and the 95% interval for the improvement runs from about 0.9 to 3.9 points. It does not include zero, so the improvement is very unlikely to be luck.

The same maths carries a warning for the small groups. The 150 checkouts with cards issued abroad give an interval of about plus or minus 6.5 points around 78.7%. A change of a few points there means nothing in a single month. Watch it over a quarter.

A check to repeat every quarter

The fixes above are mostly one off changes. The leak comes back quietly when a provider changes a default, a fraud rule is added in a hurry, or a new checkout design hides the second way to pay. A quarterly check of about half an hour keeps it closed. The later chapter on silent failures covers how to catch a sudden break within hours instead.

What to checkWhereAct whenWho
Checkout payment success rate SSThe spree_state_changes queryBelow 93%, or down more than one point on last quarterCallum
Lost checkouts by reasonThe payment_attempts reasons queryA group grows by more than 20%Callum
Approval by card origin and by methodThe card origin query and the table by methodAny method 5 points below the shop's averageCallum
Retries after do_not_try_againpayment_attempts, failed attempts per orderMore than zeroCallum
Custom fraud rules that force 3D SecureStripe Dashboard settingsAny rule nobody can explainPriya and Callum
A decline test in staging on phone and desktopStripe test cardsBasket, address or delivery lost after a declineCallum
The decline messages, read aloudThe payment stepAny message that blames, hides the next step or sounds like a machinePriya

Example: Wrenfield Home's first quarterly check

Callum shipped the fixes in July. In early October he runs the queries for July to September. The success rate sits at 94.3%, 94.6% and 94.5%, all above 93%. No group of reasons has grown. The attempts table shows two retries after do_not_try_again, both from a customer pressing the button again by hand, not from the shop's code, so no action. Priya reads the four messages aloud and changes one word. The check takes 25 minutes, and the next one is in the calendar for January.

My view

Declined payments are the leak I would fix first in most shops, for one reason: these customers have already said yes. Every other lever in eCommerce spends money to persuade someone. This one only asks the shop to stop losing the people it already persuaded.

It is also the leak where measuring is most of the work. Most owners have never seen their checkout success rate at the payment step, and the moment they do, the fixes almost choose themselves. I would not start with a new payment provider or a fraud tool. I would start with the two queries in this chapter, a table of attempts, and an honest look at the messages and the basket after a failure. Most of the recovery comes from there, and none of it needs a contract with anyone new.

Conclusion

Between "Pay" and the order, a shop passes the customer to four other parties, and any of them can say no. In the example, 170 of 2,150 checkouts at the payment step ended without an order. Only 40 of those were declines nobody could fix. The other 130 were soft declines, abandoned or failed authentication, and technical errors, and better data, exemptions that are allowed to work, one safe retry for technical failures, help for replaced saved cards, a second way to pay inside the error, kinder messages and a basket that survives recover 52 orders a month, £12,393 a year in contribution.

The method works for any shop. Measure the checkout success rate at the payment step, not only the provider's authorisation rate. Record every attempt with its reason. Group the failures into what cannot be fixed and what can. Fix the largest recoverable group first, and check the result against a confidence interval before you celebrate. Then put the half hour check in the calendar for every quarter.

I build shops on Ruby on Rails and Solidus where every payment attempt is recorded next to the order it belongs to, and the shop, its code and its data belong to the client. If you want to know how many of your own customers are lost at the very last step, that is a good first conversation.

Want to know how many of your customers are lost at the very last step, and which of them you can win back? Book the free workshop and we will measure your payment step together, and the first two weeks of work are on me.

Sources

  1. 1.

    Stripe, Decline codes, Stripe Documentation, https://docs.stripe.com/declines/codes

  2. 2.

    Stripe, Card declines (decline codes, network advice codes, advice codes and retries), Stripe Documentation, https://docs.stripe.com/declines/card

  3. 3.

    European Banking Authority and European Central Bank, 2025 Report on payment fraud, EBA/REP/2025/40, December 2025, executive summary and section on card payments, https://www.ecb.europa.eu/press/intro/publications/pdf/ecb.ebaecb202512.en.pdf

  4. 4.

    UK Finance, Annual Fraud Report 2025, press release, 28 May 2025, https://www.ukfinance.org.uk/news-and-insight/press-release/fraud-report-2025-press-release

  5. 5.

    Baymard Institute, Cart abandonment rate statistics, reasons for abandonment during checkout, 28 October 2026, https://baymard.com/lists/cart-abandonment-rate

  6. 6.

    The Payment Services Regulations 2017, regulation 100 (Authentication), legislation.gov.uk, https://www.legislation.gov.uk/uksi/2017/752/regulation/100

  7. 7.

    Financial Conduct Authority, Technical Standards (Strong Customer Authentication and Common and Secure Methods of Communication) (Amendment) Instrument 2025, FCA 2025/62, made 18 December 2025, in force 19 March 2026, https://api-handbook.fca.org.uk/files/instrument/TECHNICAL%20STANDARD/FCA%202025/62-2026-03-19.pdf

  8. 8.

    Stripe, Strong Customer Authentication (SCA) exemptions, Stripe Documentation, https://docs.stripe.com/payments/3d-secure/strong-customer-authentication-exemptions

  9. 9.

    Stripe, Strong Customer Authentication readiness, section on disputes and liability shift, Stripe Documentation, https://docs.stripe.com/strong-customer-authentication

  10. 10.

    Stripe, 3D Secure authentication flow (frictionless and challenge flows), Stripe Documentation, https://docs.stripe.com/payments/3d-secure/authentication-flow

  11. 11.

    Apple, Apple Pay component security, Apple Platform Security guide, https://support.apple.com/en-gb/guide/security/sec2561eb018/web

  12. 12.

    PayPal, How to avoid excessive retries penalties, PayPal Business Resource Center, 15 May 2026, https://www.paypal.com/us/brc/article/avoid-excessive-retries-penalties

  13. 13.

    Stripe, Idempotent requests, Stripe API Reference, https://docs.stripe.com/api/idempotent_requests

  14. 14.

    Stripe, Understanding the benefits of network tokens, Stripe Guides, https://stripe.com/gb/guides/understanding-benefits-of-network-tokens

  15. 15.

    Solidus, Spree::Order checkout flow, core/app/models/spree/order.rb, GitHub, https://github.com/solidusio/solidus/blob/main/core/app/models/spree/order.rb

  16. 16.

    Stripe, Testing (test card numbers for declines), Stripe Documentation, https://docs.stripe.com/testing

  17. 17.

    Solidus, core database schema including spree_state_changes and spree_payments, core/db/migrate/20160101010000_solidus_one_four.rb, GitHub, https://github.com/solidusio/solidus/blob/main/core/db/migrate/20160101010000_solidus_one_four.rb

  18. 18.

    Solidus, payment state machine, core/app/models/spree/core/state_machines/payment.rb, GitHub, https://github.com/solidusio/solidus/blob/main/core/app/models/spree/core/state_machines/payment.rb

  19. 19.

    Solidus, solidus_stripe README (webhooks and custom event subscribers), PaymentIntent model and payment intent webhook subscriber, GitHub, https://github.com/solidusio/solidus_stripe

  20. 20.

    Stripe, The Charge object (outcome and payment_method_details), Stripe API Reference, https://docs.stripe.com/api/charges/object

  21. 21.

    UK General Data Protection Regulation, Article 5(1)(c), legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/5

  22. 22.

    Information Commission (formerly the Information Commissioner's Office), Principle (c): Data minimisation, UK GDPR guidance, https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/data-protection-principles/a-guide-to-the-data-protection-principles/data-minimisation/