Charged, but no order exists
With automatic capture on, the shop authorises the card, then fails to create the order because a stock lock times out. The customer sees an error and tries again. Minutes later the payment provider's capture webhook arrives for a reference the shop has no order for, and the handler drops it without a trace.
also: partial refund on a split-tender order (voucher + card)psp.authoriseOk(); orders.failNext('create', 'lock timeout') const res = await checkout(basket, card) await psp.deliverWebhook('captured', res.ref) const captured = psp.captures(res.ref) expect(captured.length === 0 || orders.exists(res.ref)).toBe(true)

