Skip to main content
The dunning case endpoints expose the Admin dunning queue and let you manage individual payment recovery cases. You can list open or scheduled cases for DataTable views, fetch a full detail payload including attempt history and retry schedule, trigger an immediate retry, close a case manually as recovered or unrecovered, and override the retry schedule for a single case. All routes require an authenticated Medusa Admin user. All mutations are workflow-backed and return the refreshed detail payload.
All routes require an authenticated Medusa Admin user. Unauthenticated requests return 401.

Status values

Attempt status values: processing, succeeded, failed.

GET /admin/dunning

Returns the paginated dunning queue for Admin DataTable views.

Query parameters

number
Number of results per page.
number
Zero-based result offset for pagination.
string
Free-text search across subscription reference, customer name, and product title.
string
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.
string
Sort direction. One of asc or desc.
string | string[]
Filter by case status. Accepts a single value or an array.
string
Filter to cases for a specific subscription.
string
Filter by the originating renewal cycle ID.
string
Filter by the renewal order ID.
string
Filter by payment provider ID.
string
Filter by the last payment error code (e.g. card_declined).
number
Minimum number of attempts filter.
number
Maximum number of attempts filter.
string
ISO datetime lower bound for next_retry_at.
string
ISO datetime upper bound for next_retry_at.
string | string[]
Filter by the status of the most recent attempt.

Response

object[]
required
Array of dunning case list items.
number
required
Total matching records.
number
required
Page size used.
number
required
Result offset used.
Response example

Errors


GET /admin/dunning/:id

Returns the full detail payload for a single dunning case, including the full attempt history and retry schedule.

Path parameters

string
required
Dunning case ID.

Response

Returns a dunning_case object with all list fields plus:
object
required
Response example

Errors


POST /admin/dunning/:id/retry-now

Immediately runs the dunning payment retry workflow for a case, ignoring its scheduled next_retry_at. Retryable failures keep the case in retry_scheduled; permanent failures close it as unrecovered.

Path parameters

string
required
Dunning case ID.

Body parameters

string
Optional reason for the manual retry.
Request example

Errors


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

string
required
Dunning case ID.

Body parameters

string
Optional reason for the manual recovery.
Request example

Errors


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

string
required
Dunning case ID.

Body parameters

string
required
Reason for closing the case as unrecovered. Required.
Request example

Errors


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

string
required
Dunning case ID.

Body parameters

number[]
required
Array of retry intervals in minutes. Each value must be a positive integer.
number
required
Maximum number of retry attempts. Must be a positive integer equal to the length of intervals.
string
Optional reason for the schedule override.
Request example

Errors