View as Markdown

Self-hosting · Reference

Server configuration

These are the environment variables a self-hosted Provenance API reads. Every setting is optional unless marked required; an unset integration reports itself as not configured instead of returning made-up results.

Core

VariableDefaultWhat it controls
NODE_ENVdevelopmentproduction hardens the posture: weak secrets refuse boot and development routes are off.
API_ENVIRONMENTsandboxsandbox seeds the fixtures on boot; live is for real data.
PORT, HOST8080, 0.0.0.0Where the API listens.
DATABASE_URLunsetA Postgres URL. Unset uses the in-memory store.
DATABASE_POOL_MAX10Postgres connections per replica. Keep replicas × pool under the database's limit.
RATE_LIMIT_BACKENDmemoryWhere rate-limit windows and single sign-on state live. memory is per process, right for one replica; pg shares them through Postgres so several replicas enforce one limit.
SESSION_RATE_LIMIT100Requests a minute for one signed-in console session. API keys and addresses keep their own limits.
DEMO_KEY_RATE_LIMIT1000Requests a minute for each of Provenance's own live demo keys, on a sandbox that runs the demos (DEMO_ACCOUNTS=on). Every other key keeps its own limit; a live deployment ignores it.
REPLICAS1How many API replicas you run. More than one with the memory backend logs a startup warning.
JWT_SECRETdev valueRequired in production: at least 32 characters.
DOCS_BASE_URLhttps://www.provenanceauth.com/docsThe base of doc_url in error bodies. A localhost value refuses boot in live.
EMAIL_MARK_URLhttps://provenanceauth.com/brand/provenance-mark.pngThe Provenance mark beside "Powered by Provenance" in emails when NEXT_PUBLIC_SITE_URL is unset, not an absolute URL, or localhost. Otherwise the mark comes from the site.
E2E_WORLD_RESET_TOKENunsetOn a sandbox with NODE_ENV=production (a staging stack), turns on the operator route that deletes and re-seeds the synthetic test accounts before an end-to-end run. Callers send it in X-World-Reset-Token. Never served in live.

Signing keys

VariableDefaultWhat it controls
INTENT_SIGNING_KEY_PEMephemeral in sandboxRequired in production. The EC P-256 key that signs intent tokens, receipts and manifests; its public half is published at /.well-known/jwks.json.
INTENT_SIGNING_KEY_PEM_PREVIOUSunsetThe previous key during a rotation, kept in the JWKS until its tokens expire.
AP2_ISSUERoffon signs AP2 mandates after a passkey approval and serves /.well-known/ap2/jwks.json.
AP2_ISSUER_KEY_PEMmade at boot in sandboxRequired in production while AP2_ISSUER is on. A separate EC P-256 key that signs AP2 mandates only.
AP2_MANDATE_TTL_SECONDS600How long each issued copy of a closed AP2 mandate lives (never past the intent token inside).
AP2_APP_SIGN_WAIT_SECONDS120How long an approval opened from the Provenance app waits for the app's key before the issuer key signs.
ISSUER_DEADLINE_MARGIN_MS250How long before a card processor hook's budget an issuer decision must answer; past it the program's fail mode answers.
ISSUER_LITHIC_API_BASEhttps://sandbox.lithic.comWhere a decoupled 3-D Secure challenge's answer goes for a Lithic card program that set its API key.
ISSUER_HOLD_HOURS168How long an authorization's hold counts against an agent's card limit when the processor sends no clearing, reversal or expiry for it.
INTENT_TOKEN_ISSUERprovenance-authorizeThe iss claim; set it to your API's public URL.
INTENT_SUBJECT_KEYunset32 random bytes, base64. Keys every token's sub: pairwise per audience (psub_…) or per token (anon_…), never the device id. Required in live; elsewhere a key derived from JWT_SECRET is used. Rotating it gives every device a new subject, and a new pseudonym, at every site.
RISK_SIGNALS_ENCRYPTION_KEYunset32 random bytes, base64. Encrypts risk providers' lookup secrets. In live, adding a provider answers 503 risk_signals_not_configured until it's set; elsewhere a key derived from JWT_SECRET is used.
RISK_SIGNALS_ENCRYPTION_KEY_PREVIOUSunsetThe old RISK_SIGNALS_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key RISK_SIGNALS_ENCRYPTION_KEY to re-seal the rest, then unset it.
TSA_URLunsetAn RFC 3161 timestamp authority for evidence exports and the transparency log. Unset marks timestamps not_configured.

Trace worker

VariableDefaultWhat it controls
TRACE_BACKENDfixture in a sandbox, else noneremote uses your worker; none answers 503 trace_backend_not_configured. fixture is refused in production.
TRACE_WORKER_URL, TRACE_WORKER_TOKENunsetYour worker's URL (https and a public host in production) and its bearer token.
TRACE_MASK_SALT—Required in production: at least 16 random characters, salting the opaque IDs of masked neurons.
TRACE_TIMEOUT_MS, TRACE_INFERENCE_TIMEOUT_MS30000, 120000Worker request timeouts.
TRACE_READING_MAX_AGE_S900How old a reading can be for verify and check.
TRACE_WORKER_KEYS_FREE, TRACE_WORKER_KEYS_PRO, TRACE_WORKER_KEYS_GROWTH1, 1, 5Active sidecar worker keys per plan; Enterprise has no limit.
FREE_TRIAL_TRACE_READINGS1000Signed readings across the Free trial.
PRICE_TIERS_TRACE_READING10000000:0.1,100000000:0.02,1000000000:0.005,inf:0.002The signed-reading tiers, up_to:cents by monthly volume, ending in inf.
TRACE_MAX_PROMPT_CHARS32000The prompt size limit.
TRACE_DEFAULT_MODELqwen3-8bThe hosted model when a request names none.
TRACE_KEEP_WARM_INTERVAL_MS0Pings a serverless worker's /health on this interval to keep the model loaded.
TRACE_BASELINE_MAX_AGE_DAYS, TRACE_BASELINE_SIGMA_FLOOR30, 0.01When a learned baseline goes stale, and the smallest sigma used for z-scores.
TRACE_EXPLAINER_URL, TRACE_EXPLAINER_TOKEN, TRACE_EXPLAINER_TIMEOUT_MSunset, unset, 20000The endpoint behind AI trip summaries. It receives POST {instructions, explanations} and answers {text, model}.
TRACE_EVAL_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Encrypts eval-suite prompt text with AES-256-GCM. Required in live when a trace backend is on; elsewhere a key derived from JWT_SECRET is used, with a startup warning. Replacing it without TRACE_EVAL_ENCRYPTION_KEY_PREVIOUS makes stored suite prompts unreadable.
TRACE_EVAL_ENCRYPTION_KEY_PREVIOUSunsetThe old TRACE_EVAL_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key TRACE_EVAL_ENCRYPTION_KEY to re-seal the rest, then unset it.
TRACE_EVAL_MAX_PROMPTS, TRACE_EVAL_RUNS_PER_HOUR50, 30Prompts per eval suite, and suite runs an account may start per hour.
TRACE_LABELER_API_KEYunsetThe Anthropic key behind neuron labels. Unset (or TRACE_LABELER=none), label requests answer 503 trace_labeler_not_configured.
TRACE_LABEL_MODEL, TRACE_LABEL_RECHECK_MODELclaude-haiku-5-5, claude-sonnet-5-5The first-pass model and the model that re-checks a canary member's label. A model without a list price in the API is refused, so a label is never billed at a guessed price.
TRACE_LABEL_MARGIN_PCT30The margin over model cost on each label.
TRACE_LABELS_PER_HOUR, TRACE_LABELS_MAX_PER_REQUEST200, 20New labels an account may get an hour, and neurons one request may name.
TRACE_LABELER_TIMEOUT_MS, TRACE_LABELER_BASE_URL30000, unsetThe labeller call timeout, and a base URL for a proxy in front of the Anthropic API.
TRACE_CANARY_COUNTS_RETENTION_DAYS90How long hourly canary counts are kept.
TRACE_CANARY_SPIKE_MIN_TRIPS, TRACE_CANARY_SPIKE_FACTOR5, 3The default spike alert every canary family has until someone changes it: at least this many trips in an hour and this many times the usual rate.
TRACE_WORKER_BATCHED_READoffon once your worker serves POST /v1/activations/examples, the read the canary family builder ranks neurons from. Off, building a family from examples answers 503 trace_backend_unavailable.
TRACE_CANARY_PROPOSALS_PER_DAY, TRACE_CANARY_GENERATIONS_PER_DAY1000, 10Proposed labels and plain-words generations an account may have a day in each environment. Both use the explainer endpoint (TRACE_EXPLAINER_URL).
TRACE_CANARY_TRIES_PER_MINUTE30Try-a-sample readings one member may ask for a minute.
PUBLIC_API_URLunsetThe API's public https base. Hosted agent key directories and cards are published under it, and Twilio's signed webhooks are checked against it. Required in live (the API refuses to boot without it); elsewhere, unset, each request's host is used.
IDENTIFY_PSEUDONYM_KEYunset32 random bytes, base64. The root of every per-site pseudonym. Required in live; elsewhere a key derived from JWT_SECRET is used. Rotating it gives every person a new pseudonym at every site.
IDENTIFY_PSEUDONYM_KEY_PREVIOUSunsetThe old IDENTIFY_PSEUDONYM_KEY during a rotation: lookups match pseudonyms and contact hashes under either key, sealed values open under either, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key IDENTIFY_PSEUDONYM_KEY, then unset it at the end of the announced window.
IDENTIFY_BUNDLE_TTL_SECONDS, IDENTIFY_MAX_SIGNATURE_AGE_SECONDS300, 60How often the middleware refreshes its policy bundle, and the oldest signature it accepts.
IDENTIFY_DECISIONS_TTL_DAYS, IDENTIFY_DIRECTORY_TIMEOUT_MS30, 2000Default decision retention, and the timeout for fetching another operator's key directory.
IDENTIFY_NETWORK_DIRECTORIESunsetThe card network agent programs' key directories, as JSON: [{ "program": "mastercard_agent_pay", "url": "https://…", "type": "directory" }] (type is directory, jwks_uri or key_lookup). Their signatures verify only against these; a program with none reads unverified.
IDENTIFY_NETWORK_SIGNATURE_WINDOW_SECONDS480The longest a card network signature may live (expires - created), 60 to 3600.

The worker reads its own settings:

VariableWhat it controls
TRACE_WORKER_BACKENDhf to run a Hugging Face model, fixture to replay the sandbox recordings
TRACE_MODELThe Hugging Face model ID to load
TRACE_WORKER_TOKENThe bearer token the API sends
LABELER_URLAn agent labeler for registry builds; unset uses the heuristic labeler
TRACE_SIDECAR, TRACE_SIGNING_KEY_PEM, TRACE_SIGNING_KEY_ID, PROVENANCE_API_URLSidecar mode
TRACE_READING_SAMPLE_RATEThe share of sidecar requests to read, 0 to 1 (default 1); see sampling

Attest

VariableDefaultWhat it controls
SIGHTENGINE_API_USER, SIGHTENGINE_API_SECRETunsetThe synthetic-media detector. Unset answers 503 detector_not_configured.
SCREENING_MONTHLY_BUDGET, SCREENING_DAILY_BUDGET300, 20Detector calls per month and per day.
EXIF_TOLERANCE_SECONDS, GEOFENCE_RADIUS_KM600, 5Tolerances for the EXIF time and geofence risk factors.
DOCUMENT_CLASSIFIER_URL, DOCUMENT_CLASSIFIER_KEYunsetThe hosted classifier for the document type check on ID shots. Unset, every ID shot's check reads not_run (document_classifier_not_configured).
DOCUMENT_CLASSIFIER_TIMEOUT_MS, DOCUMENT_CHECK_DAILY_BUDGET2000, 2000The time after which a document check reads not_run (document_classifier_unavailable) and the shot goes on, and the classifier calls one account makes per UTC day.
ATTEST_RECAPTURE, ATTEST_RECAPTURE_THRESHOLD, ATTEST_RECAPTURE_TIMEOUT_MSon, 0.5, 1500The screen-or-print check on each photo: off skips it, the probability at which it fires, and the time after which a photo reads "Not checked".
CLAIM_LINK_RADIUS_M, CLAIM_LINK_WINDOW_HOURS250, 168The distance and time window for linking claims by GPS.
INTEGRITY_CHECKSoffon verifies iOS App Attest and Android Play Integrity evidence at device enrollment.
APP_ATTEST_APP_ID, PLAY_INTEGRITY_PACKAGE_NAME, PLAY_INTEGRITY_JWKSunsetThe app identities those checks verify against.
ANDROID_ATTESTATION_STATUS_URLGoogle's attestation status URLWith integrity checks on, the revoked and suspended Android attestation certificates. off skips the check in sandbox; in live, Android hardware tiers then count as unverified.
ANDROID_ATTESTATION_STATUS_REFRESH_SECONDS, ANDROID_ATTESTATION_STATUS_MAX_AGE_SECONDS3600, 86400How often the list is fetched, and how old it may get before Android hardware tiers count as unverified.
CAPTURE_RELEASEoffon shows the capture release before every camera and refuses face and ID captures without an agreement.
CAPTURE_PROVENANCE_APPoffWhere capture links open: development lets development and test builds of the Provenance app take link captures; on makes it ready on each platform whose store listing is set. See where the link opens.
CAPTURE_APP_CLIP, APP_CLIP_BUNDLE_IDoff, unseton with the clip's bundle id and APP_STORE_URL makes the App Clip ready on iPhone.
CAPTURE_STORE_LISTINGoffon offers Provenance's store listing (APP_STORE_URL, PLAY_STORE_URL) on capture links.
TERMS_OF_SERVICE_VERSIONdraft-2026-11-11The Terms of Service version served and recorded; its texts ship with the API. A live API refuses to boot with the release on and a draft- version.
TERMS_OF_SERVICE_URLunsetThe public Terms of Service page the sheet links to. Required in live with the release on.
REMINDER_MAX_PER_REQUEST3The most reminders one request can get (3 at most; 0 turns them off).
REMINDER_MIN_GAP_SECONDS600The least time between the last message to a person and a reminder for the same request.
REMINDER_QUIET_START, REMINDER_QUIET_END21, 8The local hours between which a text reminder is held and sent when they end.
CONTACT_PUSH_PHONE_MAX_AGE_DAYS365A capture request or cart approval goes to a person's Provenance app instead of a text only when they verified that phone within this many days (details).
REQUEST_FOLLOW_UP_TEXTS_ENABLEDtrueThe operator switch for follow-up texts after an app notification (details). false stops every follow-up text at once: none is scheduled, and a waiting one ends paused when it comes due. No account can see or change it.
TEXT_CONSENT_WORDING_VERSIONdraft-2026-11-14The consent to text wording version recorded with each consent; its texts ship with the API.
TEXT_CONSENT_RETENTION_DAYS1461How long a withdrawn consent to text is kept before the daily sweep deletes it.
TEXT_CONSENT_REQUIREDonA company's text goes only to a phone with a consent on record (no_text_consent otherwise, details). off skips the check and keeps the records as evidence only. No account can see or change it.
TEXT_CONSENT_BOX_DAILY_CAP500Consent box ticks one account can record in a day, each of which may send the company's confirmation text. Past it the box answers 429 and records nothing.
PHONE_OTP_ACCOUNT_DAILY_CAP10Verification texts to an account's own phones (the account's and each member's) in a day. A person can also send only five in 15 minutes. At the cap the phone routes answer 429 and send nothing.
PHONE_OTP_NUMBER_DAILY_CAP3Verification texts one number can get in a day, from any account.
PHONE_OTP_DAILY_PLATFORM_CAP1000Verification texts to account phones across the deployment in a day. At this cap no account can send one until the day's window ends.

