- Issuing a KYC credential the moment a user passes identity verification
- Issuing an attendance credential when a venue scan detects a fan’s check-in
- Issuing a subscriber tier credential at the end of each billing cycle
- Issuing a loyalty credential triggered by a purchase event
Direct issuance vs hosted Issuer BackendUse direct issuance when you don’t want to run a live backend. If you need queryable available credentials and on-demand issuance triggered through the SDK, use the hosted Issuer Backend instead. Both paths sign with issuer-controlled keys and store an encrypted envelope in DStorage.
Direct issuance is not a single turnkey API call. You run it through the
air-issuer-service tool — either as a job that reads a CSV of recipients, or as your own script replicating the same logic. Under the hood it calls the AIR issuance endpoints (initialize-user, then dstorage/vcs); see the Issuance API Reference.How it works
Custom jobs using the current v1 API follow this flow. The bundled CSV runner performs the same issuance steps but uses the legacy v2 bootstrap request described above.- A backend event fires — KYC passed, purchase confirmed, check-in scanned — or your custom batch begins.
- Your job loads its environment: issuer signing keys and DID, schema and program configuration, Partner auth, DStorage config, and source data access.
- Your job calls
initialize-userwith the recipient’s email to resolve or create the user’s AIR Account, receiving the user DID and public key. The email is passed here in the request body — not in the Partner JWT. - Your job retrieves the user’s source data.
- Your job builds the VC, signs it with issuer-controlled keys (
BJJ_SIG_2021), and encrypts it to the returned user public key. - Your job stores the encrypted VC envelope via
dstorage/vcsand records the returnedstoragePath. - The user presents the credential later at any verifier; no action needed at issuance time.
Prerequisites
Before running direct issuance you need:- Credential services enabled — Generate your Issuer DID with
air-issuer-serviceand register it with AIR to unlock issuer functionality. See the activation flow in Issuing Credentials. - Partner ID and Issuer DID — Partner ID from the Developer Dashboard (Accounts → General). Your Issuer DID is derived from your own signing keys; AIR does not generate it for you.
- Issuance program — A published credential program in the dashboard (Issuer → Programs).
- JWKS endpoint — A public URL serving your public key for JWT verification. See Partner Authentication.
Auth for custom v1 jobs
Custom v1 direct issuance authenticates via a Partner JWT attached to each request, signed withscope: "issue". The JWT does not carry an email claim — the recipient is identified when you call initialize-user. For setup, key generation, and examples see Partner Authentication.
Recipient email for custom v1 jobs
For the v1 contract, the recipient’s email is the routing key that determines which AIR Account the credential lands in. Supply it in theinitialize-user request body, not the JWT. Because it is the routing key:
- Resolve the recipient’s email from the triggering event or CSV row; never hardcode a shared value.
- Never reuse a partner, service, or admin email as a recipient.
- Dedupe by recipient email + program ID before issuing, so an event replay or loop can’t fan out to the wrong account.