Notifications and their transactions are Apple JWS verified against a pinned root (Apple Root CA - G3 by SHA-256): x5c chain links, validity, Apple's marker extensions and the ES256 signature. Bundle id and environment must match; ONE_TIME_CHARGE, SUBSCRIBED and DID_RENEW mint USD prices to the transaction's appAccountToken; REFUND and REVOKE reverse. Re-confirmation calls the App Store Server API with an ES256 token from the app's key and refuses revoked or foreign transactions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
84 lines
3.3 KiB
Plaintext
84 lines
3.3 KiB
Plaintext
# apps/mint — mint-server environment (BYOK). Copy to `.env` and fill in.
|
|
# Every value below is a PLACEHOLDER; supply real secrets at deploy time and keep
|
|
# `.env` out of version control. Unset provider keys leave that provider inactive.
|
|
|
|
# ---- Core server ----------------------------------------------------------
|
|
MINT_BIND_ADDR=0.0.0.0:8080
|
|
# Required: shared X-API-Key / Bearer for all non-health routes.
|
|
MINT_API_KEY=replace-with-a-long-random-secret
|
|
# Production Postgres DSN. When set, the server enters production mode (hardens
|
|
# the signer, KYC gate, and funding ramp). Leave unset + MINT_ALLOW_INMEMORY=1
|
|
# for a disposable local ledger.
|
|
DATABASE_URL=
|
|
# MINT_ALLOW_INMEMORY=1
|
|
# Required with Postgres: hex-encoded 32-byte receipt-signing seed.
|
|
MINT_SIGNING_KEY=
|
|
# AITP-402 payer verification keys (JSON array).
|
|
MINT_PAYER_KEYS_JSON=
|
|
|
|
# ---- Cash-out KYC gate ----------------------------------------------------
|
|
# Real, provider-verified KYC for redemptions (cash-out). Without this, every
|
|
# redeem is DENIED by default (StrictKycGate). Choose ONE provider:
|
|
# persona → requires PERSONA_API_KEY
|
|
# stripe_identity → requires STRIPE_API_KEY
|
|
MINT_KYC_PROVIDER=
|
|
# Persona API key (secret). Owner-supplied.
|
|
PERSONA_API_KEY=
|
|
# Stripe secret key (sk_live_… / sk_test_…) — reused for Stripe Identity.
|
|
STRIPE_API_KEY=
|
|
# Per-redemption payout ceiling in microdollars (default 1_000_000_000 = $1,000).
|
|
MINT_KYC_PER_TX_LIMIT_MICROS=1000000000
|
|
# Minimum provider-verified tier: basic | verified (default verified).
|
|
MINT_KYC_MIN_TIER=verified
|
|
# Dev-only escape hatch (REFUSED in production): install the permissive fake gate.
|
|
# MINT_DEV_KYC_ALLOW=1
|
|
|
|
# ---- USDC on-ramp / off-ramp (crypto) -------------------------------------
|
|
# JSON-RPC node URL (also gates the on-chain deposit watcher).
|
|
USDC_RPC_URL=
|
|
# The USDC ERC-20 token contract address that payouts `transfer(to,amount)` to.
|
|
# Mainnet USDC: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
|
|
USDC_TOKEN_CONTRACT=
|
|
# Optional: operator hot-wallet `from` address for eth_sendTransaction when the
|
|
# node holds multiple unlocked accounts.
|
|
USDC_PAYOUT_FROM=
|
|
# Coinbase Commerce hosted-charge on-ramp (optional): API key + webhook secret.
|
|
COINBASE_COMMERCE_API_KEY=
|
|
COINBASE_COMMERCE_WEBHOOK_SECRET=
|
|
|
|
# ---- Fiat / card on-ramp providers (BYOK; configure the ones you use) ------
|
|
STRIPE_WEBHOOK_SECRET=
|
|
CREEM_API_KEY=
|
|
CREEM_WEBHOOK_SECRET=
|
|
# Creem sells a fixed-price credit product bought in units.
|
|
CREEM_PRODUCT_ID=
|
|
CREEM_UNIT_PRICE_CENTS=100
|
|
# Dodo Payments (second merchant of record). DODO_PRODUCT_ID must be a
|
|
# pay-what-you-want product; webhooks go to /v1/deposits/dodo/webhook.
|
|
DODO_API_KEY=
|
|
DODO_PRODUCT_ID=
|
|
DODO_WEBHOOK_SECRET=
|
|
POLAR_ACCESS_TOKEN=
|
|
POLAR_WEBHOOK_SECRET=
|
|
PAYPAL_CLIENT_ID=
|
|
PAYPAL_CLIENT_SECRET=
|
|
PAYPAL_WEBHOOK_ID=
|
|
REVENUECAT_API_KEY=
|
|
REVENUECAT_WEBHOOK_AUTH=
|
|
# App Store direct (Server Notifications v2 + Server API; Apple-signed, no shared secret).
|
|
# Set the app's appAccountToken to the Mint account id at purchase.
|
|
APPSTORE_BUNDLE_ID=
|
|
APPSTORE_KEY_ID=
|
|
APPSTORE_ISSUER_ID=
|
|
# The App Store Connect API key (.p8 PEM).
|
|
APPSTORE_PRIVATE_KEY=
|
|
# Optional: pinned root SHA-256 (default Apple Root CA - G3).
|
|
APPSTORE_ROOT_SHA256=
|
|
ADAPTY_API_KEY=
|
|
ADAPTY_WEBHOOK_SECRET=
|
|
IYZICO_API_KEY=
|
|
IYZICO_SECRET_KEY=
|
|
IYZICO_WEBHOOK_SECRET=
|
|
# Provider base-URL mode: sandbox | live (default sandbox).
|
|
MINT_PAYMENTS_MODE=sandbox
|