All workflows

Retry Policy Plan

Plan safe retries for transient API failures, 429 responses and timeouts with bounded backoff, idempotency and side-effect checks.

1 credit per call · $0.002 USDC with x402

Sample input

{
  "attempt": 1,
  "max_attempts": 4,
  "status_code": 429,
  "error_code": "rate_limited",
  "idempotent": true,
  "side_effect_possible": false,
  "retry_after_ms": 1500
}

Worked sample output

{
  "ok": true,
  "mode": "retry_policy_plan",
  "decision": "retry",
  "reason": "transient_failure",
  "current_attempt": 1,
  "max_attempts": 4,
  "idempotent": true,
  "side_effect_possible": false,
  "status_code": 429,
  "error_code": "rate_limited",
  "schedule": [
    {
      "attempt": 2,
      "delay_ms": 1500
    },
    {
      "attempt": 3,
      "delay_ms": 1000
    },
    {
      "attempt": 4,
      "delay_ms": 2000
    }
  ],
  "limitations": [
    "This is a transport retry policy, not proof that a downstream action is safe to repeat. Mark side effects accurately and use a real idempotency key when supported."
  ]
}

Worked example using published sample data only. Own-data execution is paid.

Connect in curl

Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.

curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/retry-policy-plan' \
  -H "Authorization: Bearer $BOUNTY_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: workflow-request-001' \
  -H 'X-Max-Credits: 1' \
  --data '{"attempt":1,"max_attempts":4,"status_code":429,"error_code":"rate_limited","idempotent":true,"side_effect_possible":false,"retry_after_ms":1500}'

Connect in n8n

Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.

Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/retry-policy-plan. Send JSON and these headers; store the Bearer token as a private credential.

{
  "method": "POST",
  "headers": {
    "Authorization": "Bearer YOUR_PRIVATE_API_KEY",
    "Content-Type": "application/json",
    "Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
    "X-Max-Credits": "1"
  },
  "body": {
    "attempt": 1,
    "max_attempts": 4,
    "status_code": 429,
    "error_code": "rate_limited",
    "idempotent": true,
    "side_effect_possible": false,
    "retry_after_ms": 1500
  }
}

Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe