Tugus Docs

Error Handling & Retry

Queue-based event processing, retry logic, and collect endpoint status codes.

Tugus processes events queue-based via Laravel Horizon. Delivery failures are retried automatically.

Retry logic

AttemptDelayBehavior
1immediatelyFirst delivery attempt
260sExponential backoff
3300sExponential backoff
4900sFinal attempt
Status → failed, health check alert

HTTP status codes — collect endpoint

StatusMeaning
202Event accepted and queued
400Invalid payload (missing event field, malformed JSON)
401Invalid or unknown API key
422Validation error — see below
429Rate limit exceeded (plan-dependent)

Common 422 causes

The response body names the exact fields, e.g.:

{
  "message": "The data.value field is required. (and 1 more error)",
  "errors": {
    "data.value":    ["The data.value field is required."],
    "data.currency": ["The data.currency field is required."]
  }
}
CauseFix
data.value / data.currency missing on a purchase/refundNest both inside data — they are required for these events.
value/currency sent at the top levelMove them into data. Top-level commerce fields are not read.
value is not numeric (e.g. "99,80")Send a number with a . decimal separator: 99.80.
currency not 3 lettersUse an ISO 4217 code, e.g. EUR.

Checking delivery status

Delivery Health (Commerce Operations) shows the delivery rate and status per platform. Individual deliveries — including failures with the error message from the target API — are listed in the Transmission Log (filter by status). Live incoming events are visible under Live-Monitor.

A 202 from the collect endpoint only means that Tugus accepted the event — not that forwarding succeeded. Check the delivery status separately in the dashboard.