Authorize

VariableDefaultWhat it controls
APPROVAL_TTL_SECONDS600How long a step-up approval stays actionable.
STEPUP_PENDING_PER_ORIGIN1Pending checkout step-ups per person per store; 0 turns the rule off.
STEPUP_PER_ORIGIN_HOUR, STEPUP_PER_ORIGIN_DAY5, 20Checkout step-ups per person per store in an hour and in a day.
STEPUP_PER_ACCOUNT_HOUR30Checkout step-ups per operator account in an hour.
APPROVAL_LINK_TTL_SECONDS900How long a signed mobile approval link stays valid.
DECISION_LEDGER_MAX10000Ledger records the in-memory store keeps per environment. Postgres keeps them all.
ORDER_REFUND_REPEAT_COUNT, ORDER_REFUND_REPEAT_DAYS3, 90How many refunds for the same shopper or agent, inside how many days, mark an order's ending refund_abuse. A single refund reads refunded.
GRANT_ADJUST_LINK_TTL_MS1800000How long an adjust link from a refused order lasts. An ask's link lasts as long as the ask.
GRANT_ADJUST_NOTICE_TTL_MS86400000The most a near-limit notice's adjust link lasts; otherwise it lasts until the budget window resets.
DELEGATION_PLAN_TTL_MS86400000How long a proposed delegation plan waits for the person before it expires (it is never accepted by silence), at most until the parent grant ends.
COUNTER_OFFER_ASK_TTL_MS86400000The ceiling on how long a counter-offer ask waits for the person. The wait itself is the person's setting, else the account's, else 24 hours; it also ends 30 seconds before the offer does and at the brief's deadline.
COUNTER_OFFER_ASK_LIMITS10,10Asks per brief per day, then open asks per person. Past either, the option is refused with counter_offer_ask_limit and still recorded.
COUNTER_OFFER_COLLECT_MAX_SECONDS120The longest a collect window (collect_seconds on a counter-offer or the account setting) gathers offers from several outside agents before one ask goes out.
AUTHORITY_PROOF_TTL_SECONDS600The longest an offer-scoped authority proof (authority+jwt) lives, 30 to 600 seconds. It never outlives the offer or the acceptance it covers.
RESPONDER_PROPOSALS_PER_REQUEST5How many proposals one responder agent may try on one request in an hour over MCP, dry runs included, 1 to 20.
AGENT_MCP_TOKEN_TTL_SECONDS900The life of a client-credentials MCP token (an agent signing in with its own key, or a party with no account signing in with its website key), 60 to 3600 seconds.
PERSONAL_CARD_KEYnone32 random bytes, base64. Keys the hash of a bank card's token on a person's card list. Without it a live API refuses bank card links with 503; the sandbox derives one.
WEBAUTHN_ORIGIN, WEBAUTHN_RPIDlocal dashboardThe origin and relying-party ID passkey ceremonies run under.
APPROVER_NETWORKonoff pauses new approver invites; existing links keep working.
THREEDS_BRIDGEoffon serves an approval's 3DS Requestor data (the FIDO data and browser fields) for a payment provider; off answers 503 threeds_bridge_not_configured.
THREEDS_BANK_STEPoffon (with THREEDS_BRIDGE) runs the bank check on the approval page; off answers 503 threeds_bank_step_not_configured.
THREEDS_PROVIDERSunsetThe providers whose adapters you confirmed in their sandboxes, comma-separated: checkout_com, adyen, cybersource, stripe. Any other answers 503 threeds_provider_not_configured.
THREEDS_BANK_STEP_TIMEOUT_SECONDS600How long a bank check or its challenge waits for the store's result (60 to 3600).
GUARANTEE_SHADOW_FEE_BPS, GUARANTEE_MONTHLY_LIMIT_CENTS30, 0The internal loss ledger shown in Ops: the rate each passkey-approved order is priced at, in basis points, and the monthly limit in cents (0: none). Nothing reaches a merchant.
GUARANTEE_NEW_COVERAGE, GUARANTEE_PAYOUTS, GUARANTEE_LADDER, GUARANTEE_ORDER_LIMITS, GUARANTEE_WAITING_DAYS, GUARANTEE_YOUNG_WAITING_DAYS, GUARANTEE_TERMS_VERSIONoff, hold, 5000000:50,25000000:40,:30, 50000:25000:10000, 60, 90, 2026-11-21-draftThe merchant program on top of that ledger, off by default: on allows enrolment and new orders, hold keeps cash payments for operator review, the monthly fee steps (cents:basis points), the per-order limits in cents (device passkey, synced passkey, standing permission), the waiting periods in days and the terms version. With GUARANTEE_MONTHLY_LIMIT_CENTS at 0 nothing is paid.
UCP_RAILS, UCP_SCHEMA_BASE, UCP_PROFILE_FETCH_TIMEOUT_MS, UCP_MAX_BODY_BYTESon in the sandbox environment and off on live, the site URL, 3000, 262144The Universal Commerce Protocol routes (off: 503 ucp_unconfigured), where the extension schema is served (its host must bind com.provenanceauth, or the profile routes answer 503), the profile fetch deadline in milliseconds and the body cap in bytes.
PRESCRIBER_NPPES_URL, PRESCRIBER_LEIE_CSV, SAM_GOV_API_KEY, PRESCRIBER_VENDOR_URL, PRESCRIBER_VENDOR_API_KEYNPPES onlyThe prescriber credential sources for clinician ordering. An unset source caps the reachable tier.
RUN_RECORD_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Seals run-record spans at rest with AES-256-GCM. In live, the run-record routes answer 503 run_record_not_configured until it's set (runs, halts and the run guard still work); elsewhere a key derived from JWT_SECRET is used.
RUN_RECORD_ENCRYPTION_KEY_PREVIOUSunsetThe old RUN_RECORD_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key RUN_RECORD_ENCRYPTION_KEY to re-seal the rest, then unset it.
DISPUTE_EVIDENCE_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Seals evidence added to agent disputes with AES-256-GCM. In live, adding evidence answers 503 dispute_evidence_not_configured until it's set (the automatic bundle, findings and outcomes still work); elsewhere a key derived from JWT_SECRET is used.
DISPUTE_EVIDENCE_ENCRYPTION_KEY_PREVIOUSunsetThe old DISPUTE_EVIDENCE_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key DISPUTE_EVIDENCE_ENCRYPTION_KEY to re-seal the rest, then unset it.

Verified calls

AI agents register their phone calls and businesses check them (verified calls).

VariableDefaultWhat it controls
VOICE_CALLSon in a sandbox, off in liveTurns verified calls on. Off, every call route answers 503 calls_not_configured.
CALL_CREDENTIAL_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Seals each registered call credential, which holds both phone numbers, with AES-256-GCM. Required in live while VOICE_CALLS is on; elsewhere a key derived from JWT_SECRET is used.
CALL_CREDENTIAL_ENCRYPTION_KEY_PREVIOUSunsetThe old CALL_CREDENTIAL_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key CALL_CREDENTIAL_ENCRYPTION_KEY to re-seal the rest, then unset it.
CALLS_RELAY_ADDRESSthe site's host + /cThe short address, without a scheme, a person types a relayed call code at.
CALLS_PROOF_WAIT_SECONDS20How long a call check waits for the operator's proof after a challenge, unless the request sets wait (at most 30).
CALLS_HOLD_WAIT_SECONDS120How long a confirmation to the person stays open while the call holds, unless the request sets wait (10 to 300).
TWILIO_FROM_VOICETWILIO_FROM_SMSA voice-capable Twilio number for placed calls, used to read a number-verification code out on a call. Unset with no SMS number, a verification by call reports channel_not_configured.

Twilio reports on the calls it places to /webhooks/twilio/voice on PUBLIC_API_URL. Each callback must carry a valid X-Twilio-Signature for TWILIO_AUTH_TOKEN and a signed single-use token, or it answers 401 voice_callback_invalid.

Delivery

