admin

Job Expire Grace

Hourly job over rows that carry a grace date.

Soft landing (mnemoverse-workspace DUNNING-DESIGN-2026-10-08): a past_due episode ends when Stripe ends it — paid → active, cancelled → Free — so this job never changes a past_due status. It does two things for them:

  • day 14 (7 days before grace_until): one reminder email per episode, recorded in payment_reminder_sent_at;
  • grace_until + PAST_DUE_UNRESOLVED_AFTER_DAYS: count the row as unresolved; the workflow fails on a non-zero count so a person looks.

over_limit rows whose grace expired are only reported; the write guard enforces that block lazily.

Idempotent: a reminded row is not reminded again; nothing else is written. Called every hour by .github/workflows/grace-expiration-cron.yml.

post/api/v1/admin/jobs/expire-grace

Request

  • Base URL: https://core.mnemoverse.com
  • URL: https://core.mnemoverse.com/api/v1/admin/jobs/expire-grace
  • Auth: API key in header X-Admin-Key

Response

Successful Response

scannedinteger required

past_due and over_limit rows with a grace date

remindedinteger required

past_due rows claimed for the day-14 reminder in this run. The claim is recorded before the send, so a send that failed is counted here too and logged as payment_reminder_email_send_failed

unresolvedinteger required

past_due rows Stripe should have ended days ago (lost webhook, changed Stripe settings); reported, not touched

over_limit_expiredinteger required

over_limit rows whose grace expired (writes now blocked lazily)

Changes

No recorded changes to this operation across all 1 revision of this API.