Can a timed-out WeChat collection request be retried? Order identity and idempotency
A double tap or a second submission after a timeout can create more than one opportunity to collect money. Disabling a button is useful interface behavior, but the server needs durable identity and a way to establish what happened to the first request.
Continue by topic
Persist the purchase intention before calling the channel
Create an internal purchase record bound to the user, product version, currency and amount due. Save the merchant order identifier for the payment attempt before sending it. The internal labels used here illustrate a design, not additional API parameters.
Concurrent submissions for one purchase should enter a controlled server path backed by persistent state or uniqueness constraints. Do not merge unrelated purchases merely because amounts match, and do not rely only on a lock in one server’s memory.
Represent a timeout as an unknown result
An HTTP timeout, closed connection or browser cancellation does not establish that no order was created. Preserve the attempt identifier, start time and safe tracing information. Show processing status and the original-order lookup instead of immediately requesting another payment.
Retrying POST automatically requires known business semantics. Confirm whether the merchant identifier can be reused, what a duplicate returns and when a new attempt is permitted. Do not invent an idempotency header or fixed retry limit for the gateway.
Recover by checking the original attempt
Suppose purchase P1 uses attempt A1 and the create call times out. Recovery should query A1 before creating A2; the lookup must still enforce user ownership. An accepted or paid order continues through the original display and verified-result processing.
If the query remains inconclusive, keep the order under reconciliation and follow the agreed technical or manual process. Start another attempt only when the previous attempt can be ended under the applicable rules, while preserving both records.
Distinguish duplicate notifications from two real payments
Repeated notifications for one verified transaction should return its existing fulfillment outcome. If A1 and A2 both actually succeed, reconcile two payments against one purchase intention under the published after-sales rules; do not erase one or automatically deliver two entitlements.
Test double taps, refreshes, network changes, lost responses after acceptance, and notification/query races. Compare attempt counts, confirmed payments, balance entries and entitlements to demonstrate that a browser retry cannot silently become an extra charge.
Frequently asked questions
Is disabling the button briefly enough?
No. Multiple tabs, devices, refreshes and server retries can bypass that protection. Durable order constraints are still needed.
Does reusing an order identifier always return the same checkout?
Do not assume that. Confirm the actual collection API’s duplicate-identifier behavior before enabling automatic resubmission.