BlogPricing

Payment webhook retry and error flow

A robust payment webhook handler flowchart: idempotency check first, then process, then exponential backoff retries on failure, with a dead-letter queue and manual review path.

Start for free
Payment webhook retry and error flow diagram preview
Recreate this in Raltey

Copy this prompt

Paste this into Raltey's AI agent to generate the same diagram, then tweak it on the canvas.

Prompt
Create a flowchart for a payment webhook handler. On webhook received, check idempotency by event id. If already processed, acknowledge and exit. Otherwise process the payment event. On success, log and ack. On failure, decide if the error is retryable; if yes, enqueue a retry with exponential backoff, otherwise send to a dead-letter queue and page on-call. After max retries, also DLQ.

Context

  • - Idempotency by event id on the first step.
  • - Exponential backoff: 30s, 2m, 10m, 1h.
  • - After max retries, route to DLQ for manual review.

Patterns

  • - Idempotency check before processing.
  • - Acknowledge fast for duplicates.
  • - Exponential backoff with a maximum retry count.
  • - DLQ + on-call paging for unrecoverable failures.
Diagram structure

Nodes and connections

Webhook receivedstart
Already processed?decision
Acknowledge (200 OK)action
Process payment eventaction
Success?decision
Log success + ackaction
Retryable error?decision
Enqueue retry (backoff)action
Retries exhausted?decision
Send to DLQaction
Page on-call for reviewaction
Endend
Connections
Webhook receivedAlready processed?
Already processed?Acknowledge (200 OK)yes
Already processed?Process payment eventno
Process payment eventSuccess?
Success?Log success + ackyes
Success?Retryable error?no
Retryable error?Enqueue retry (backoff)yes
Retryable error?Send to DLQno
Enqueue retry (backoff)Retries exhausted?
Retries exhausted?Send to DLQyes
Retries exhausted?Process payment eventno
Send to DLQPage on-call for review
Log success + ackEnd
Acknowledge (200 OK)End
Page on-call for reviewEnd

Notes from the field

Frequently asked

Which errors are "retryable"?

Network timeouts, 5xx from downstream services, lock contention. 4xx responses and validation errors are not retryable and should go straight to DLQ.

Is this free?

Raltey's Free plan includes the AI agent, 5 projects, and 10 AI generations per month. No credit card required.

More templates

Open this template in Raltey

Edit it on the canvas, ask the AI agent to extend it, then share or export.

Start for free