The hidden dangers of switching payment gateways, and a safe way to do it
TL;DR
Difficulty: Intermediate
- A switch moves four things: saved cards, recurring agreements, money in flight and history.
- Saved cards move only provider to provider, encrypted, to a PCI DSS Level 1 processor. Ask for network transaction IDs so customers are not asked to authenticate again.
- Direct Debit mandates move through the Bacs bulk change, which takes about six weeks and a letter to payers.
- Budget for a cash gap from slower first payouts and reserves.
- Run both providers in parallel, move subscribers in batches, and keep the old account open for six months for refunds and disputes.
Changing payment provider looks like swapping API keys, but saved cards, subscriptions, Direct Debit mandates, payouts, refunds and disputes each move on their own and break in their own way. Using an invented coffee roaster in Bristol, I walk through what the card schemes, Bacs and the FCA actually require, what each risk costs in pounds, and a plan that keeps every customer paying exactly once.
A switch moves four things, not one
Changing payment provider looks like a settings change. New API keys, a new logo on the checkout, a lower fee. Underneath, four separate things have to move, and each one breaks in its own way.
The first is stored payment details: the saved cards and bank details that let you charge a customer again without asking. The second is the agreements behind repeat payments: card subscriptions and Direct Debit mandates. The third is money in flight: takings the old provider still holds, and the new provider's rules about when it pays you. The fourth is history: refunds, disputes and webhooks that keep arriving for payments the old provider took.
A shop with no saved cards mostly worries about the last two. A subscription shop or a SaaS product worries about all four, and the first two do the real damage.
I learned this the hard way years ago, moving a subscription shop between platforms. The saved cards sat in the old platform's built in payments, there was no route to get them out, and a painful share of subscribers had to type their card in again. Most did. Some never came back. Everything below is what I now check before anyone touches a key.
Worked example: what Hollowmere Coffee has to move
Throughout I use one invented business. Hollowmere Coffee roasts in Bristol and sells at hollowmerecoffee.example. Aisha runs it. Nobody real, and every number is made up so I can show every step.
Aisha's shop has 2,200 subscribers paying £18 a month by saved card. It has 380 cafés buying wholesale beans, paying an average of £240 a month by Direct Debit. On top of that come one off orders. All card takings together average £1,600 a day.
So her four things are: 2,200 saved cards, 2,200 card subscriptions plus 380 Direct Debit mandates, about £1,600 a day of money in flight, and a few months of orders that can still be refunded or disputed. Each gets its own plan below.
Saved cards cannot simply be copied
When a customer saves a card, your shop does not keep the card number. The provider keeps it and hands you a token, a stand in reference that only that provider can turn back into a card. The token is useless anywhere else. That is the point of it, and it is why a switch is hard.
To move the cards, the old provider has to send the real card numbers to the new provider, directly, encrypted. You never see them. Stripe, for example, will only send card data to a processor that is PCI DSS Level 1 compliant (the top tier of the card industry's security standard), and asks for that processor's attestation of compliance and a PGP encryption key of at least 4,096 bits.1 Braintree asks for a PCI attestation from the receiving provider too, and allows no more than two exports: one for most customers and one for the customers created during the switchover.2
One thing never moves: the three digit security code. PCI DSS does not allow anyone to keep it once the payment it was collected for has been authorised, even encrypted, even with the customer's consent.3 You do not need it to charge a saved card, so this is fine, but it means "we'll just export everything" is never literally true.
The slow part is rarely the import. Stripe says imports usually complete within 10 business days of receiving correct data, but warns that the old processor can take anywhere from a few days to several months to produce the export.4 Some charge a fee, some want their own forms.4 And Stripe's export covers cards, emails and metadata, not payment history or subscriptions.1
Worked example: Aisha's export timeline
Aisha asks her old provider for the export on 1 September. It asks for a signed form and the new provider's attestation. The paperwork goes back and forth, and the encrypted file lands on 20 October, seven weeks later. The new provider validates it, asks her to confirm the last four digits of two cards she knows, and finishes the import on 3 November.4
What she gets back is a mapping file: each old customer ID and card ID next to its new one.4 Her shop has to update every subscriber's record with the new references before the first renewal on the new provider. If she had planned the switch for 1 October, she would have been charging nobody.
Asking every customer again is the expensive path
If the old provider will not export, or you skip the export, every subscriber has to enter their card again. Some will. Some will not, and you lose them along with everything they would have paid.
The expected loss is easy to estimate:
Here is the expected revenue lost, is the number of subscribers whose card has to move, is the share who successfully carry on, so is the share you lose, is the monthly price and is the number of months a subscriber would otherwise have stayed. It is an expected value, a probability times an amount: Foundations: expected value. How long a customer stays is the same idea as in Foundations: lifetime value.
Worked example: three paths for 2,200 subscribers
Aisha compares three paths. The shares are my own planning assumptions, not industry figures.
Path one, ask everyone again. Say 70% enter their card, so . With , and months: . That is £95,040 of expected revenue gone.
Path two, import the cards but without proof of earlier authentication (more on that below). Say 15% of cards get an authentication request on the first renewal and 30% of those customers never complete it. That is lost: , so £14,256.
Path three, import the cards with that proof and move subscribers in batches. Say 1% are lost to stubborn declines: , so £3,168.
Each bar is one migration path. The height is the expected revenue lost over eight months, in pounds. The takeaway is the gap: asking everyone again costs roughly 30 times more than a careful import, which is why a provider's export process belongs in the decision before you sign, not after.
A new account looks like a stranger to the banks
Even a perfect import does not make the cards behave as before. Your new provider gives you a new merchant identifier. Card issuers have never seen it charge these cards, so some will decline at first. Stripe warns of a temporary rise in declines after a migration for exactly this reason, and recommends ramping up volume rather than switching everything at once: customer initiated and one off payments before recurring ones, domestic cards before international.4
That turns the switch into a dial instead of a cliff.
Worked example: Aisha's ramp
Aisha points new checkouts and one off orders at the new provider on 3 November. For two weeks she watches declines on those payments, which are her easiest traffic. They settle at her usual rate. On 17 November she moves the 200 UK subscribers whose renewal falls that week. Declines on that batch run a little high, so she holds the next batch three days, then moves 500, then the rest. Her worst week costs 11 renewals that needed a friendly email, not 660.
Strong Customer Authentication follows the agreement
Strong Customer Authentication (SCA) is the UK and EU rule that most online card payments need two of three checks: something the customer knows, has or is.5 In practice, that is the banking app prompt or the text message code during checkout.
The rule has an important gap for subscriptions. The FCA's guidance says payments initiated by the payee, without the payer doing anything to trigger them, are not subject to SCA. That covers merchant initiated transactions, where the customer has given a mandate allowing you to charge them.6 Setting up that mandate online does need SCA. And if you raise the price beyond what the original agreement covers, payments at the new price are unauthorised unless the customer agrees to amend the mandate, which again needs SCA if done online.6
So the authentication belongs to the customer's agreement with you. The proof of it sits with the provider that took the first payment, as a network transaction ID. Stripe asks for these IDs in a card import, calls them mandatory for merchants affected by SCA, and explains that they let it claim exemptions so customers do not have to authenticate again.5 Without them, the issuer may treat your next renewal as a new payment and ask the customer to authenticate. Customers who are not at their screen at 6am when the renewal runs will not do that. Stripe says plainly that exemptions are never guaranteed and that the bank can still ask.7
Worked example: do not raise the price in the same month
Aisha had planned to raise the subscription from £18 to £20 in November, the same month as the switch. Her terms said the price was £18, with no clause about changes. Under the FCA's reading, the £20 renewals would need each subscriber to agree to a new mandate, with SCA.6 Combined with the move to a new merchant identifier, that would put almost every subscriber in front of an authentication request at once.
She splits them. The switch happens in November on the old price. In January she emails subscribers about the new price, asks them to confirm, and renews at £20 only once they have. One risky change at a time.
Direct Debit has its own road: the Bacs bulk change
Direct Debit works differently from cards. There are no card numbers, there is a mandate (in Bacs language, a Direct Debit Instruction) held by the customer's bank in favour of a service user number. Direct Debits are purely payee initiated, which is why the FCA treats them as outside the SCA rules.6
To move mandates without asking every payer to sign again, the UK scheme has the bulk change process. Bacs describes three options: transfer the whole service user number, transfer all the instructions, or transfer some of them.8 Transferring the number is the option Bacs and the sponsoring banks recommend, because nothing is cancelled and recreated. The other two cancel the old instructions and create new ones in the payers' banks, which avoids new paperwork for the payer.8 All three rest on a standard legal document, the bulk change deed, whose wording may not be changed.8 And under every option the new provider accepts responsibility for indemnity claims, including claims on collections made before the switch.8 That is one reason new providers check your history carefully.
Payers must be told. The Direct Debit Guarantee promises customers notice of changes, normally 10 working days, and a full and immediate refund from their bank if an error is made.9 Stripe's own process for importing Bacs mandates asks you to send a Letter to Payers, approved in advance, timed to the advance notice period on your current service user number, and only after the sponsor banks give final approval.5
The timing is long. Stripe recommends a bulk change date at least six weeks after you send the signed deed, says the old processor must cancel the existing mandates before the import, and that after cancellation you cannot charge customers through the old processor.5 It then lists money arriving seven business days after the bulk change date: mandate submitted on day zero, payment submitted on day three, funds out of the customer's account on day five, available on day seven.5 Customers may briefly see two active mandates in their banking app for one to three business days.5
Worked example: 380 cafés
Aisha's wholesale cafés pay on the 1st of the month, £91,200 in total (). She sends the signed deed on 1 September. She asks for a bulk change date of 20 October, about seven weeks later, and her letter goes out after sponsor bank approval, inside the advance notice period.
Why 20 October? Because of the day count above. Mandates imported on 20 October are active three business days later, well before the 1 November collection, which then runs on the new provider as normal. Had she let the bulk change date drift to 31 October, the first collection could not go out on day zero, and £91,200 would have reached her account about a week late. She picks the date around her collection day, not around the provider's diary.
Money in flight: payouts and reserves
A new provider does not pay you on the old provider's timetable. Stripe, for instance, typically schedules a new account's first payout to complete within 7 to 14 days of the first live payment, depending on industry, country and risk level.10 A provider may also hold back part of your takings as a reserve. Stripe describes a reserve as a temporary hold on a portion of a business's funds, uses fixed and rolling reserves, and sizes them on industry conditions, payment activity, dispute rate, refund rate and financial stability.11
Meanwhile, the old provider pays out what it still holds on its own schedule. For a few weeks, money arrives from two places, later than usual, and some of it is parked. That is a cash flow problem, and it is easy to size:
Here is the cash gap in pounds, is the average daily card takings, is the number of extra days before the first payout compared with your current timing, is the reserve share, and is the number of days each payment sits in a rolling reserve. The first term is the delay, the second is the money that sits in the reserve at any time once it is running. Both are rates multiplied by time: Foundations: ratios and rates.
Worked example: Aisha's cash gap
Aisha's takings are a day. Her old provider pays out two days after each payment. The new one's first payout arrives on day seven, so . The new provider sets a 10% rolling reserve for 30 days, so and .
The delay: . The reserve: . Together, . Aisha needs £12,800 of cash or credit to cover the switch, before she pays a single coffee farmer. So she agrees the reserve terms in writing before signing, not after.
The old account keeps working after you leave
The day you stop taking payments with the old provider is not the day you are finished with it. Two things keep pointing back at it.
Disputes first. Card networks typically allow cardholders to dispute a payment within 120 days, sometimes longer. You then usually have 7 to 21 days to respond, and the issuer usually has 60 to 75 days to decide.12 A dispute pulls the money and a fee from the balance of the account that took the payment.12 On the old provider, that means the old account.
Then refunds. A refund can only go back to the original payment method used in the charge, never to another card.13 The new provider cannot refund a payment it never took. The old one does, from its balance, and Stripe holds card refunds as pending if that balance cannot cover them.13 Stripe also notes that you keep access to your data after you stop processing, as long as you do not close or delete the account.1
Worked example: one refund, one dispute
Aisha switches on 3 November. On 28 October, a customer bought a £129 grinder on the old provider. It arrives broken and the customer asks for a refund on 12 November. The refund must go through the old provider, back to that card. Her old balance is zero, because the final payout on 6 November swept it. The refund sits as pending until she tops the account up.
Then, on 20 February, someone disputes a £54 gift box from 2 December, 80 days after the payment and still inside the window. The old provider debits £54 plus its fee. If she had closed the account in January, she would have been chasing it by email instead of answering it in the dashboard.
Her rule now, and mine: keep the old account open, with a small float in it, for at least six months after the last payment it took.
Webhooks and reconciliation need both providers
A webhook is a message the provider sends to your shop when something happens: a payment succeeded, a refund failed, a dispute opened. During a switch you have two senders, and both need a working address.
Stripe retries an undelivered webhook for up to three days in live mode, does not guarantee the order events arrive in, and can occasionally send the same event twice. It recommends recording the event IDs you have processed and ignoring repeats.14 Delete the old provider's endpoint on switch day and you silently lose the late refund failures and disputes from the section above.
A small table does most of the work. One row per processed event, with a unique index on provider and event ID:
class ProcessedEvent < ApplicationRecord
# One row per webhook event already handled, from either provider.
# Migration: add_index :processed_events, [:provider, :event_id], unique: true
validates :provider, :event_id, presence: true
end
def handle_once(provider, event_id)
ProcessedEvent.create!(provider: provider, event_id: event_id)
yield
rescue ActiveRecord::RecordNotUnique
# Already handled. A duplicate delivery is not an error.
end
In a real shop the create! and the work inside yield belong in one database transaction, so a failure halfway does not mark the event as handled.
Reconciliation, matching payouts in the bank to orders in the shop, needs the same discipline. Every payment record should say which provider took it, and every payout line should carry the provider's payout reference.
Worked example: the two payouts on 6 November
On 6 November Aisha's bank shows two credits. One is £3,140 from the old provider: the final payout for 1 and 2 November, which leaves that account at zero. The other is £1,412 from the new provider, its first payout, less the reserve. Her bookkeeper matches each to orders by provider and payout reference. Without the provider stored on each order, the two would have looked like one muddled day.
Subscriptions must move exactly once
If your subscriptions are run by the provider's billing system, the schedules have to move too, and the card import does not carry them. Stripe imports cards and billing addresses, not subscriptions or invoices, which move through a separate toolkit, and it warns that you must cancel the old subscriptions as soon as the new ones are active or you will bill your customers twice.4
Double billing turns a quiet migration into a pile of disputes. So for each subscriber, one system owns the next renewal date, and the handover happens at a known moment.
Worked example: one batch, one owner
Aisha's subscribers renew on different days through the month. Her first batch is the 200 who renew in the week of 17 November. On 14 November she imports their schedules on the new provider and cancels the old schedules for the same 200 that afternoon, from the same list. Her check the next morning is a simple count: 200 active schedules on the new provider for that batch, zero on the old one. She repeats it for every batch.
Had she left both running, those 200 would each have paid £18 twice, £3,600 taken that she would have had to refund. Across all 2,200 subscribers, the same slip costs £39,600 and a month of apologetic emails.
Where the shop software helps: Solidus keeps payment methods apart
How painful all of this is also depends on your shop software. In Solidus, the open source Rails shop framework I build on, the shop talks to a payment method, not directly to a gateway, and the gateway is a helper class wrapping one provider's API.15 Each payment links an order, a payment source and a payment method, and a refund is processed through the original payment's payment method.15 In the code, a refund calls the original payment's method with the original transaction ID.16
Payment methods also carry separate switches for being active, available to customers and available to the admin.17 That fits the switch nicely. The new method goes live for customers at checkout. The old one stays active for the admin, so refunds on old orders still go back through it, without customers ever seeing it.
Worked example: old and new methods side by side
Aisha's shop has the old provider as one payment method and the new provider as another. On 3 November she makes the new one available to customers and switches the old one off for customers but leaves it available to the admin. The broken grinder from 28 October is refunded from the order screen, and Solidus sends it through the old method automatically, because that is the payment's method. Nobody has to remember which provider took which order.
A safe plan runs both providers in parallel
Put together, the safe plan is not one switch day. It is a few weeks of running both, moving one group at a time, with the old account kept alive long after.
Read it from the top. The export request comes first because it is the slowest step and you do not control it. Each batch is checked before the next, so a problem costs one batch, not the whole base. The old account closes last, after the dispute window.
Worked example: Aisha's calendar
1 September: export requested, Bacs deed signed. 20 October: bulk change date for the cafés. 3 November: cards imported, new checkouts live. 17 November onwards: subscribers moved in three batches, 200, then 500, then the rest, each with its old schedules cancelled the same day. Early December: every subscriber renewing on the new provider. June: old account closed, six months after its last payment. Three months for what looked like a settings change, and nobody charged twice.
What I ask a provider before anyone signs
Most of this is decided before the first payment, in the contract and in the documentation. I ask every provider the same questions, and I want the answers in writing:
- How do I export saved cards to another PCI DSS Level 1 provider, how long does it take, and is there a fee?
- Do you include network transaction IDs in an export, and can you import them?
- How do you handle a Bacs bulk change, in and out?
- When is the first payout, what is the normal schedule, and will you hold a reserve?
- How long can I keep the account open after I stop processing, to handle refunds and disputes?
A provider with a published export process, like the ones I cited above, is a provider you can leave. That is worth more than a lower fee, because a provider you cannot leave can set the fee later. It belongs in the same checklist as the data protection questions in vetting vendors before they undermine your compliance, and in the cost model when you move a shop to Solidus. If you are weighing whether a switch is worth it at all, expected value for founders is the honest way to compare the saving with the risk.
The switch itself is not dangerous. Doing it in one day is.