VariableDefaultWhat it controls
WEBHOOKS_ENABLEDonRuns the outbound webhook worker. In production, endpoint URLs must be https and public. Off, resend and replay answer 503 webhooks_unavailable.
DEVLOG_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Seals request-log bodies with AES-256-GCM. Unset, a sandbox seals under a key made at boot (bodies readable until a restart) and live keeps metadata only.
DEVLOG_ENCRYPTION_KEY_PREVIOUSunsetThe old DEVLOG_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key DEVLOG_ENCRYPTION_KEY to re-seal the rest, then unset it.
DEVLOG_ENABLEDonoff stops logging requests; events are still stored.
DEVLOG_QUEUE_MAX10000Request-log records waiting to be written before new ones are dropped and counted.
DEVLOG_RETENTION_OVERRIDES, DEVLOG_RETENTION_MAX_DAYSunset, 365Longer request-log and event windows for named Enterprise accounts (acct_id:days,…), capped at the maximum.
DEVTOOLS_STREAM_RECHECK_SECONDS60How often an open live tail or provenance listen stream re-checks its console session or key; a signed-out session, removed member or revoked key ends the stream at the next check.
CONSOLE_STREAMonoff turns off the console's live updates: GET /v1/account/stream answers 503 and the console checks every 15 seconds instead.
CONSOLE_STREAM_POLL_MS2000How often the one poller per account and environment reads the store for the account stream (at least 250).
CONSOLE_STREAM_MAX_PER_MEMBER4Open account streams per console member; one more ends the oldest.
RESEND_API_KEY, MAIL_FROMunsetTransactional email. Unset logs mail in a sandbox and answers 503 mailer_not_configured in production.
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_FROM_SMSunsetSMS delivery of approval requests. Point the TWILIO_FROM_SMS number's "A message comes in" webhook at /webhooks/twilio/sms on PUBLIC_API_URL (HTTP POST) so STOP and START replies reach the stop list; a reply without a valid X-Twilio-Signature answers 401 sms_webhook_invalid.
SHORT_LINK_BASE_URLunsetThe origin that serves short links at /c/<code> (the site, e.g. https://provenanceauth.com). Set, approval, capture and hosted page links in texts become <origin>/c/<code> and POST /v1/embed/links answers a short_url. The site asks the API named by the code's first letter: NEXT_PUBLIC_SANDBOX_API_URL for t, NEXT_PUBLIC_API_URL for l. Unset, texts keep the long link.
SHOPIFY_API_KEYunsetThe Shopify app's client ID, from the Shopify Partner Dashboard, for Shopify stores. With it and SHOPIFY_API_SECRET unset, the Shopify routes answer 503 store_integration_unconfigured.
SHOPIFY_API_SECRETunsetThe Shopify app's client secret. It also checks Shopify's webhook and redirect signatures.
SHOPIFY_SCOPESread_orders,write_orders,write_merchant_managed_fulfillment_ordersThe access the app asks a shop for, comma-separated.
SHOPIFY_API_VERSION2026-10The Shopify Admin API version the app calls.
SHOPIFY_BILLING_TESTon, off in productionMarks every charge billed through Shopify as a test charge, never billed. Set off to bill for real.
SHOPIFY_USAGE_CAP_CENTS50000The usage cap a new Shopify plan asks the merchant to approve when the account has no spend cap of its own, in cents for a 30-day cycle.
SHOPIFY_DISPUTE_SCOPESoffon asks connecting shops for Shopify Payments' dispute scopes and answers their chargebacks with staged text (chargeback responses). read asks only for reading disputes: chargebacks are matched and the merchant pastes the prepared text. Leave it off until Shopify approves the scopes for your app.
WOOCOMMERCE_INTEGRATIONonThe Provenance for WooCommerce plugin's routes. It needs no credential: each store gets its own secret, sealed under the Identify vault. off answers 503 store_integration_unconfigured on them.
CHARGEBACK_STRIPE_KEYSonStripe connections with a merchant's restricted key, for chargeback responses; off answers 503 payment_connection_unconfigured. The key and its webhook secret are sealed under the Identify vault.
STRIPE_APP_SECRET_KEY(unset)The restricted key of your Stripe App's backend (kept apart from the billing key; a test key on sandbox, a live key only on live). With the two below, merchants can connect by installing the App.
STRIPE_CONNECTED_WEBHOOK_SECRET(unset)The signing secret of the webhook endpoint at /webhooks/stripe/connected that listens to connected accounts.
STRIPE_APP_ID(unset)The Stripe App's OAuth client id (ca_…). Without all three, the App path answers 503 payment_connection_unconfigured.
STRIPE_SPT_API_VERSION, PAYMENT_SIGNAL_TIMEOUT_MS2026-09-30.preview, 5000The Stripe API version the shared payment token read sends, and the most a checkout assessment waits for Stripe before the payment facts stay as reported (500 to 10000).
CHARGEBACK_SWEEP_MS300000How often the chargeback sweep runs: retries, submits before the deadline, review reminders and the daily reconcile.
IDENTIFY_STOREFRONT_EVENTS_PER_MINUTE600The most storefront check events one site may send a minute (10 to 100,000); over it the beacon answers 429.
IDENTIFY_BACKTEST_SAMPLE20000The most recorded decisions one traffic backtest replays, newest first (100 to 200,000); past it the answer says truncated.
OPS_ALERT_STORE_SIGNATURE_FAILURES_PER_HOUR10Store webhooks with a bad signature in an hour that raise store_integration_failing (0 disables).
OPS_ALERT_STORE_TOKEN_REFRESH_FAILURES_PER_HOUR3Failed Shopify token refreshes in an hour that raise store_integration_failing (0 disables).
OPS_ALERT_STORE_USAGE_CHARGE_FAILURES_PER_HOUR3Usage charges to Shopify that failed in an hour that raise store_integration_failing (0 disables).
OPS_ALERT_CHARGEBACK_FAILURES_PER_HOUR3Chargeback responses that failed on one platform in an hour that raise chargeback_response_missed (0 disables; a missed deadline always raises it).
OPS_ALERT_UCP_COMPLETION_MISMATCHES_PER_HOUR10UCP completions refused with binding_mismatch in an hour that raise ucp_completion_mismatch_burst (0 disables).
EMAIL_PROVIDER, EMAIL_API_KEY, EMAIL_FROMunsetApproval and invite emails to approvers outside an account. EMAIL_PROVIDER is postmark or resend. Unset, nothing is sent and deliveries report channel_not_configured.
EMAIL_POSTMARK_STREAMapprovalsThe Postmark message stream for approver emails.
EMAIL_ACCOUNT_API_KEYunsetPostmark's account token, for companies' sending domains. Unset, adding a domain returns 502 email_provider_error.
IP_INTEL_PROVIDER, IP_INTEL_URL, IP_INTEL_API_KEYunsetAn IP-intelligence lookup on approver decisions and on every captured shot: commercial VPN and proxy signals, the country behind timezone_mismatch, and a shot's network country and region. GET <url>?ip=<ip> with a Bearer key, answering { vpn, proxy, country } and optionally region, city, lat, lng, accuracy_radius_km and asn. One request per decision or shot with a 300 ms budget; a slow answer falls back to the published lists.
CHECKOUT_APPROVER_NETWORK_CITYoffon keeps the network city name the IP lookup gives, on approvals and on captured shots. Off, the city is dropped and reads city_not_enabled.
GEOCODER_PROVIDER, GEOCODER_URL, GEOCODER_API_KEYunsetA geocoder for billing addresses on cart approvals. GEOCODER_PROVIDER=nominatim with GEOCODER_URL (a self-hosted Nominatim), and GEOCODER_API_KEY when a proxy in front wants a Bearer key. One lookup per distinct address per account, cached, with a 1 s budget; only the postal code, city, region and country are sent. Unset, the distance facts read geocoder_not_configured and the billing time zone comes from the region table.
EMAIL_OWN_DOMAINSunsetMore domains a company can't register as a sending domain, comma-separated. EMAIL_FROM's domain and the console and API domains are always refused.
VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_SUBJECTunsetWeb push delivery.
APNS_KEY_ID, APNS_TEAM_ID, APNS_PRIVATE_KEY, APNS_BUNDLE_ID, APNS_ENVunset, productionPush to the Provenance app on iPhone (token-based APNs). Unset, the app channel is skipped.
FCM_PROJECT_ID, FCM_SERVICE_ACCOUNT_JSONunsetPush to the Provenance app on Android (FCM HTTP v1 with a service account). Unset, the app channel is skipped.
APP_IOS_APP_IDS, APP_ANDROID_PACKAGE, APP_ANDROID_CERT_SHA256unsetWhat /.well-known/apple-app-site-association and /.well-known/assetlinks.json declare; unset, they answer 404.
WEBAUTHN_APP_ORIGINSunsetExtra passkey origins the Android app reports (android:apk-key-hash:…), comma-separated.
APP_STORE_URL, PLAY_STORE_URLunsetThe store listings an approver invite links to, and a capture link's store listing.

Tool gateway

People connect their services once and their assistants use them through the Provenance MCP server (Connect your tools).

VariableDefaultWhat it controls
TOOL_GATEWAYon in sandbox, off in liveon serves the tool routes and adds connected tools to a person's tools on the MCP server. Off, the routes answer 503 tool_gateway_not_configured.
TOOL_TOKEN_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Seals connected services' OAuth tokens and the opt-in call details with AES-256-GCM. Required in live while TOOL_GATEWAY is on: the API refuses to start without it. Elsewhere a key derived from JWT_SECRET is used.
TOOL_TOKEN_ENCRYPTION_KEY_PREVIOUSunsetThe old TOOL_TOKEN_ENCRYPTION_KEY during a rotation. Run node apps/api/scripts/reseal.mjs --key TOOL_TOKEN_ENCRYPTION_KEY to re-seal the rest, then unset it.
TOOL_GATEWAY_SERVICESevery service in sandbox, none in liveThe catalog services offered, comma-separated (github,notion).
TOOL_GATEWAY_CLIENT_ID_URL<public API base>/v1/personal/tool_gateway_clientThe gateway's Client ID Metadata Document, which is also its client ID at services that take metadata documents.
MCP_PUBLIC_URLunsetThe public address of the Provenance MCP server (https://mcp.<your domain>), which the API also answers at /v1/mcp (Provenance MCP). Every MCP sign-in token carries it as its audience. Unset, MCP sign-in answers 503 and only API keys reach /v1/mcp.
MCP_GRANT_CALLS_PER_MINUTE60The tool calls, reads and writes alike, one connected app may make a minute; past it the call answers rate_limit_exceeded with Retry-After. 0 turns the limit off.
MCP_GRANT_WRITES_PER_MINUTE10The member writes (previews and dry runs) one connected app may start a minute; past it the call answers rate_limit_exceeded with Retry-After. 0 turns the limit off.
MCP_MODERN_ERAonServe MCP 2026-07-28 statelessly beside the earlier versions; off answers 2026-07-28 with -32022.
MCP_LEGACY_GRANT_KEY_UNTILunset (read)The last day (YYYY-MM-DD) a grant under the old provenanceauth.com/grant key is read.
MCP_SESSION_HANDLE_IDLE_HOURS24A record_session handle with no request for this long ends.
MCP_CIMD_BLOCKED_HOSTSunsetHosts whose Client ID Metadata Documents can't sign in, comma-separated.
MCP_CIMD_FETCHES_PER_HOST_PER_HOUR30Metadata document fetches per host per hour.
DEVELOPER_MCPonThe developer tools on the MCP server, for a console sign-in with developer access (Developer tools). Sandbox only, and it needs MCP_PUBLIC_URL; off turns them off in sandbox too.
DOCS_MCP_URLNEXT_PUBLIC_SITE_URL + /docs/mcpThe docs MCP server the MCP server forwards its docs tools to; off for none (the docs tools then answer docs_unavailable).
DOCS_MCP_TIMEOUT_MS5000The forward's deadline.
TOOL_<SERVICE>_CLIENT_ID, TOOL_<SERVICE>_CLIENT_SECRETunsetYour OAuth app for a service without dynamic client registration (GitHub: TOOL_GITHUB_CLIENT_ID; Slack: TOOL_SLACK_CLIENT_ID). Its callback is {DASHBOARD_ORIGIN}/me/tools/callback.
TOOL_GATEWAY_MONTHLY_CALLS10000Tool calls a person may make each month.
TOOL_UPSTREAM_TIMEOUT_MS, TOOL_UPSTREAM_MAX_BYTES60000, 10485760The deadline for a service's whole answer, and the largest answer passed through.
OPS_ALERT_TOOL_GATEWAY_ADDED_P95_MS80Added time on allowed calls over which the tool_gateway_latency_budget alert fires (more than 5% of calls); 0 disables it.
OPS_ALERT_TOOL_UPSTREAM_ERROR_RATIO0.2Upstream errors over allowed calls in 15 minutes that fire tool_upstream_errors; 0 disables it.
OPS_ALERT_TOOL_REFRESH_FAILURES_PER_HOUR20Failed token refreshes in an hour that fire tool_token_refresh_failures; 0 disables it.

Console and access

VariableDefaultWhat it controls
DASHBOARD_ORIGINlocal dashboardThe console origin allowed to send credentialed requests.
DASHBOARD_LOGIN_ALLOWLISTempty (open)Emails allowed to sign up and sign in to the console, by any method. Set, it pauses sign-up for everyone else: they get 403 beta_access_required, which gives the contact address.
GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRETunsetGoogle sign-in. Register <DASHBOARD_ORIGIN>/auth/oauth/google/callback as the redirect URI. Unset hides the button and answers 503 oauth_provider_not_configured.
GITHUB_OAUTH_CLIENT_ID, GITHUB_OAUTH_CLIENT_SECRETunsetGitHub sign-in, from a GitHub OAuth app whose callback URL is <DASHBOARD_ORIGIN>/auth/oauth/github/callback.
HIBP_RANGE_CHECKoffon checks new passwords against Have I Been Pwned's range API; off, signup reports breach_check: "skipped".
OPS_ALERT_AUTH_FAILURES_PER_HOUR100Failed console sign-ins in an hour that fire the auth_bruteforce alert; 0 disables it.
AUTH_FACTOR_ENCRYPTION_KEYunset32 random bytes, base64 (openssl rand -base64 32). Encrypts authenticator-app secrets with AES-256-GCM. Required in live; elsewhere a key derived from JWT_SECRET is used, with a startup warning. Replacing it without AUTH_FACTOR_ENCRYPTION_KEY_PREVIOUS breaks every authenticator app already set up.
AUTH_FACTOR_ENCRYPTION_KEY_PREVIOUSunsetThe old AUTH_FACTOR_ENCRYPTION_KEY during a rotation: values sealed under it still open, new ones use the new key. Run node apps/api/scripts/reseal.mjs --key AUTH_FACTOR_ENCRYPTION_KEY to re-seal the rest, then unset it.
AUTH_TOTP_ISSUERProvenanceThe name authenticator apps show for the account.
OPS_ALERT_TWO_FACTOR_FAILURES_PER_HOUR100Failed second-factor checks in an hour that fire the two_factor_failures alert; 0 disables it.
OPS_ALERT_STEPUP_RATE_LIMITED_PER_HOUR50Rate-limited checkout step-ups in an hour that fire the approval_stepup_rate_limited_spike alert; 0 disables it.
OPS_ALERT_ISSUER_DEADLINE_MISSES_PER_HOUR20Card authorizations answered after the processor's deadline in an hour that fire the issuer_deadline_misses alert; 0 disables it.
OPS_ALERT_ISSUER_ASKS_ANSWERED_FLOOR0.7The answered share of issuer approvals asked in an hour (at least 20) under which the issuer_asks_under_floor alert fires; 0 disables it.
OPS_ALERT_NETWORK_DELIVERY_ERROR_RATIO0.2The failed share of approver texts (at least 10 sent in 15 minutes) that fires the network_delivery_failing alert; 0 disables it.
OPS_ALERT_DOCUMENT_CLASSIFIER_UNAVAILABLE_RATIO0.2The share of document type checks on ID shots that couldn't reach the classifier (at least 10 in 15 minutes) that fires the capture_document_classifier_failing alert; 0 disables it.
OPS_ALERT_APPROVER_IP_INTEL_ERROR_RATIO0.2The failed share of IP lookups on cart approval decisions (at least 10 in 15 minutes) that fires the approver_ip_intel_failing alert; 0 disables it.
ACCOUNT_CREATE_PER_IP_PER_DAY20New accounts one IP can create in a day.
ACCOUNT_EMAIL_ALLOW_DOMAINS, ACCOUNT_EMAIL_DENY_DOMAINSemptyWhich email domains can sign up.
SIGNUP_STARTS_PER_IP_PER_HOUR10Sign-ups one IP can start in an hour (a password sign-up, or an emailed link sent from the Sign up page). The per-email limits still apply.
SIGNUP_DISPOSABLE_EMAILflagSign-ups from a throwaway-inbox domain on the bundled list: flag marks the sign-up, block refuses it with 400, off ignores the list.
SIGNUP_REQUIRE_PROFILEonAn account created through sign-up answers About you in the console before any other page opens, and can't create or rotate an API key until its name and company are saved (403 profile_required). off turns both off. Accounts created before About you existed, seeded and synthetic accounts, and members who joined by invite are never asked.
SIGNUP_SUMMARY_HOUR_UTC13The UTC hour (0–23) from which the daily sign-up summary goes to INTERNAL_NOTIFY_EMAIL, once a day across every replica. off sends none.
SIGNUP_STALLED_DAYS3Days without progress, before the first API call (or a person's passkey), after which the admin Sign-ups list and the summary call a sign-up stalled.
OPS_ALERT_SIGNUP_STARTS_PER_HOUR200New sign-ups in an hour that fire the signup_spike alert; 0 disables it.
LAUNCH_DATEunsetThe launch day, YYYY-MM-DD in UTC, for the Since launch range of Console › Ops › Launch. Unset, that range is hidden and range=launch answers 400.
PEOPLE_SIGNUPinviteopen lets anyone set up Provenance for themselves at /me/start: a verified email, a verified mobile, then a passkey. invite pauses that; a person invite link still works.
SIGNUP_TEXTS_PER_SIGNUP3Code texts one personal sign-up can send after its email is verified.
SIGNUP_TEXTS_PER_NUMBER_PER_DAY3Sign-up code texts one mobile number can get in a day.
SIGNUP_TEXTS_PER_DAY500Sign-up code texts across the deployment in a day. At this cap the mobile step answers 429 and the signup_texts_capped alert fires. Without Twilio the mobile step is deferred: the person is created with a verified email and asked for the mobile once texting is set up.
SIGNUP_TEXT_CONSENT_VERSIONdraft-2026-11-10The wording version of the consent line above the mobile step's send button, recorded with each sign-up. Set it when the wording is signed.
SIGNUP_TERMS_PUBLISHEDoffon shows "By creating an account you agree to the Terms of Service, which include an arbitration agreement and a class action waiver." under the Sign up buttons, company and personal, on the web and in the app, with one link to the Terms of Service page (TERMS_OF_SERVICE_URL, else NEXT_PUBLIC_SITE_URL + /legal/terms), and records TERMS_OF_SERVICE_VERSION with each acceptance. A person who signed up under another version is asked once at the next open of the home or the app. Off, the line isn't shown and nothing is recorded or asked.
PERSONAL_SIGNUP_COUNTRIESUSThe countries a personal account's mobile number comes from, at sign-up and when one is added later, comma-separated two-letter codes. US covers Puerto Rico, Guam, the US Virgin Islands, American Samoa and the Northern Mariana Islands. Another number answers 400 and gets no text; numbers already on an account stay. Approval requests from companies reach people anywhere.
CONSOLE_PRODUCTS_ACTIVITY_DAYS14An account that ticked no product at Your products sees every product. Once it is this many days old, the products it used lead the console's sidebar and Get started and the rest sit under More products; with no activity, nothing changes. 0 applies it from the first day.
API_MAINTENANCEoffon answers 503 service_unavailable_maintenance on every route except health.

AI assists

The model endpoint behind AI assists: checkout and traffic rule suggestions. With no provider set, every assist route answers 503 ai_assist_unconfigured, the console says the assists aren't available on this deployment, and the nightly draft job skips.

VariableDefaultWhat it controls
AI_ASSIST_PROVIDERnonenone, anthropic (the Claude API), http (any other model host, the contract below) or fake (test drafts with no network, refused in a live posture).
AI_ASSIST_URLunsetWith anthropic, an optional base URL for a proxy in front of the Claude API. With http, the endpoint every assist call is sent to; it must pass the outbound URL guard.
AI_ASSIST_TOKENunsetThe Claude API key (anthropic) or the bearer token (http). A secret: never logged. Without a token the provider counts as unconfigured.
AI_ASSIST_MODELclaude-haiku-5-5The model for every assist call. With anthropic, a model without a list price in the API leaves the assists unconfigured, so a call is never metered at a guessed price.
AI_ASSIST_RETRY_MODELclaude-sonnet-5-5One retry per account run when the first answer is declined, cut off, not JSON or doesn't match the schema. none turns the retry off.
AI_ASSIST_TIMEOUT_MS30000The deadline for one model call (1,000 to 120,000).
AI_ASSIST_MAX_OUTPUT_TOKENS4000The most tokens one answer may use (256 to 16,000). An answer cut off at the limit drops that run's drafts.
AI_ASSIST_ACCOUNT_MONTHLY_USD2Model cost per account per month, at list prices, after which that account's runs stop until the next month. A guard behind the draft cap.
AI_ASSIST_DAILY_BUDGET_USD25Model cost across the deployment per day. At the budget the job stops for the day.
AI_ASSIST_DRAFT_CAP_PRO, AI_ASSIST_DRAFT_CAP_GROWTH, AI_ASSIST_DRAFT_CAP_ENTERPRISE20, 100, 0Drafts shown per account per month on each plan. 0 means no cap. A Free account's trial allowance is fixed.
AI_ASSIST_MAX_ASK_SHARE0.1A checkout draft whose rule would decide more than this share of the orders in its 30-day backtest is dropped, and so is a traffic draft that would challenge, require an intent or block more than this share of requests.
AI_ASSIST_JOBonThe nightly job that drafts for every account with an assist on. off leaves only the console's and the API's refresh.
OPS_ALERT_AI_ASSIST_ERRORS_PER_CHECK5Model calls that timed out or failed since the last alert check that raise ai_assist_error_spike (0 disables). Reaching the daily budget raises ai_assist_budget_reached.
OPS_ALERT_INVESTIGATION_ERRORS_PER_CHECK5Investigation model calls that timed out or failed since the last alert check that raise investigation_error_spike (0 disables).

Only aggregated counts and rule conditions are sent; the prompt, the input and the raw answer are never stored or logged, only their hashes (what is sent).

The HTTP contract

With AI_ASSIST_PROVIDER=http, each assist call is one POST to AI_ASSIST_URL:

POST /your/assist/endpoint HTTP/1.1
Authorization: Bearer <AI_ASSIST_TOKEN>
Content-Type: application/json

{
  "assist": "checkout_rule_drafts",
  "instructions": "The fixed instructions for this assist, versioned.",
  "input": { "totals": { "orders": 260, "flagged": 16 }, "segments": [] },
  "schema": { "type": "object" },
  "model": "claude-haiku-5-5"
}
FieldWhat it is
assistcheckout_rule_drafts or traffic_rule_drafts.
instructionsThe fixed instructions for the assist. Use them as the system prompt.
inputThe account's aggregated input: totals, candidate segments with their counts, the field catalog and the current rules as conditions.
schemaThe JSON schema the answer must match.
modelAI_ASSIST_MODEL, or AI_ASSIST_RETRY_MODEL on the retry. Your endpoint may map it to its own model.

Answer 200 with the answer and what the call used:

{
  "output": { "drafts": [], "none_reason": "no segment makes a sensible rule" },
  "model": "your-model-id",
  "usage": { "input_tokens": 9800, "output_tokens": 1200, "cache_read_tokens": 0 }
}
FieldWhat it is
outputThe answer object, or the same object as JSON text. Every draft in it is checked again before it is shown; one that fails is dropped.
modelThe model that answered (at most 100 characters). Left out, the requested model is recorded.
usageinput_tokens and output_tokens; cache_read_tokens is optional. Missing counts read as 0.

To decline, answer any 2xx with {"error": "declined"}; for an answer cut off at the token limit, {"error": "truncated"}. Either gets one retry on the retry model; a second failure drops the run's drafts. Any other status, an answer that isn't JSON, or no output is a failed call: no draft is shown and the failure is counted.

The call goes through the same outbound guard as webhooks: in a production posture the host must resolve to public addresses only, redirects aren't followed, and the whole call has one deadline (AI_ASSIST_TIMEOUT_MS).

Custom risk scores

The answering model behind custom risk scores: plain-English questions with the answers an account chooses, and a probability for each answer that rules read. Reasons for an answer are written through the AI assists endpoint above, under its cost guards; with no assist endpoint, answers still work and reasons read unavailable.

VariableDefaultWhat it controls
RISK_SCORE_PROVIDERnoneCustom risk scores' answering model: none, typed_decision (Jev's System One API) or mock (deterministic test answers with no network, refused in a live posture). With none, every risk score fact reads unavailable and each rule's setting for that case decides.
RISK_SCORE_DIALECTjev_resellerWhich host's API typed_decision speaks: jev_reseller (POST {RISK_SCORE_URL}/api/v1/systemone/) or typesafe (POST {RISK_SCORE_URL}/v1/systemone). Moving host changes this, the URL, the token, the model and the two limits, and nothing else.
RISK_SCORE_URLunsetThe host's base URL. It must pass the outbound URL guard.
RISK_SCORE_TOKENunsetThe host's bearer token. A secret: never logged. Without it the provider counts as unconfigured.
RISK_SCORE_MODELunsetA versioned model id such as jev-1.14.0. An alias that moves when a release ships is refused in a live posture, and an answer from any other version is never used. A model without a list price leaves risk scores unconfigured.
RISK_SCORE_TIMEOUT_MS400The default answering deadline (50 to 10,000). Past it the risk score reads unavailable.
RISK_SCORE_DAILY_BUDGET_USD, RISK_SCORE_ACCOUNT_MONTHLY_USD25, 25Model cost across the deployment per UTC day, and per account per month, at list prices. At either, calls stop before they are made.
RISK_SCORE_DAILY_DECISIONS, RISK_SCORE_REQUESTS_PER_MINUTE10000, 60 with jev_reseller; no limit with typesafeThe key's limits. The day counts questions, not requests, and resets at 00:00 UTC; shadow, replay and eval runs stop at 80% of it. 0 means no limit.
RISK_SCORE_MOCK_FIXTURESunsetWith mock only: a JSON file of fixed answers by risk score key, each {"probabilities": {...}} by answer value or {"fail": "timeout"}, for demos and local runs.
RISK_SCORE_MEMORY_ENCRYPTION_KEYunsetSeals the reasons a model writes for risk score answers (32 bytes, base64). Unset: a key derived from JWT_SECRET outside live; in live, reasons read unavailable until it is set. Answers are unaffected.
RISK_SCORE_PERSONAL_CLEAREDunseton lets live risk scores bind raw personal fields (names, email addresses, free text) once the account accepted the data terms. Sandbox accepts them either way.
ANALYSIS_DATABASE_URLunsetA read replica analysis queries read the account's records from (queries themselves run in a per-query sandbox, never on the database). Unset, the read runs on the primary with a 2-second timeout instead of 5.
INVESTIGATION_MODELAI_ASSIST_RETRY_MODEL, else claude-sonnet-5-5The model Investigations answer with, through the assist endpoint above. Without a list price for it, Investigations answer 503 investigation_unconfigured.
INVESTIGATION_MAX_TOKENS, INVESTIGATION_MAX_OUTPUT_TOKENS60000, 4000The input and output token budgets of one question, across its model calls. At either, the answer is what the queries found so far.
INVESTIGATION_MARKUP_BPS1000Answers are billed at the model's list price plus this many basis points (1000 is 10%).
INVESTIGATION_CAP_FREE_USD, INVESTIGATION_CAP_TRIAL_USD5, 25The monthly spend cap on Free, and on a trial with a card on file. Paid plans have no cap.
INVESTIGATION_THRESHOLDS_USD50,100,250,500The month's spend at which a paid account is notified, once each a month. An account can set its own.
INVESTIGATION_ENCRYPTION_KEYunsetSeals questions, answers and query results at rest (32 bytes, base64). Unset, a key derived from JWT_SECRET outside live; in live, Investigations answer 503 without it. INVESTIGATION_ENCRYPTION_KEY_PREVIOUS opens values sealed before a rotation.

The model sees each answer under a neutral option name (a, b, …) defined by the account's words, and only the fields a risk score binds. The question, the case and the answer are never logged.

Billing

VariableDefaultWhat it controls
STRIPE_MODEtestWhich Stripe key set is active: test or live. Live mode needs a live API environment and a complete live set.
STRIPE_TEST_SECRET_KEY, STRIPE_TEST_WEBHOOK_SECRETunsetThe test-mode Stripe keys. The live set uses the STRIPE_LIVE_ prefix. Unset answers 503 billing_not_configured on billing routes.
STRIPE_TEST_METER_ID_<EVENT>, STRIPE_TEST_PRICE_ID_<EVENT>unsetThe meter and price for each metered event, printed by the Stripe bootstrap script.

Create the Stripe product, meters and prices with the bootstrap script. It's safe to re-run, and prints the variable lines to set:

pnpm --filter @provenance/api stripe:bootstrap --mode test
pnpm --filter @provenance/api stripe:bootstrap --mode live --confirm-live

Register /webhooks/stripe as a webhook endpoint in both Stripe modes; events from the inactive mode are acknowledged and ignored. GET /health/deep reports which Stripe mode is active, or names the variable that's missing.