Refunds
Automatic credit refunds for failed and cancelled audits.
CiteFlow auto-refunds credits based on what caused the audit to not
complete. You never need to ask for a routine refund — the engine
flags the failure reason, the refund worker applies the matrix, and a
partner_credit_transactions row of type refund lands in your ledger.
Refund matrix
| Failure reason | Refund | Why |
|---|---|---|
timeout | 50% | Engine consumed resources but didn't finish. |
engine_error | 50% | Trust signal — our infra problem, ~92% gross margin allows it. |
blocked_by_policy | 50% | Target site WAF/robots blocked us; we got partway. |
partner_input | 0% | The request itself was bad (e.g. URL doesn't resolve, returns 404). |
cancelled_by_user (queued) | 100% | No engine work started. |
cancelled_by_user (processing) | 50% | Engine already running. |
Numbers are floor()-rounded credits. Example: a 150-credit all audit
that times out refunds floor(150 * 0.50) = 75 credits.
Where you see the refund
GET /audit/{id} response
{
"data": {
"status": "failed",
"failure_reason": "timeout",
"credits": { "charged": 150, "refunded": 75 }
}
}Webhook event
audit.failed and audit.cancelled carry the refund amount:
{
"type": "audit.failed",
"data": {
"audit_id": "...",
"status": "failed",
"failure_reason": "timeout",
"credits": { "charged": 150, "refunded": 75 }
}
}CiteFlow sends a Refund Issued email per refund, batched if multiple
land in a short window.
Ledger
/dashboard/api/billing shows a partner_credit_transactions table
with type='refund'. The related_audit_id column links back to the
failed audit.
Idempotency
The refund worker is idempotent: it only refunds if
partner_audits.credits_refunded == 0. Re-running it (manually or via
re-delivery) is safe.
Manual refunds
If something is missed (rare), email partners@citeflow.io with the
audit_id and request_id. Our team can issue a one-off
partner_credit_transactions row of type adjustment.
What's NOT refunded
- Successful audits — even if the scores were low.
- Audits cancelled in a terminal state — they already paid out per the matrix.
- Cancelled top-ups — Stripe Checkout sessions that never paid don't create credits; nothing to refund. Buyer can simply not pay.