Upgrading payment callback jobs without losing old orders: message versions and compatible readers
A notification may be safely received while its background job keeps failing because a new required field was introduced. Preserve the old payload and payment link before changing anything. This guide concerns the merchant’s internal job contract, not new 稳付pay notification fields.
Continue by topic
1. Confirm commercial scope and the migration boundary
WeChat Pay, Alipay and UnionPay availability follows the formal configuration. An internal schema rollout does not change channel fees or transaction and daily limits. Ask the team about eligibility, extra costs and configuration if products or sites also change. Merchant USDT settlement after CNY collection uses TRON/TRC20 only; confirm quotes, fees, triggers and timing separately from job execution.
This applies to owned or authorized businesses with durable notification intake and a job queue. Inventory old/new examples, producer and consumer versions, backlog, quarantine and rollback ownership. Record successful payment, business credit or entitlement delivery, and merchant settlement separately. A failed job neither cancels a verified payment nor authorizes another credit.
2. Version internal messages and retain stable identities
Document meanings, required fields, defaults and sensitivity. An internal schema_version is an illustrative merchant choice, not a 稳付pay parameter. Optional additions can be compatible when meaning is unchanged. Renames, removals, amount-unit changes or account changes require an explicit mapping. Never default a missing amount to zero or a missing owner to the currently logged-in user.
Example: version 1 contains fictional order DEMO-71-A and 1200 minor units; version 2 adds a fulfillment type. Resolve that type from the original product snapshot. If the snapshot is unavailable, quarantine rather than guess. Preserve the original payment claim and order fulfillment key across conversion. A new message ID or version must not enable another delivery. Formal parameters and keys stay server-side.
3. Upgrade readers before switching writers
First deploy consumers that understand both versions, then test old fixtures against the original expected outcomes. Enable a small version-2 producer cohort, inspect backlog, unknown versions, parser failures and delivery outcomes, and expand deliberately. A version-1-only consumer must not randomly receive version 2; use capability-based routing or separated queues where necessary, implemented by the merchant.
Continue verifying notifications against the formal contract, matching merchant, order, amount, currency and success before durable acknowledgement. Conversion does not authenticate payment. A business transaction uses stable unique keys to issue credit or access once and persist delivery work. Resolve unknown external delivery results through the original receipt. Before rolling code back, establish that the older program can read messages already produced.
4. Retire old readers only after backlog acceptance
Use fictional orders in isolation to test late old messages, duplicates, unknown versions, missing fields, concurrent consumers and restarts during rollout. Deliver both version 1 and converted version 2 for DEMO-71-A twice. Expect one valid payment claim and one delivery. Invalid jobs remain in quarantine with an owner and review outcome; never silently discard them.
Reconcile verified payments against jobs, delivered benefits and unresolved cases by order and amount. An empty queue does not prove fulfillment. Retire old-reader logic only after checking old producers, delayed retries, archived replay requirements and retention policy. Database uniqueness documentation explains duplicate protection; the merchant determines message versions and retention windows for its actual system.
Frequently asked questions
Does every optional field require a second queue?
No. A reader that safely ignores or understands the field without changing meaning can support a compatible rollout. Separate traffic when mixed consumers could misinterpret it, and test the complete consumption path.
Can a new ID repair an old failed job?
An ID does not restore missing meaning and may bypass deduplication. Retain payment, order and delivery identities with an auditable conversion map; quarantine insufficient evidence.