Rotating payment signing keys with open orders: cutover rules, callbacks and reconciliation
An old order may still receive callbacks after a signing-key change. Its creation time alone does not determine which key signs a later message, and failed verification does not prove payment failed. Agree on the real cutover rules before changing merchant configuration. This is a merchant implementation plan, not a claim that 稳付pay offers dual keys or a key-version field.
Continue by topic
1. Map the rule for each message direction
List order creation, payment queries and callbacks separately, including their authentication rules, merchant ownership, environment, activation boundary and responsible person. A request key is not automatically the key for a later callback. Establish whether the actual sender follows current configuration, an order snapshot or another documented rule.
Inventory open orders and notifications that may still be retried. Track original order reference, creation time, verified payment status, notification handling and the agreed investigation route. An internal configuration label is for audit; do not add it to API fields or signed content.
2. Prepare configuration and bound any overlap
Exchange replacement secrets through the agreed secure channel. Use synthetic merchant-side fixtures to check encoding and the actual signing specification. Log configuration labels, outcomes and references, not keys, complete signing inputs or reusable credentials.
Use an overlap only if the provider explicitly supports it. Define eligible messages, expiry and removal of old configuration. Do not try every historical key on every failed message or fulfill orders without verification. If overlap is unsupported or unknown, agree on reconciliation for affected messages before cutover.
3. Exercise a delayed order and a duplicate
Create synthetic A before cutover and B after it. Delay A’s callback and deliver B’s notification twice. Select configuration by the agreed message rule; verify authenticity, merchant, original order, amount, currency and actual success before applying business effects. Record the version used without exposing its secret.
Failed verification puts A into review, not into paid, refunded or unpaid state. Confirm it through the agreed trusted query or technical investigation. Queries and notifications must share one idempotent accounting entry point. B produces one fulfillment even when several valid notifications arrive. A and B are internal examples, not platform fields.
4. Treat suspected compromise separately
A routine rotation can finish its agreed overlap. Suspected exposure requires the security response instead: revoke affected trust, restrict automatic fulfillment and investigate the risk window through a newly trusted route. A valid signature made with an exposed secret is not sufficient proof of authenticity.
Close only after unresolved orders have evidence, old configuration is retired as agreed and failures are explained. Rolling back application code must not reactivate a revoked secret. Include wrong environments, unknown versions, mismatched amounts, configuration failures and failed database commits in synthetic tests. Assign an owner and next action to every unknown outcome.
Frequently asked questions
Can order creation time select the key?
Only if the real protocol explicitly defines that mapping. Otherwise confirm the callback signing rule; nearby timestamps are not authentication evidence.
Should customers pay again after signature failure?
No. Investigate the original payment first so a paid order is not charged twice. Keep it under review until trusted verification and accounting complete.