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
| Type | Purpose |
|---|---|
| matching | Match PENDING incoming transactions to expected ones via LedgerMatch. Uses REST or gRPC per tenant settings. |
| stripe-sync | Sync charges from Stripe for all enabled Stripe connections in the tenant/environment. |
| webhook-retry | Retry failed webhook delivery attempts. Runs periodically. |
| cleanup | Retention cleanup (audit logs, completed jobs, expired matches). Uses jobSchedulingPreferences retention settings. |
| data-fetch | Generic data fetch (future). |
| reconciliation | Full reconciliation run (future). |
Triggers
| Trigger | How the job runs |
|---|---|
| MANUAL | You call POST /jobs/:id/trigger. Use for one-off syncs or matching. |
| SCHEDULED | Cron from jobSchedulingPreferences (e.g. matchingSchedule, stripeSyncSchedule). The scheduler creates jobs at the configured times. |
| EVENT | Triggered 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 - Cancel —
POST /jobs/:id/cancelto 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.