Skip to content

Retries & Idempotency

A delivery is considered successful when your endpoint responds with HTTP 2xx within 10 seconds. Anything else (timeout, 4xx, 5xx, network error) triggers retry.

ParaSta retries up to 24 times over 3 days with exponential backoff. The full schedule:

AttemptAfter
11 minute
25 minutes
330 minutes
41 hour
56 hours
612 hours
7+24 hours each (until 24 attempts total)

After the final attempt, the event is marked delivery_failed and stops retrying. You can manually re-deliver from the dashboard.

Because retries can deliver the same event multiple times, always dedupe by event.id:

const seen = await db.webhookEvents.findUnique({ where: { id: event.id } });
if (seen) return res.json({ received: true });
await db.webhookEvents.create({ data: { id: event.id, ... } });
// ...process

Treat event.id as a unique constraint in your storage. Idempotency window is at least the 3-day retry window — keep records for at least 7 days for safety.

Idempotency on the request side (Idempotency-Key)

Section titled “Idempotency on the request side (Idempotency-Key)”

For your outbound POST requests to ParaSta (creating Payments, Checkout Sessions, Refunds), include an Idempotency-Key header. ParaSta caches the response for 24 hours; subsequent requests with the same key + same body return the cached response. Different bodies with the same key return 409 idempotency_error.

Idempotency-Key: order_4567_create_payment

Use a stable key (your internal order ID) so retries from your side don’t create duplicate Payments.