Skip to content
Hardcount
Run it locally
Pre-1.0 · one maintainer · Stripe and cards only · no SDKs (client libraries) yet · no production users yet. Docs describe v0.12.0 (30 Nov 2026) · What’s new →

The dunning run object

A dunning run: the payment retries for one unpaid invoice. Dunning is retrying a failed or missing payment on a schedule (the account’s dunning policy for the run’s mode), and running the policy’s final action when the retries run out. Each invoice has at most one run.

{
"id": "hc_drun_dc7m3m2q3gpgqfoq5c70",
"tenant_id": "hc_ten_dajqj02q3gpgqfoq5c00",
"invoice_id": "hc_inv_dbj84b2q3gpgqfoq5c40",
"customer_id": "hc_cus_dakhnk2q3gpgqfoq5c0g",
"state": "active",
"reason": "payment_failed",
"attempt_count": 1,
"last_attempt_at": "2026-11-04T00:05:03Z",
"next_action_at": "2026-11-08T00:05:03Z",
"paused": false,
"created_at": "2026-11-01T00:05:03Z",
"updated_at": "2026-11-04T00:05:04Z",
"invoice_number": "HC-000042",
"invoice_amount_due_cents": 8650,
"invoice_currency": "USD",
"max_retry_attempts": 3
}
Field Type Always present What it means
id string Yes Unique identifier of the run, starting hc_drun_.
tenant_id string No The account the run belongs to. Absent when empty.
invoice_id string Yes The invoice the run collects.
customer_id string No The invoice’s customer. Absent when not recorded.
state enum Yes active: retries are running. escalated: retries ran out (resolution is retries_exhausted). resolved: the run ended another way; see resolution. One of: active, escalated, resolved.
reason string No Why the run started: payment_failed (a charge was declined or refused) or no_payment_method (the customer had no card, so nothing was charged). Absent when not recorded.
attempt_count integer Yes How many retries have run so far.
last_attempt_at string (date-time) No When the last retry ran. Absent before the first retry.
next_action_at string (date-time) No When the run acts next: the next retry, or the final action once the retries are used. Absent when the run has ended.
paused boolean Yes True while an operator has paused the run by hand, so its retries are skipped. The runbook for a run that keeps panicking does this. No API route pauses or resumes a run.
resolved_at string (date-time) No When the run ended, resolved or escalated. Absent while it is active.
resolution enum No How the run ended, set when it is resolved. Exception: action_failed is set on a run that is still active. The final action (cancel or mark uncollectible) failed and will be retried at next_action_at. amount_below_minimum: a charge on the invoice was refused by Stripe because the amount is below its minimum charge, so the run ended without its final action. Absent while the run is active. One of: payment_recovered, invoice_voided, invoice_not_collectible, retries_exhausted, action_failed, amount_below_minimum.
created_at string (date-time) Yes When the run started: when the payment failed or the collection found no card.
updated_at string (date-time) Yes When the run last changed.
invoice_number string No The invoice’s number. Filled in on list responses.
invoice_amount_due_cents integer (int64) No What the invoice still owes, in the currency’s minor unit (cents for USD). Filled in on list responses; absent when 0.
invoice_currency string No The invoice’s currency. Filled in on list responses.
max_retry_attempts integer No How many retries the run’s policy makes: the length of its retry_days. Filled in on list responses. When attempt_count has reached it, no charge is retried: next_action_at is when the final action (cancel or mark uncollectible) runs.

Stuck, or found a bug? Ask in Discussions · Open an issue