Join our Newsletter — 33% off our NHI Course
Home› Guides› If your payment gateway is compromised: lock the…
Guide Fraud Prevention

If your payment gateway is compromised: lock the merchant account, recover payouts and rebuild

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 14 min read
On this page

An attacker who takes over your merchant account on a payment gateway does not need your card data: they can change the bank account your settlements go to, issue refunds and credits, repoint your webhooks and mint new API keys, all with the gateway's full blessing because the requests come from a legitimate admin session. This playbook covers that scenario: takeover of the merchant gateway account and its admin console, whether through a phished administrator, a stolen session or an abused integration. It sets out triggers, the containment order, recovering diverted payouts, cleaning up refund abuse and webhook tampering, rebuilding every merchant credential, evidence and notification. It is vendor-neutral and written for payments engineers, finance operations, fraud teams and incident responders. Key rotation detail for specific platforms is in Payment API keys beyond Stripe, and the integration controls this playbook assumes are in the Payment Gateway Integration Security Guide.

Key takeaways

  • Freeze money movement before anything else. Ask the gateway, through a verified support or fraud channel, to hold payouts and block bank account changes; a payout that leaves while you rotate keys is the loss you cannot reverse.
  • The console is a bigger risk than one key. An admin session can create keys, add users, change webhooks and alter payout details, so revoking one leaked key does not end a console takeover.
  • Treat every setting as possibly changed. Bank accounts, notification addresses, webhook endpoints and signing secrets, fraud rules, team members, connected apps and IP allowlists all need comparing with a known-good record.
  • Rebuild credentials in a fixed order. Humans and their authenticators first, then API keys, then webhook secrets and connected apps, so the attacker cannot re-enter through a credential you have not reached yet.
  • Your ledger is the source of truth, not the dashboard. Reconcile settlements, refunds and order states against your own records and the gateway's API, because the attacker could see and use the same dashboard you are reading.

What a merchant account takeover looks like

The attacker's goal is usually financial theft (ATT&CK T1657 Financial Theft, which the framework links to compromised accounts used for unauthorised transfers of funds), with data theft and persistence as by-products. The table lists the actions to look for and where to find them.

Attacker actionEffectWhere to look
Change the payout or settlement bank accountNext settlement goes to an attacker-controlled accountPayout settings history, account change notifications, bank verification events
Trigger manual or instant payouts, change settlement scheduleBalance drained faster than normal reconciliation noticesPayout list, schedule settings, balance history
Issue refunds or creditsMoney returned to cards or accounts the attacker controls, or mass refunds that cause lossesRefund log by user, API key and amount; refunds against old or unrelated payments
Add or change webhook endpointsPayment events, which can carry customer and order data, sent to the attacker; your fulfilment stops receiving eventsWebhook configuration and delivery logs
Rotate or read webhook signing secretsForged events accepted by your backend, or genuine events rejectedSecret roll events, signature failures in your own logs
Create API keys or connect third-party appsPersistent access that survives a password reset (T1098 Account Manipulation)API key list with creation time and creator, connected applications
Add team members or raise roles, change MFA or notification emailPersistence and suppression of alertsTeam and role audit log, security settings history
Loosen fraud rules, create payment links or alter checkout settingsCard testing through your account, payments taken on attacker termsRule change history, payment link list
Export customers, payments or disputesPersonal data exposureReport and export logs

Triggers and first-hour triage

Invoke this playbook on: a notification that payout details, the account email or MFA changed; a sign-in to the gateway console from an unfamiliar device or country; a new API key, team member or connected app nobody requested; webhook deliveries failing or going to a new URL; a settlement that did not arrive in your bank; an unusual volume of refunds or credits; or the gateway's own risk team contacting you. Phishing of finance staff for console credentials is the usual entry, so check the Business Email Compromise Response Playbook in parallel when the mailbox of a console user is involved.

  1. Confirm through a channel the attacker cannot touch: call the gateway's support or fraud line using the number from your contract or a saved record, not from an email or the possibly altered account settings.
  2. Export before you change: console audit logs, team and role lists, API key lists, webhook configuration and delivery history, payout and refund lists for the window. Some consoles keep logs for a limited period, so export now.
  3. Find the entry point: which user or key made the first unexpected change, from which address, and how it authenticated. A user change suggests credential or session theft; a key-only trail suggests a leaked secret, which the Payment API keys beyond Stripe page covers per platform.
  4. Measure exposure: current balance, pending payouts, refunds issued in the window, and whether customer or card data was viewed or exported.
  5. Check card data scope: if the attacker could change hosted checkout settings, inject scripts into your payment page or reach stored card data, run the Payment Card Compromise Response Playbook alongside this one.

