Investigate a Diverted Checkout Payment: The First 24 Hours
By Laís Peixoto
Growth Marketer, Proteside
Published · 6 min read

In the first 24 hours, suspend the affected payment method without deleting anything, store the evidence off the server, notify your payment provider and customers, and only then remove the code and reopen after a test purchase. Restoring a backup or reinstalling before preserving evidence erases what shows how the diversion happened.
To investigate a diverted checkout payment, work on four fronts in the first 24 hours: contain the affected payment method without deleting anything, preserve the evidence, notify the payment provider and customers, and only then fix the problem and reopen. The order matters: cleaning up the store before recording what happened erases exactly what shows how the diversion was carried out and who was affected.
This playbook applies to a diverted Pix payment at checkout (Pix is Brazil's instant payment system, and here the QR code or key shown on screen was swapped) and to a credit card form altered to copy card data. It was written for online stores on any e-commerce platform and does not replace legal advice or guidance from your payment provider.
Before you start: confirm what happened
The first alert usually comes from customer support or card chargebacks. The signs that the page was altered are covered in how to detect malicious JavaScript at checkout. Here, the point is only to confirm before acting.
To confirm, make a test purchase on a clean device, outside the company network and without an administrator login. Compare the Pix recipient, key and amount shown with what your system generated for that order. For cards, check whether the form has changed.
Hours 0 to 2: contain without deleting
- Suspend the affected payment method. If Pix is being swapped, turn off Pix at checkout for a few hours or put the store in maintenance mode. If the problem is in the credit card form, do the same with that form. Until you confirm the diversion has stopped, keep the method suspended.
- Do not reinstall or restore a backup yet. The PCI SSC guide to responding to cardholder data breaches (the council that maintains PCI DSS), in the version updated in 2020, recommends limiting exposure by isolating the affected systems rather than simply shutting them down, and preserving all evidence. The same guide warns that rebooting, clearing logs or removing suspicious software hampers the investigation. The recommendation was already in the 2015 version, according to a summary published by Lexology. The guide deals with card data, but the logic of containing without deleting also applies to Pix.
- Form a small team. Define who decides, who talks to the provider, who handles customers and who takes care of the technical side. Use a single channel and note the time of each action.
Hours 0 to 4: preserve the evidence
Before any fix, save:
- A copy of the site files and the database in their current state, with date and time.
- Server and admin panel access logs, plus the list of administrators and installed plugins.
- Screenshots or recordings of the tampered payment page, showing the QR code, key or form that appeared.
- Orders with Pix paid but not reconciled, receipts sent by customers and card chargebacks for the period.
- Scripts that the payment page loaded and the addresses it sent data to.
Store everything outside the affected server. If a forensic investigation is called in, it will need this material intact.
Hours 2 to 6: notify the payment provider
Contact your payment provider, gateway or acquirer through its incident channel, not regular support. Tell them since when the problem may have existed, which payment methods were affected and how many orders you have identified so far.
- Pix: provide the recipient details that appear on the receipts. Customers who paid should contact their own bank to request a refund. What changes for the store is explained in MED 2.0 and Pix refunds.
- Credit card: in card data breaches, the PCI SSC guide lists acquirers and card brands among the partners that must be notified immediately. When a breach is confirmed or suspected, card brands may require an independent investigation by a PCI Forensic Investigator (PFI), under the acquirers' and brands' own rules. The PFI cannot be the same company that provides other PCI DSS services to the store, and it needs access to the data, facilities and people involved. This requirement applies to card data, not to Pix diversion; confirm with your acquirer whether your case falls under it.
Hours 6 to 12: help and notify customers
- Answer first the customers who paid and did not receive their order: log the case and ask for the receipt.
- Do not promise a refund or a timeline before aligning with the provider and, if needed, with legal counsel.
- Prepare a short, factual message for those who bought during the period: what happened, what the store has done, what the customer should check (card statement, Pix receipts) and a contact channel.
- Give support a single script, so everyone answers the same thing.
Any duty to report to authorities depends on the case. Seek legal advice.
Hours 12 to 24: fix and reopen with verification
- Identify the entry point: an outdated plugin or theme, a third-party script or a compromised admin panel.
- Remove the malicious code and close the door (update, remove the component or revoke access).
- Change passwords, access keys and tokens for the admin panel, server, hosting and payment provider. Turn on two-factor authentication. If a forensic investigator is involved in a card case, agree with them on when to make the change: the PCI SSC guide asks you not to touch compromised systems without their guidance.
- Review the list of scripts on the payment page: each one needs an owner and a justification.
- Before reopening, repeat the test purchase on more than one device and at different times, and compare again the payment shown with the payment issued.
- Keep alerts on for changes to the checkout. What to watch is covered in how to monitor checkout changes.
After the 24 hours, hold a review: how long it took from the first sign to containment, what was missing and what goes into the incident response plan. The PCI SSC recommends having that plan ready before a problem occurs, along with contracts with vendors that handle security and incident response.
Frequently asked questions
What should I do when a customer paid via Pix but the order is still pending?
Check the recipient on the receipt. If it is the store, the case tends to be one of reconciliation; if it is someone else, treat it as a possible diversion and follow this playbook. Customer support is covered in the customer paid the Pix and the order did not go through.
Can I restore the backup right away to get back to selling?
Only after preserving the evidence. Restoring erases the state of the store at the time of the attack, and the backup itself may already contain the malicious code.
Does a clean server scan end the investigation?
No. Malicious code can be loaded from outside, directly in the customer's browser, without being stored on the server. Check the page as the buyer receives it.
To wrap up
A diversion at checkout is investigated faster when the store knows exactly what should appear on screen and what actually appeared. Comparing the expected payment with the one observed in the payer's browser, and recording the evidence of the difference, is the work of Proteside.


