QFind anything/
API Reference

Jobs

Jobs run reconciliation tasks—matching, Stripe sync, webhook retries, cleanup. They can be triggered manually, scheduled via cron, or started by domain events.

What are jobs

Jobs are background tasks that run reconciliation, data sync, matching, and maintenance. Each job has a type (matching, stripe-sync, webhook-retry, cleanup, etc.), a trigger (manual, scheduled, or event-driven), and a status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED).

Jobs are scoped to a tenant and environment. You can list jobs, trigger them manually, or cancel running ones.

Job types

TypePurpose
matchingMatch PENDING incoming transactions to expected ones via LedgerMatch. Uses REST or gRPC per tenant settings.
stripe-syncSync charges from Stripe for all enabled Stripe connections in the tenant/environment.
webhook-retryRetry failed webhook delivery attempts. Runs periodically.
cleanupRetention cleanup (audit logs, completed jobs, expired matches). Uses jobSchedulingPreferences retention settings.
data-fetchGeneric data fetch (future).
reconciliationFull reconciliation run (future).

Triggers

TriggerHow the job runs
MANUALYou call POST /jobs/:id/trigger. Use for one-off syncs or matching.
SCHEDULEDCron from jobSchedulingPreferences (e.g. matchingSchedule, stripeSyncSchedule). The scheduler creates jobs at the configured times.
EVENTTriggered by domain events (e.g. auto-match creates a matching job when a new incoming transaction arrives and autoMatchEnabled is true).

Configure schedules in Job Scheduling.

Creating jobs

Create a job with POST /jobs specifying type, trigger, and optional schedule (for SCHEDULED) or config. For matching jobs, config can include batch size. For stripe-sync, the job uses tenant settings (e.g. maxChargesPerStripeSync).

Monitoring and cancellation

  • List jobs — Filter by status, type, tenant, environment
  • Retrieve job — Get current status, lastRunAt, errorMessage, completedAt
  • CancelPOST /jobs/:id/cancel to stop a running job

Failed jobs store errorMessage for debugging. COMPLETED jobs retain completedAt and any result metadata.

API Reference

For job creation parameters, trigger payloads, and request/response samples, see Jobs in the API Reference.