Alipay callbacks keep retrying after processing: acknowledgement, proxy rewriting and closure
A paid order and activated membership can coexist with repeated notification delivery. Protect the completed business record, then investigate acknowledgement. WenFuPay collection callbacks and direct Alipay integrations have different contracts. This guide uses the current site documentation and addresses an unaccepted response, not a second fulfillment.
Continue by topic
Separate committed business facts from delivery evidence
For the merchant order, retain signature and amount validation outcomes, payment commit time, idempotency result, application response and edge-proxy response. Log only necessary redacted identifiers, never secret keys or complete signing material. An HTTP 200 access-log entry does not prove that the sender received and accepted the right body.
Confirm payment and delivery were recorded once. For an authenticated duplicate matching the stored facts, reuse the persisted result and acknowledge as documented. Conflicting merchant, amount, currency or state requires exception review. An already-paid status never justifies skipping signature validation.
Inspect the effective response contract
The current WenFuPay document accepts HTTP 200 with a body containing success, ok or OK and recommends plain-text OK. OK is not the only accepted text. Do not introduce an unverified JSON wrapper from another integration. Inspect quoting, debug output and shared middleware against the response agreed during testing.
Inspect whether authentication redirects, challenge pages, domain redirects, error handlers or proxy caches intercept the callback route. A browser reaching a redirected page does not prove a server notification follows it. In your authorized test environment, compare application output with final proxy status, body and timing using the actual request method rather than a browser GET alone.
Example: a committed order followed by a timeout
O-EXAMPLE commits its payment fact at 12:00:01 but waits for email until 12:00:15 before responding. The sender may already have timed out. The next authenticated notification must reuse the committed result, not credit the account again. Move slow mail work to a recoverable follow-up task and define acknowledgement around durable acceptance.
In another branch, the application returns OK but a gateway wraps it as JSON or substitutes an error page. Preserve both layers of evidence and repair your route or middleware before synthetic testing. If persistence fails, do not acknowledge success merely to stop retries; retain the exception for protocol-compliant retry or reconciliation.
Verify convergence without erasing history
Use signed synthetic notifications in an isolated test database for first delivery, duplicate, conflict, failed commit and slow downstream work. Expect one payment fact, no extra balance or entitlement on duplicates, no mutation on conflict and no premature acknowledgement on failure. Separate test and production keys and never send samples to a live payment callback endpoint.
The current document limits delivery to three attempts in total, including the first, with retries approximately 60 and 300 seconds after the first two failures. It is not an infinite loop. More requests require separating orders, manual replays and other sources by their correlation records. Give the original technical contact a redacted timeline if acceptance remains unclear.
Frequently asked questions
Can I block duplicate callbacks after membership activation?
Keep validating and acknowledging them under the documented contract while making business writes idempotent. Blocking delivery can perpetuate sender-side failure and conceal genuine conflicts.
Why is HTTP 200 insufficient evidence?
The status is only part of the response. A wrapped body, transport timeout or proxy-generated page can make the sender’s observation differ from the application log. Compare the complete acknowledgement path.