Containment in the right order

  1. Hold the money: ask the gateway to pause payouts and lock bank account changes on the merchant account. Where the console lets you pause payouts yourself, do so as well. Tell your own bank to watch for and query unexpected inbound or outbound movements tied to the account.
  2. Take back the console: from a clean device, reset the compromised users' passwords, remove attacker-added team members, re-register MFA with phishing-resistant authenticators and end all active sessions. CISA calls FIDO/WebAuthn the only widely available phishing-resistant authentication, and places SMS and voice as a last resort. See the Phishing-Resistant MFA Guide.
  3. Cut programmatic access: revoke API keys created in the window and any key the attacker could have viewed, disconnect unrecognised connected apps, and restrict key creation to named responders. Restore IP allowlists if they were removed.
  4. Restore event delivery: delete attacker-added webhook endpoints, restore your own URLs, and roll the signing secret for each endpoint so that forged events signed with a stolen secret fail.
  5. Stop refund abuse: remove refund rights from every user and key that does not need them during the incident, and ask the gateway whether refunds issued in the window can still be cancelled before they settle.
  6. Restore safety settings: notification email addresses, fraud and risk rules, checkout and payment link settings, all from a known-good record.

Recovering diverted payouts and refunds

Recovery depends on speed and on the payment rails involved, so start these actions in parallel with containment.

SituationActionOwner
Payout pending to an attacker bank accountAsk the gateway to cancel it and restore the verified account; confirm in writingFinance with incident lead
Payout already sent to an attacker accountReport to your bank and the gateway at once so they can request a recall from the receiving bank; report to law enforcement and keep the referenceFinance, legal
Refunds sent to attacker-controlled cards or accountsList each by payment, amount and destination; ask the gateway about reversal; preserve for law enforcementFraud team
Mass refunds to genuine customersDecide whether to recharge, which needs customer consent and communication, or accept the lossFinance, customer service, legal
Forged payment events caused orders to ship unpaidReconcile every order marked paid in the window against the gateway API state; stop unshipped ordersEngineering, operations

Reconciliation must use the gateway API, not the webhook stream. The OWASP Secure Integration of Third-Party Payment Gateways Cheat Sheet says to verify payment status server-side with the gateway's API before fulfilling an order, and to alert on orders marked paid without gateway confirmation. In an incident, run that check across the whole window.

Webhook tampering: what to check

Webhook configuration is often overlooked in a console takeover because nothing visibly breaks until fulfilment stalls. Check each endpoint for these changes:

  • New endpoint added: events, including customer names, addresses and order details, copied to an attacker URL. Treat delivered payloads as disclosed data.
  • Existing endpoint repointed: your fulfilment stops; once you restore the URL, replay missed events through the gateway or reconcile by API.
  • Endpoint pointed at an internal address: on gateways or self-hosted relays that call your network, this is a server-side request forgery route. The Standard Webhooks specification recommends stopping webhook calls into internal networks, through a filtering proxy or by isolating webhook workers.
  • Signing secret rolled or read: the attacker can sign forged "payment succeeded" events. Roll it again from a clean session. The Standard Webhooks specification describes sending several signatures in one header during rotation, so a planned overlap is possible; in an incident, keep the overlap as short as your deployment allows, because the old secret is the stolen one.
  • Event types changed: subscriptions removed for disputes or payout failures hide the attack from your monitoring.

Your receiving side should also be checked: confirm the signature check uses a constant-time comparison and rejects stale timestamps, as the integration guide sets out, and that deduplication on the event ID did not drop replayed genuine events. See the Webhook Secrets Security Guide.

Rebuilding merchant credentials

OrderCredentialRebuild actionVerify
1Console users and their MFAReview every member; least privilege roles; phishing-resistant MFA; SSO where the gateway supports it; named owner role held by at least two trusted peopleTeam list matches HR and finance approval
2Account recovery settingsAccount email, phone and recovery contacts restored to monitored role addressesTest notification received by the security mailbox
3Secret API keysNew keys per service with restricted scope, stored in a secrets manager, old keys revokedNo requests from old key IDs in gateway logs
4Webhook signing secretsNew secret per endpoint, deployed to the receiverSignature failures back to baseline
5Connected apps and platform integrationsReauthorise only those in your integration register, with minimum scopesConnected app list matches the register
6Network restrictionsIP allowlists for server keys and console access where offeredDenied requests logged from other ranges
7Publishable and client keysRoll if the attacker could change their restrictions or allowed domainsCheckout works only from your domains

Treat the gateway keys as non-human identities with an owner, a scope and a rotation date, and record the ones that can move money separately. The Payment Service Provider NHI and Key Security Guide covers the credential design from the provider's side. OWASP ASVS 5.0 gives two useful control statements for the console you rebuild: V2.3.5 asks for multi-user approval for high-value business logic flows such as large monetary transfers, and V6.3.7 for notifying users after updates to authentication details. Ask the gateway which of its settings can enforce dual approval for payout account changes and refunds above a threshold, and turn them on.

