Minting Lifecycle
Overview
Every mint request follows a deterministic lifecycle from submission through to completion. This page describes each stage, the state transitions involved, and what happens when something fails.
Mint request submission
A mint request begins when someone submits it through the Minting Wizard or programmatically through the API.
Submission performs the following atomically:
Preflight validation
Confirms the product is mint ready: active commercial status and all required DPP fields populated.
If a preflight check fails, the request returns a structured list of blocking reasons and creates no records.
Job state transitions
Batch status transitions
The mint batch status mirrors the job lifecycle. When the job reaches COMPLETED, the batch becomes minted and records the final minted_quantity.
Processing cycles
During the PROCESSING phase:
- Units are generated in high throughput cycles.
- Each cycle inserts units with resolver URLs, serial numbers for serial mode jobs, and the appropriate status.
- The worker continues until the requested quantity is reached or an error occurs.
- Large jobs continue automatically across multiple worker invocations until the job is complete.
Failure and retry semantics
- If a processing cycle hits an error, the error is recorded and the job’s error count increases.
- The job stays eligible for retry until it exhausts its allowed attempts.
- After that, the job moves to
FAILEDwith the last error message preserved. - Partial progress is preserved. Units generated before the failure remain in place.
Idempotency
Mint requests support client provided idempotency keys. When a duplicate request arrives with the same key:
- The existing job and batch are returned.
- No new records are created.
- The response includes
is_duplicate: trueto flag the idempotent match.
Idempotency keys make it safe to retry a mint submission after a network failure or timeout, without any risk of issuing a second batch.
Background continuation
Large jobs are designed to complete without user intervention:
- The background worker picks up queued and in progress jobs.
- Jobs are processed oldest first.
- A soft lock ensures only one worker processes a given job at a time, preventing duplicate units.
Token lifecycle
Activation has two modes chosen on the mint request. Activated at mint makes the passport live the moment it is issued. Manual activation issues the token inactive so the brand can make it live later, for example when the unit is packed, shipped or sold.