AgentBIAgent with Business Intelligence for DTC sites

Back to the knowledge base

OPT-4

Payment-failure recovery and order idempotency

Published:2026-11-21Views:0

Recovery from a failed payment belongs in repeated sandbox rehearsals: retrying the same order, delayed webhooks, and duplicate submissions after a timeout must all converge on a single order state — never a second charge or a second pending-shipment row. The key is an idempotency key, typically order id plus attempt number, used server-side for de-duplication.

Rehearsals should check 'what the user saw' separately from 'what the backend actually did': a success message with a still-unpaid order, or an arrived webhook with a still-failed page, are chain defects to fix, not user errors.

This article discusses failure recovery and idempotency in the sandbox only; it does not touch real payments, make compliance judgements, or rehearse against real orders. Rehearsal records are archived for a retention period, with expired credentials and fake accounts destroyed.

Official references

2026-11-22