Choosing the response depth

DecisionOption AOption BChoose B when
PayoutsHold until the bank account is re-verifiedHold all payouts until the investigation closesThe attacker had owner rights or changed bank details more than once
API keysRevoke keys created or viewed in the windowRevoke and reissue every keyAudit logs do not show key views, or the attacker held a role that can read keys
Merchant accountClean the existing accountAsk the gateway to open a new merchant account and migrateThe gateway cannot confirm all attacker persistence is removed, or account ownership was changed
Console accessReset compromised usersReset every user and require re-enrolment of MFAThe entry point is unknown or session theft is suspected

A small merchant with one owner and one integration can usually take option B throughout within a day, and should, because the cost of a missed key is a drained balance. A larger merchant with many integrations, sub-accounts or marketplaces needs to stage the key reissue by service and verify each, while keeping payouts held for the highest-risk accounts.

Evidence and notification

  • Preserve: console audit and sign-in logs, change history for payouts, users, keys and webhooks, payout and refund records, webhook delivery logs, your application's payment and fulfilment logs, and the gateway's case references. Record actions with times in UTC.
  • Who owns what: a PCI SSC FAQ notes that third-party service providers must tell customers which PCI DSS requirements they are responsible for and which fall to the customer (requirements 12.9.1 and 12.9.2). Use your provider's responsibility split to decide which controls failed on your side.
  • Customers: if webhook payloads or exports carried personal data, or refunds affected customers, legal must assess notification. See the Cyber Incident Reporting Requirements Map.
  • Card data: if card data or the payment page was in scope, acquirer and scheme notification deadlines apply; follow the card compromise playbook.
  • Law enforcement and your bank: payout diversion is theft; reports support fund recall.

Detection and measurement

For at least 90 days after recovery, alert on: payout bank account or schedule changes; refunds above a threshold or outside business hours; new API keys, connected apps or team members; webhook endpoint or secret changes; changes to account email or MFA; console sign-ins from new devices; and a rise in webhook signature failures in your own logs.

  • Time to payout hold: from first alert to payouts frozen, target under one hour.
  • Console MFA coverage: share of users with phishing-resistant MFA, target 100% for roles that can change payouts or refunds.
  • Key inventory match: keys in the gateway that match the integration register, target 100%.
  • Reconciliation gap: orders marked paid without gateway confirmation, target zero.
  • Funds recovered: share of diverted payouts and fraudulent refunds recovered.

Common failure patterns

  • Rotating the key, not the console: the team revokes a leaked key while the attacker's console session creates another one.
  • Trusting the dashboard contact details: responders call a support number or reply to an address the attacker changed.
  • Forgetting the payout schedule: the bank account is restored, but an instant payout or shortened schedule set by the attacker has already run.
  • Leaving the attacker's webhook in place: customer data keeps flowing to an external URL for weeks.
  • Single-person ownership: one owner holds the only role that can edit keys or users, and is the person who was phished. The Account Takeover Response Playbook covers the wider account recovery pattern.

Framework mapping

FrameworkReferenceWhere it applies
NIST CSF 2.0RS.AN-03, RS.MI-01, RS.MI-02, RS.CO-02, PR.AA-01Entry point analysis, containment, eradication, notification, credential management
NIST SP 800-53 Rev. 5IR-4, AC-2, AC-6, IA-5, SA-9, AU-9Incident handling, console accounts, least privilege, authenticators, external services, log protection
MITRE ATT&CK v20T1657, T1078, T1098, T1539Financial theft, valid accounts, persistence through new keys and users, stolen console sessions
OWASP ASVS 5.0V2.3.5, V6.3.7, V7.5.1, V7.5.3Multi-user approval, change notifications, re-authentication for sensitive changes and transactions
PCI DSS v4.0.112.9.1, 12.9.2Provider and merchant responsibility split

Practitioner checklist

  • Save the gateway's verified support and fraud contact routes outside the console.
  • Require phishing-resistant MFA for every console user who can change payouts, refunds, keys or webhooks.
  • Keep at least two trusted people in the owner role and nobody else.
  • Turn on alerts for payout detail, user, key and webhook changes, sent to a monitored security mailbox.
  • Keep an integration register of every API key, webhook endpoint and connected app with an owner.
  • Enable dual approval or step-up checks for payout account changes and large refunds where the gateway offers them.
  • Reconcile orders against the gateway API daily, not only through webhooks.
  • Export console audit logs to your own log store on a schedule.

Standards and references

Related NHI Mgmt Group resources: Payment Gateway Integration Security Guide · Payment API keys beyond Stripe · Payment Card Compromise Response Playbook · Third-Party Incident Response Playbook · Fraud Prevention Guide for Digital Businesses

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.