Practical ERP guidance
Payment Gateway Settlement Reconciliation in ERP: A CFO's Go/No-Go Control Set for Payouts, Refunds and Chargebacks
Payment settlement reconciliation in ERP is the discipline of proving that every payout your gateway sends to the bank can be traced to specific sales, refunds, fees and disputes in the general ledger, and that each of those ledger entries was posted exactly once. It sounds like a bookkeeping chore. In practice it is where eCommerce, finance and integration engineering collide, and where small, silent errors accumulate in a gateway clearing account until someone has to explain them to an auditor.
This article is written for the CFO or finance head who owns the close and the audit trail, not for the developer who builds the connector. It offers a proposed design, a five-link control chain, and a set of all-required go/no-go controls you can use to test any ERP integration, whether you run ArionERP, a Tier-1 suite or a lighter mid-market system. It does not claim a score can certify readiness. Each control either has evidence or it does not.
- Scope: card and wallet gateway settlements flowing into an ERP general ledger and receivables.
- Not in scope: tax determination, payroll, or card-network rules, which depend on your jurisdiction and acquirer contract.
- Examples: Stripe's public documentation is used as one verified reference point. Other gateways differ, so verify yours.
Key Takeaways
- A payout is not an invoice payment. It is a net batch of charges, refunds, fees and disputes. Matching deposits to invoices one to one is the root cause of most unreconciled gateway balances.
- Use a clearing account and prove it nets to zero for every settled payout. A balance that cannot be explained is a control failure, not a rounding issue.
- Acknowledge only after a durable commit. Deduplication, inbox recording and work scheduling must be atomic, or explicitly recoverable, before you tell the sender the message arrived.
- Never blindly retry an ambiguous refund timeout. Read the authoritative state at the gateway first. An unknown result means completion could not be confirmed, not success and not verified failure.
- Bind each operation to a tenant-scoped identity and an immutable payload hash. Reject key reuse with a changed payload, and distinguish a legitimate second refund from a duplicate.
- Treat go/no-go controls as all-required. Do not add them into a score. One missing control is a no-go for that flow.
- Name a privacy owner. Gateway customer IDs, emails and payment references are sensitive identifiers, even when no card number is stored.
Why Settlement Reconciliation Breaks Inside the ERP
🔑 Key takeaway: The gateway and the ERP describe the same money in different units. The gateway thinks in balance transactions and payouts. The ERP thinks in invoices, customers and ledger accounts. Reconciliation is the translation layer, and it needs an owner.
A customer pays $100 on your webstore. The order lands in the ERP as a sales order and, after fulfillment, an invoice. Days later, your bank receives a single deposit that includes that $100 less fees, minus an unrelated refund, minus a dispute withdrawal for a different customer. Nothing in that deposit maps to one invoice.
Stripe's documentation describes this plainly: an automatic payout can include funds from multiple transactions, and a payout reconciliation report exists so you can match each payout to the transactions it contains. The same documentation explains that for manual and instant payouts, Stripe cannot identify which transactions are included, so you are responsible for reconciling those against your transaction history. See Stripe's guides on payout reconciliation and on selecting a report for the exact behavior. Confirm the equivalent behavior in your own gateway contract, because it varies.
| Gateway reality | Common ERP assumption | What breaks |
|---|---|---|
| One payout bundles many charges, refunds and fees | One bank deposit equals one invoice payment | Unmatched deposits and manual spreadsheet matching |
| Fees are deducted before funds arrive | Cash received equals invoice total | Short-pays and untracked fee expense |
| Refunds and disputes occur after the sale, sometimes in a later period | An order is closed when paid | Revenue, cash and customer balance drift apart |
| Some payout types are not itemized by the gateway | Every payout is itemized | Gaps that only a person can explain |
| Events can arrive late, twice or out of order | Each message is unique and sequential | Duplicate or missing postings |
| Multi-currency charges and payouts | One currency per entity | Unexplained exchange differences |
The finance consequence is not abstract. Revenue recognized on capture, cash recognized on payout and fees recognized on neither is a recipe for a clearing account that grows quietly. Your accounting module can only reconcile what the integration feeds it, which is why the integration, not the ledger, is the real control surface.
How Most Teams Approach It, and Why It Fails
🔑 Key takeaway: Most teams reconcile at month-end from a downloaded report, match on amount, and plug the remainder. That works until volume, refunds or a second legal entity arrive.
The typical path looks reasonable at small scale. Someone downloads a gateway report, an accountant matches totals to the bank, and a journal entry books fees. As order volume grows, an engineer adds a script that posts payments to the ERP automatically. The script retries on errors. Everyone moves on.
| Common approach | Why it seems fine | Failure mode | Missing control |
|---|---|---|---|
| Month-end CSV import | Cheap, familiar | Errors found weeks after they occur; disputes already aged | Per-payout itemization test |
| Match on amount and date | Works for unique amounts | Collisions on common prices; wrong invoice cleared | Match on gateway object IDs |
| Book the net deposit as revenue | Bank agrees with books | Revenue understated by fees; refunds and disputes hidden | Gross-to-net posting through a clearing account |
| Script retries until it succeeds | Handles flaky networks | Duplicate postings or double refunds after ambiguous timeouts | Idempotent operation identity and state reconciliation |
| Acknowledge webhook, process later in memory | Fast response | Event lost if the process dies after acknowledgment | Durable inbox before acknowledgment |
The pattern underneath is that each approach treats reconciliation as a reporting activity performed after the fact, rather than a property of how transactions enter the ledger. If you have read our guidance on financial controls for automated postings, this article applies that thinking to one specific, high-volume flow: settlements.
A Proposed Design: The Settlement Control Chain
🔑 Key takeaway: This is a proposed design, not an established or proprietary ArionERP method. It splits settlement reconciliation into five links, each with a testable output, so a failure can be located instead of argued about.
The five links
- Capture the fact. Land every gateway event or fetched record in a durable inbox with the source account, the gateway object ID and a hash of the canonical payload. Verify authenticity using the mechanism your gateway documents.
- Bind the operation. Derive a tenant-scoped operation identity from the business decision (for example, an approved refund request), not from order number plus amount. Store the approved payload hash with it.
- Post to the clearing account. Sales, refunds, fees and disputes each post to a gateway clearing account with the gateway object ID as the reference.
- Match to payout and bank. Itemize each payout, prove the components sum to the payout amount in the smallest currency unit, and match the payout to the bank statement line.
- Dispose of exceptions. Anything that does not match gets a named owner, an age, and one of a small set of terminal dispositions.
Decide the accounting model first
Stripe documents two reporting models that map to two accounting treatments: a Balance report that behaves like a bank statement, and a Payout reconciliation report designed for teams that model the gateway balance as a temporary clearing account. The choice drives everything downstream, so make it deliberately. The overview in Stripe's reporting and reconciliation guide also notes that retrieving payout detail asynchronously when a payout event arrives is a recommended practice, which supports the inbox design above.
| Dimension | Clearing-account model (per payout) | Balance-as-bank model (per period) |
|---|---|---|
| Best fit | Teams that need each bank deposit explained | Teams that treat the gateway like a sub-bank account |
| Reconciliation unit | Payout | Period balance |
| Effort at close | Lower if itemization is automated | Lower on paper, harder to explain individual deposits |
| Exception visibility | High: unmatched items surface per payout | Lower: differences hide inside the period total |
| Risk if mis-implemented | Clearing balance that never reaches zero | Period balance that agrees while individual items are wrong |
For most eCommerce and distribution finance teams the clearing-account model gives auditors a cleaner trail. That is a judgment, not a rule. Pick the model your auditors and your volume support.
Illustrative worked example
The numbers below are hypothetical, built only to show the arithmetic. They are not customer results. Assume one payout of $48,616.60 that bundles the following movements.
| Component | Amount | Clearing account effect |
|---|---|---|
| Captured charges (many orders) | $52,400.00 | Debit clearing |
| Refunds issued | $1,850.00 | Credit clearing |
| Processing fees | $1,568.40 | Credit clearing, debit fee expense |
| Dispute withdrawal | $350.00 | Credit clearing, debit disputes receivable or loss |
| Dispute fee | $15.00 | Credit clearing, debit fee expense |
| Payout to bank | $48,616.60 | Credit clearing, debit bank |
Credits to clearing: $1,850.00 + $1,568.40 + $350.00 + $15.00 + $48,616.60 equals $52,400.00, which equals the debit from captures. The clearing balance for that payout is zero. If your ERP cannot show that test per payout, you are reconciling by hope.
Mandatory Go/No-Go Controls for Settlement Flows
🔑 Key takeaway: These controls are all-required. They are not weighted, summed or scored, and passing them does not certify production readiness. A single failed control means no-go for that flow until it is fixed or the limitation is disclosed and accepted by the owner.
| # | Control | Evidence to request | No-go if |
|---|---|---|---|
| 1 | Verified acknowledgment | Test showing the inbox record and the work item commit in one transaction (or a recoverable outbox) before a success response | The receiver responds before durable commit |
| 2 | Tenant-scoped idempotency | Key design including tenant or legal entity, gateway account, object ID and purpose | Keys are global, or contain emails or other personal identifiers |
| 3 | Payload binding | Stored hash of the approved payload; test that the same identity with a changed payload is rejected and alerted | A changed payload silently returns the earlier result or overwrites it |
| 4 | Atomic claim | Concurrency test with at least two workers on the same item | Two workers can both process the same operation |
| 5 | Target-side conditional mutation | Unique constraint or conditional update on the ledger side; or a documented single-writer serialization with disclosed limits | The only protection is read, compare, then write in application code |
| 6 | Ambiguous timeout handling | Runbook and test: on timeout, read authoritative gateway and ERP state before any resend | A wrapper re-sends refunds or payouts on timeout without a state check |
| 7 | Unknown-state handling | An explicit unconfirmed state with owner and age, excluded from both success and failure counts | Unknown results are logged as success, or retried forever |
| 8 | Terminal failure | Defined end states with reason codes and a named disposition owner | Failed items loop indefinitely or disappear into logs |
| 9 | Payout itemization test | Per payout: components sum to payout amount in minor units; clearing nets to zero; bank line matched | Plug entries or unexplained residuals are allowed |
| 10 | Late-event policy | Written rule for refunds and disputes arriving after period close, with reference to the original sale | Late items edit closed periods or are ignored |
| 11 | Privacy ownership | Named owner for payload retention, log redaction, dead-letter content and identifier handling; PCI scope reviewed with your acquirer or assessor | Raw payloads with personal identifiers sit in logs with no owner or retention rule |
What each control protects
Control 1 and 2. Gateways and your own integration layer can deliver a message more than once. Duplicate delivery is normal behavior to design for, not an edge case. Check your gateway's documentation for its retry window and duplicate-event behavior, and design your receiver so downtime longer than that window is recoverable by pulling records, for example by listing payouts and balance transactions, rather than relying on pushes alone.
Control 3. Stripe's API reference states that its idempotency layer compares incoming parameters to the original request and returns an error if they differ, and that keys can be removed automatically once they are at least 24 hours old. Two lessons follow. First, your own ERP-side record must be the long-lived deduplication authority, because a gateway key will not protect you after it is pruned. Second, the same-key-different-payload rejection is a behavior worth copying in your own layer. See the idempotent requests reference. The same page advises against using sensitive data such as email addresses as keys.
Control 5. A read followed by a write in application code is not compare-and-swap, because two workers can both read before either writes. The protection must live where the data lives: a unique constraint, or an update that only succeeds when the row is still in the expected state. Gateways rarely offer conditional mutation on a refund, so for gateway-side actions you rely on the idempotency key plus a lookup, and you disclose that limitation to the owner.
Control 6. A timed-out refund request has an unknown outcome. The gateway may have processed it. Resending with a freshly generated key creates a second refund. Resending with the original key is safe only inside the key's retention period and only with an identical payload. Past that, look the refund up by its reference first.
Illustrative inbox and claim pattern
The sketch below is illustrative, written in generic PostgreSQL-style SQL. It is not ArionERP's API contract or any gateway's official sample. Adapt it to your database and your ERP's documented interfaces.
-- Illustrative only. Not an official API contract. CREATE TABLE settlement_inbox ( tenant_id TEXT NOT NULL, source_account TEXT NOT NULL, source_object_id TEXT NOT NULL, purpose TEXT NOT NULL, payload_hash TEXT NOT NULL, status TEXT NOT NULL DEFAULT 'pending', claim_token TEXT, received_at TIMESTAMP NOT NULL DEFAULT now(), PRIMARY KEY (tenant_id, source_account, source_object_id, purpose) ); -- 1. Receive: record and schedule in ONE transaction, then acknowledge. BEGIN; INSERT INTO settlement_inbox (tenant_id, source_account, source_object_id, purpose, payload_hash) VALUES (:tenant, :acct, :obj, :purpose, :hash) ON CONFLICT DO NOTHING; -- If no row was inserted, load the stored hash. A different hash is a -- conflict: record it, alert, and never apply the new payload. COMMIT; -- Only after COMMIT succeeds: return a success response to the sender. -- 2. Claim: atomic, safe with concurrent workers. UPDATE settlement_inbox SET status = 'claimed', claim_token = :token WHERE (tenant_id, source_account, source_object_id, purpose) IN ( SELECT tenant_id, source_account, source_object_id, purpose FROM settlement_inbox WHERE status = 'pending' ORDER BY received_at LIMIT 10 FOR UPDATE SKIP LOCKED ); -- 3. Post: target-side uniqueness, not read-then-write. INSERT INTO ledger_posting (tenant_id, operation_id, payload_hash, journal_ref) VALUES (:tenant, :op_id, :hash, :journal) ON CONFLICT (tenant_id, operation_id) DO NOTHING; -- 4. Complete: conditional on the claim still being ours. UPDATE settlement_inbox SET status = 'posted' WHERE tenant_id = :tenant AND source_account = :acct AND source_object_id = :obj AND purpose = :purpose AND status = 'claimed' AND claim_token = :token; -- Zero rows affected means the claim was lost: stop and investigate.Note the limits. The unique key handles deduplication. The hash comparison detects changed-payload reuse and does not gate the write. A refund that is legitimately issued twice for the same order, for example two partial refunds, needs two distinct operation identities because they come from two distinct approved decisions. If you derive identity from order number and amount, you will either block a valid second refund or allow an accidental duplicate. Derive it from the approval record.
Operation states
| State | Meaning | Allowed next step |
|---|---|---|
| pending | Durably recorded, not yet claimed | Claim by one worker |
| claimed | One worker owns it | Posted, unconfirmed, or terminal failure |
| posted | Ledger entry confirmed with the operation identity | Included in payout match |
| unconfirmed | Completion could not be confirmed; not success, not verified failure | Read authoritative state, then post or fail |
| conflict | Same identity, different payload | Human review; never auto-apply |
| terminal_failed | Verified failure with reason code | Owner disposition |
For incident handling when states diverge, see our runbook on reconciling unknown outcomes, and for the retry fundamentals see idempotent ERP integration.
Why This Fails in the Real World
🔑 Key takeaway: Capable teams still fail here because settlement sits between finance, operations and engineering, and each assumes another group owns it. The scenarios below are composite, illustrative patterns, not reports of specific customers.
Scenario 1: The clearing account nobody owns
Accounts receivable sees the gateway clearing account as treasury's problem. Treasury sees it as an integration artifact. Each month a residual of a few hundred dollars is moved to a miscellaneous account to make the bank reconcile. Over several quarters the plugs hide a systematic fee mismatch and a handful of unrecorded disputes. Intelligent people fail here because the account has no named owner and no zero-balance test, so a small residual never looks urgent. The fix is governance: one owner, a per-payout zero test, and a rule that plugs require sign-off.
Scenario 2: The double refund after a timeout
A support agent approves a refund in the ERP. The call to the gateway times out. The integration wrapper generates a new key for each attempt and tries again. The first request had actually succeeded. The customer receives two refunds, and the ERP posts one credit memo. The failure is not careless engineering; the retry wrapper was written for read operations and later reused for a consequential mutation. A fresh key per attempt defeats the very protection the key exists to provide. The control is to bind one operation identity to the approval, keep it across attempts, and read the gateway's state before any resend once the key's retention could have lapsed.
Scenario 3: Acknowledged, then lost
The receiver returns a success response as soon as it parses a payout event, then queues the work in memory. A deployment restarts the process. The sender believes delivery succeeded, so it does not retry. The payout never reaches the ledger, and the gap appears at close. This happens because response time was optimized for the sender's expectations rather than for durability. The control is verified acknowledgment: durable commit first, response second, and a periodic pull to backfill anything missing.
Scenario 4: Two entities, one key space
A group runs two legal entities against one gateway account. Idempotency identities were built from the gateway object ID alone and stored in a shared table. A reprocessed event for entity B is treated as a duplicate of entity A's earlier record. Tenant-scoped identity, including the legal entity, prevents this. It also supports privacy ownership, because each entity can apply its own retention rule.
| Failure pattern | Governance gap | Control that closes it |
|---|---|---|
| Unowned clearing account | No accountable owner or zero test | 9 and 8 |
| Double refund | Retry logic reused for mutations | 2, 3, 6 |
| Lost payout event | Acknowledgment before commit | 1, 7 |
| Cross-entity collision | Shared, unscoped identity | 2, 4, 11 |
What This Means for the CFO: Ownership, Privacy and Vendor Evaluation
🔑 Key takeaway: You do not need to write the connector, but you must own the definitions: what counts as matched, who may post an adjustment, and how long payloads are kept. Evaluate vendors on evidence, not feature lists.
Assign four owners
- Clearing account owner: accountable for the per-payout zero test and aged residuals.
- Refund and dispute authority: approves the decision that creates an operation identity.
- Integration owner: maintains the receiver, retries and backfill.
- Privacy owner: decides payload retention, log redaction and dead-letter handling. Our guidance on payloads, logs and dead-letter queues goes deeper on this control.
Scope the standards correctly
PCI DSS, published by the PCI Security Standards Council, concerns payment card data and the environments that store, process or transmit it. If your ERP receives only tokens and gateway object IDs, its exposure differs from a system that holds card numbers, but that does not remove your obligations as a merchant. Which requirements apply to you depends on how you accept payments and on your acquirer's rules, so confirm scope with your acquirer or a qualified assessor. Equally, a customer ID, an email or a payment reference is an identifier that can itself be sensitive under privacy law, even when no card data is present. Treat identifiers in logs and keys with the same care as the data they point to.
Evaluating vendors without comparing marketing claims
The table below is evaluation guidance, not a capability comparison. It tells you what to ask each class of system and what evidence should come back. Product capabilities and certifications should be confirmed against the vendor's primary documentation and contract, and compliance-support features are not a substitute for your own legal obligations.
| Evaluation area | Tier-1 suite | Lighter mid-market ERP | ArionERP |
|---|---|---|---|
| Where settlement logic lives | Ask whether it is native, a partner connector or custom, and who maintains it through upgrades | Ask whether reconciliation is native, a marketplace add-on or a spreadsheet step | Request a scoped proof against your gateway's test environment using the documented integration options; confirm connector scope in writing |
| Idempotency and conflict behavior | Ask for a demonstration of changed-payload rejection | Ask for the same demonstration | Ask for the same demonstration; do not assume |
| Multi-entity tenancy | Verify how entity scope applies to integration identities | Verify the same | Verify the same; the Enterprise plan lists a multi-company API, so test it against control 2 |
| Security assurance | Request current reports and certificate scope | Request the same | Review the security and compliance page, then request current certificates and their scope and dates |
| Deployment responsibility | Clarify who runs the inbound endpoint | Clarify the same | Cloud or on-premises: decide who operates the receiver, patches it and owns uptime |
Deployment choice changes who carries operational risk. With a hosted deployment the vendor typically operates the inbound endpoint, subject to the service levels in your contract, and ArionERP's published cloud plans reference a 99.9% SLA hosted on AWS or Azure regions, which you should verify in your agreement. On premises, your team operates the endpoint, or a relay in front of it, and carries the availability burden. Either way, design backfill by pull so a receiver outage longer than the gateway's retry window is recoverable. If you sell online, read how the eCommerce platform and the eCommerce integration approach connect to the ledger, then test those flows against the eleven controls above.
A Lower-Risk Path: Rollout Sequence, Evidence and Measurements
🔑 Key takeaway: Prove one flow end to end in a test environment, add failure injection, and only then widen scope. Measure against your own baseline. No external benchmark makes your numbers good or bad.
Rollout sequence
- Choose the accounting model and document it with your auditors.
- Map every gateway object type (charge, refund, fee, dispute, payout, adjustment) to a ledger treatment and a purpose code.
- Build capture, identity and claim with the inbox pattern, in a test environment with the gateway's test mode.
- Inject failures: duplicate delivery, out-of-order events, a worker crash after claim, a timeout on a refund, a changed payload under an existing identity.
- Run shadow reconciliation for several payouts alongside the existing manual process and compare results item by item.
- Cut over one flow (for example, fees and payouts before refunds), keeping a rollback path for in-flight items.
- Hold a post-close review of exceptions and update the late-event policy.
For cutover mechanics, refer to in-flight orders, retries and rollback.
Measurements you own
The metrics below are proposed. Capture a baseline before the change and review the trend, not a universal target.
| Measure | What it shows | Why a CFO cares |
|---|---|---|
| Clearing balance and its age by payout | Residuals that persist | Early signal of fee, refund or dispute leakage |
| Payouts matched without manual edit, as a share of total | Automation quality | Close effort and error exposure |
| Count and age of unconfirmed operations | Unresolved unknowns | Direct audit risk |
| Conflict events (same identity, changed payload) | Upstream data or logic faults | Prevents silent wrong postings |
| Late events posted after close | Cutoff policy pressure | Period integrity |
| Days from payout to full match | Reconciliation latency | Cash visibility |
Evidence pack for audit
- Written accounting model and account ownership.
- Control test results for each of the eleven controls, with dates and test data.
- Sample payout itemizations showing the zero-balance test.
- Exception log with dispositions.
- Retention and redaction rule signed by the privacy owner.
This evidence also feeds the work described in our post go-live compliance and audit playbook.
Context note for 2027 planning, then generalized
Gateways add payout types, currencies and report formats over time, and bank statement formats evolve. Do not hard-code today's report schema as the control. The durable parts are the ones in this article: object-ID matching, per-payout itemization, tenant-scoped operation identity, verified acknowledgment and named ownership. Revisit your gateway documentation and your acquirer terms at each contract renewal and at each major ERP upgrade.
Is your gateway clearing account explainable today?
If a residual survives two closes, the control is missing, not the cash.
Bring your gateway, your ledger and one failed payout. We will walk the controls with you.
Request a Scoped ReviewConclusion: Five Actions Before You Trust the Automation
Settlement reconciliation is a control problem disguised as a data problem. Use the following actions to decide whether a flow is ready to run unattended.
- Name the clearing account owner this week and require a per-payout zero-balance test before the next close.
- Run the eleven controls as a pass or fail review. Do not average them. For each failure, either fix it or record a disclosed limitation with an accountable approver.
- Inject one ambiguous refund timeout in a test environment. Confirm the system reads authoritative state before resending and that an unknown result stays unknown until confirmed.
- Test changed-payload reuse and concurrent workers against your ledger, and confirm the protection is enforced by the target data store, not only by application code.
- Assign a privacy owner for payloads, logs and dead-letter content, and confirm PCI scope and identifier handling with your acquirer or assessor.
About the ArionERP team
ArionERP is a modular, AI-enhanced ERP platform available as cloud (SaaS) and on-premises deployments for small and mid-sized businesses, with a particular focus on manufacturing. It was launched in 2016 as a product of Cyber Infrastructure (CIS), an IT services company operating since 2003. Certification and assurance scope should always be confirmed on the security and compliance page and in current vendor documentation. This article was reviewed by the ArionERP Expert Team.
Frequently Asked Questions
What is payment settlement reconciliation in an ERP?
It is the process of tying each gateway payout and bank deposit back to the individual sales, refunds, fees and disputes that make it up, and confirming each was recorded in the general ledger exactly once. Most teams use a gateway clearing account that should net to zero once a payout is fully matched.
Why can't I match a bank deposit to a single invoice?
A payout is typically a net batch. It can combine many charges with refunds, fees and dispute withdrawals. Stripe's documentation, for example, describes automatic payouts as including funds from multiple transactions, which is why itemized reconciliation exists. Check how your gateway documents its own payouts.
Should the ERP use a clearing account or treat the gateway like a bank account?
Both are valid. A clearing account explains each deposit and surfaces exceptions per payout. A balance-as-bank model reconciles by period and is simpler to set up but can hide item-level errors. Choose with your auditors based on volume and the explanation level you need.
Is it safe to retry a refund request after a timeout?
Not blindly. A timeout means the outcome is unknown. First read the authoritative state at the gateway and in the ERP. Resend only with the same operation identity and an identical payload, and only within the key's retention period. Otherwise look the refund up by reference, because a fresh key can create a second refund.
Why bind an idempotency identity to a payload hash?
The identity says which operation this is. The hash says what was approved. If the same identity arrives with a different payload, something upstream changed, and applying it silently could post the wrong amount. Reject it, record the conflict and route it to a person.
How do I tell a legitimate second refund from a duplicate?
Derive operation identity from the approved business decision, such as a refund request record, rather than from order number and amount. Two separate approvals produce two identities. A retry of one approval reuses its identity.
Does storing only tokens remove PCI DSS obligations?
No. Holding tokens and gateway IDs instead of card numbers can change the scope of your environment, but your obligations depend on how you accept payments and on your acquirer's requirements. Confirm scope with your acquirer or a qualified assessor, and remember that customer identifiers can be sensitive under privacy law.
Can a checklist score tell me the integration is production ready?
No. Treat the controls as all-required checks. A high count of passed controls does not offset one failed control, such as acknowledging before durable commit. Passing them supports a go decision for a flow; it does not certify the whole system.
