Payment Charged but Order Not Created

Customer was charged successfully but no order appears in the system. The client contacts support with no reference on file. Funds are in the bank, order is missing — caused by a severed webhook callback between the two.

Urgency: Critical · commercial loss · Category: Orders & Payments

Field Observations

The customer sees the charge on their card statement and receives the bank confirmation SMS. However, their cart remains full, no order confirmation displays, and no record appears in admin. The crisis starts when they call support.

Observed System Error Signatures

  • Webhook endpoint: 404 / 500 / timeout
  • Payment gateway panel: callback failed · retry 3/3 → A · Callback undelivered
  • App logs contain no trace of payment reference
  • HTTP 302 - notification fails to follow redirect → A · Callback undelivered

Every webhook dispatch attempt is logged in the payment gateway dashboard. Checking provider logs is faster than codebase debugging: it reveals retry counts and HTTP response codes directly.

Three Potential Root Causes & Differential Tests

A · Callback undelivered

Gateway sent webhook but endpoint URL was invalid, firewalled (WAF), or blocked.

Differential test: Are webhook retry logs visible in gateway panel?

Evidence: 404 or timeout in gateway panel → A

Resolution: Fix endpoint URL + whitelist WAF

Common anti-pattern fix: Asking the customer to reorder fails because mismatched bank authorizations create unresolved reconciliation discrepancies in accounting.

B · Callback unhandled (500)

Webhook arrived but application threw unhandled exception. Retries repeated the crash.

Differential test: Did webhook arrive but throw 500 fatal error?

Evidence: HTTP 500 + retry loop in logs → B

Resolution: Patch exception + queue job buffer

Common anti-pattern fix: Returning an empty 200 OK to swallow webhook errors halts provider retries, causing the missing order to vanish permanently.

C · Validation drop (Silent 200)

Webhook returned HTTP 200 but order insertion failed silently due to internal validation drops.

Differential test: Was 200 returned without creating order record?

Evidence: HTTP 200 returned but no row → C

Resolution: Log validation + guarantee atomic insert

Common anti-pattern fix: Restarting the database forcibly clears locks, but uncommitted suspended transactions prevent pending paid carts from ever being written.

Who resolves it

Senior backend engineer. Permanent resilience requires decoupling ingestion from execution via message queues: ingest webhook payload to broker first, then process asynchronously.

Impact If Left Unresolved

Every dropped webhook is a charged client with an empty basket. These remain invisible until chargebacks and support escalations arrive.

Related Concepts & Services

→ Emergency Incident Triage & Crash Test

Trend Master Akademi Studio & Labs

B2B White-Label Engineering Desk | Tel: +90 534 371 35 73 | Email: info@trendmasterakademi.com

Address: Akdeniz Mah. Sehit Fethibey Cad. Heris Tower No: 55 Ic Kapi No: 091 Konak / Izmir