One Alipay transaction claimed by two orders: ownership, conflict isolation and one delivery
Order-level deduplication can still deliver twice when two orders claim one payment. Establish the payment identity specified by the actual contract and assign it to one verified parent order before delivering.
Continue by topic
Confirm collection terms and eligibility
This applies to an owned or authorized site collecting through 稳付pay. Public methods include WeChat Pay, Alipay and UnionPay, subject to merchant configuration. This guide concerns Alipay payment identity; identifiers from different channels are not assumed globally unique. Confirm the business, site, callback address and formal signing/query contract during onboarding. Public guides explain the workflow; production gateways, merchant parameters and secrets remain private.
Ask the team about the fee basis, refund charges, order limits and any exceptional investigation costs; no universal rate or resolution deadline is offered. Merchant USDT settlement of CNY collections currently uses only TRON/TRC20, with separately agreed conditions and timing. Merchant-owned wallet monitoring is a separate TRC20/ERC20 service. Record customer payment, entitlement delivery and merchant settlement separately; conflicting orders cannot both become settlement-eligible.
Prepare payment identity and a claim table
First establish whether the conflict is only a display or import error. Preserve the order, payment attempt, contract version, a reference to authenticated evidence and existing ownership. Do not distribute full notifications or secrets to customer support. Confirm which formal fields define identity, including channel and account scope. Amount, notification count and browser-return parameters do not establish a payment identity.
An illustrative merchant table is payment_claim (payment_identity, order_id, evidence_ref), with NOT NULL and UNIQUE on payment_identity. These are internal design names, not 稳付pay API fields. If a purchase covers several child orders, claim one parent payment and allocate its purchased entitlements to children. Do not let each child claim the full amount. Quarantine missing identifiers and historical duplicates before adding a constraint; the constraint alone does not repair old data.
Authenticate, claim and post atomically
Verify the notification using the formal rules, then check merchant scope, original order, amount, currency and paid status. In one database transaction claim the payment identity and post the entitlement with a unique delivery key for the order. Commit the claim and ledger change together. If fulfillment is remote, save a unique delivery job inside that transaction and deduplicate again when executing it. Never deliver before ownership is secured.
Example using simulated evidence: both A and B cite payment P. Once A owns P, an A replay returns the existing outcome without more credit; a B claim creates a conflict for review and adds no balance. Roll back a uniqueness failure or use an explicit conflict branch before reading the existing owner. Follow the real acknowledgment contract; a fabricated successful acknowledgment cannot replace durable storage of the conflict.
Handle exceptions and reconcile outcomes
Two payment identities for one order are not necessarily a replay. Verify each payment and route any additional payment for authorized review rather than silently discarding it or delivering again. If ownership is wrong, hold the related delivery and settlement allocation, examine trusted query evidence and the audit trail, and correct through referenced adjustment records. Do not overwrite old identifiers or erase ledger history.
Use simulated evidence in the merchant isolation environment: concurrent A/B claims on P must yield one owner; replaying A must add no balance; rollback and retry must recover; child allocations must total the verified purchase. Reconcile one parent owner per payment identity, then match delivery and settlement separately. These checks create no real payments and query no customer transactions; authorized operators investigate production exceptions through the formal process.
Frequently asked questions
Can equal amounts prove the orders belong together?
No. Use the formal payment identity and trusted query evidence; equal amounts do not prove a common payment.
Why is an order idempotency key insufficient?
It prevents reposting one order, but does not stop two different orders consuming one payment. A unique payment claim closes that gap.