All routes require an authenticated Medusa Admin user. Unauthenticated requests return
401.Status values
| Value | Meaning |
|---|---|
open | Case is newly opened |
retry_scheduled | Last retry failed with a retryable error; next retry is scheduled |
retrying | Retry is currently in flight |
awaiting_manual_resolution | Automatic retries are exhausted; manual action required |
recovered | Payment was collected; case is closed |
unrecovered | Case is closed as permanently unrecoverable |
processing, succeeded, failed.
GET /admin/dunning
Returns the paginated dunning queue for Admin DataTable views.Query parameters
Number of results per page.
Zero-based result offset for pagination.
Free-text search across subscription reference, customer name, and product title.
Field to sort by. Database-backed:
updated_at, status, next_retry_at, attempt_count, max_attempts, last_attempt_at. In-memory: last_attempt_status, subscription_reference, customer_name, product_title, order_display_id.Sort direction. One of
asc or desc.Filter by case status. Accepts a single value or an array.
Filter to cases for a specific subscription.
Filter by the originating renewal cycle ID.
Filter by the renewal order ID.
Filter by payment provider ID.
Filter by the last payment error code (e.g.
card_declined).Minimum number of attempts filter.
Maximum number of attempts filter.
ISO datetime lower bound for
next_retry_at.ISO datetime upper bound for
next_retry_at.Filter by the status of the most recent attempt.
Response
Array of dunning case list items.
Total matching records.
Page size used.
Result offset used.
Response example
Errors
| Code | Error | Meaning |
|---|---|---|
400 | invalid_data | Invalid query parameter shape, unsupported query value, or unsupported sort field |
GET /admin/dunning/:id
Returns the full detail payload for a single dunning case, including the full attempt history and retry schedule.Path parameters
Dunning case ID.
Response
Returns adunning_case object with all list fields plus:
Response example
Errors
| Code | Error | Meaning |
|---|---|---|
404 | not_found | Dunning case does not exist |
POST /admin/dunning/:id/retry-now
Immediately runs the dunning payment retry workflow for a case, ignoring its schedulednext_retry_at. Retryable failures keep the case in retry_scheduled; permanent failures close it as unrecovered.
Path parameters
Dunning case ID.
Body parameters
Optional reason for the manual retry.
Request example
Errors
| Code | Error | Meaning |
|---|---|---|
404 | not_found | Dunning case does not exist |
409 | conflict | Retry is already processing, the case is terminal, or the transition is otherwise illegal |
POST /admin/dunning/:id/mark-recovered
Closes a dunning case as recovered through a manual operator action. Use this when payment was collected outside the normal retry flow.Path parameters
Dunning case ID.
Body parameters
Optional reason for the manual recovery.
Request example
Errors
| Code | Error | Meaning |
|---|---|---|
404 | not_found | Dunning case does not exist |
409 | conflict | Case is already recovered, already unrecovered, or a retry is in flight |
POST /admin/dunning/:id/mark-unrecovered
Closes a dunning case as permanently unrecovered through a manual operator action.reason is required for this action.
Path parameters
Dunning case ID.
Body parameters
Reason for closing the case as unrecovered. Required.
Request example
Errors
| Code | Error | Meaning |
|---|---|---|
404 | not_found | Dunning case does not exist |
409 | conflict | Case is already recovered, already unrecovered, or a retry is in flight |
POST /admin/dunning/:id/retry-schedule
Overrides the retry policy for a single dunning case and updates future automatic retries.max_attempts must equal the number of entries in intervals.
Path parameters
Dunning case ID.
Body parameters
Array of retry intervals in minutes. Each value must be a positive integer.
Maximum number of retry attempts. Must be a positive integer equal to the length of
intervals.Optional reason for the schedule override.
Request example
Errors
| Code | Error | Meaning |
|---|---|---|
400 | invalid_data | Invalid payload shape, non-positive interval values, or max_attempts does not match the number of intervals |
404 | not_found | Dunning case does not exist |
409 | conflict | Case is terminal, a retry is in flight, or the override would create an illegal transition |