Recurring checkouts (/c and /l links) offer Subscribe on the session's network: smart-wallet spend permission, Permit2 capped allowance, Solana SPL delegate or renewal invoices by email (HyperCore / Zcash). The page states the per-period price, total cap and expiry before signing; the buyer's wallet (EIP-6963 / Wallet Standard) sends prerequisite calls and signs the server-built grant, and the API activates it, charges the first period and delivers access. Buyers get a signed /s/<token> manage page with status, next charge, charges with explorer links, cancel and an on-chain revoke. All billing calls go server-side through /v1/onchain-billing with the service token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
111 lines
5.2 KiB
Plaintext
111 lines
5.2 KiB
Plaintext
# SettleKit hosted checkout (apps/checkout) environment.
|
|
# Copy to apps/checkout/.env.local for `next dev`. Never commit real values.
|
|
#
|
|
# Every payment network FAILS CLOSED: a network this checkout cannot verify is
|
|
# hidden from the network picker and can never settle a session. The chain
|
|
# variables below are the SAME names the API and worker read, so one set of
|
|
# values enables a chain everywhere (see docs/colosseum/MULTICHAIN-PLAN.md).
|
|
|
|
# --- Data -----------------------------------------------------------------------
|
|
# Postgres shared with the API + worker. Unset = in-process demo catalog
|
|
# (seeded sessions accepting every chain, see "Demo" below).
|
|
# DATABASE_URL=postgres://user:pass@host:5432/settlekit
|
|
# Public origin of this checkout (Solana Pay links, same-origin checks).
|
|
# CHECKOUT_PUBLIC_URL=https://checkout.example.com
|
|
# Server-side API base for the pages (defaults to http://localhost:$PORT).
|
|
# CHECKOUT_API_BASE_URL=
|
|
# CHECKOUT_DELIVERY_SECRET=
|
|
# CHECKOUT_DOWNLOAD_BASE=
|
|
|
|
# --- Subscriptions (onchain billing through the SettleKit API) --------------------
|
|
# Recurring products offer "Subscribe" (spend permission / Permit2 / SPL delegate /
|
|
# renewal invoices). The checkout calls the API's /v1/onchain-billing server-side
|
|
# with a platform service token; the API must have the SAME SETTLEKIT_SERVICE_TOKEN
|
|
# (32+ chars, e.g. `openssl rand -hex 32`) and onchain billing configured.
|
|
# SETTLEKIT_API_URL=https://api.example.com
|
|
# SETTLEKIT_SERVICE_TOKEN=
|
|
# Signs buyer "manage subscription" links (/s/<token>); defaults to CHECKOUT_DELIVERY_SECRET.
|
|
# CHECKOUT_MANAGE_SECRET=
|
|
|
|
# --- Discord role delivery ----------------------------------------------------------
|
|
# Buyers connect Discord (OAuth2 identify) at checkout; the bot adds the product's
|
|
# role. Without DISCORD_BOT_TOKEN, Discord purchases show "pending setup" and the
|
|
# worker grants the role once the bot is configured. Redirect URI to register in
|
|
# the Discord developer portal: <CHECKOUT_PUBLIC_URL>/api/discord/callback
|
|
# DISCORD_BOT_TOKEN=
|
|
# DISCORD_CLIENT_ID=
|
|
# DISCORD_CLIENT_SECRET=
|
|
|
|
# --- EVM chains (USD stablecoins, 6 decimals) -------------------------------------
|
|
# mainnet | testnet for every EVM chain (default testnet); per-chain <KEY>_NETWORK.
|
|
SETTLEKIT_CHAIN_ENV=testnet
|
|
# Keys: ethereum, base, arbitrum, robinhood, hyperevm, tempo, arc.
|
|
ENABLED_EVM_CHAINS=base,arbitrum,tempo
|
|
# Optional per chain: <KEY>_RPC_URL (use your own RPC in production; the RPC is
|
|
# server-side only and never sent to wallets), <KEY>_NETWORK,
|
|
# <KEY>_MIN_CONFIRMATIONS (defaults: ethereum 12, base/arbitrum/robinhood/arc 3,
|
|
# hyperevm/tempo 1).
|
|
# BASE_RPC_URL=
|
|
# ARBITRUM_RPC_URL=
|
|
# TEMPO_RPC_URL=
|
|
# ROBINHOOD_RPC_URL=
|
|
# HYPEREVM_RPC_URL=
|
|
# ETHEREUM_RPC_URL=
|
|
# Legacy Arc settings still verify pasted Arc hashes:
|
|
# ARC_RPC_URL=
|
|
# ARC_USDC_ADDRESS=
|
|
|
|
# --- Solana (USDC via Solana Pay) ------------------------------------------------
|
|
# mainnet | devnet. RPC and USDC mint default from the cluster.
|
|
# SOLANA_CLUSTER=devnet
|
|
# SOLANA_RPC_URL=
|
|
# SOLANA_USDC_MINT=
|
|
# SOLANA_MIN_COMMITMENT=confirmed
|
|
|
|
# --- Zcash (transparent t-addresses, mainnet only) -------------------------------
|
|
# Verified through Blockchair (keyless: 1000 requests/day, 30/min). The checkout
|
|
# scans each receiving address at most once a minute. Prices: Coinbase with a
|
|
# Kraken cross-check; a quote binds for ZCASH_QUOTE_TTL_SEC.
|
|
# ZCASH_ENABLED=false
|
|
# ZCASH_EXPLORER_URL=https://api.blockchair.com/zcash
|
|
# BLOCKCHAIR_API_KEY=
|
|
# ZCASH_MIN_CONFIRMATIONS=3
|
|
# ZCASH_QUOTE_TTL_SEC=900
|
|
|
|
# --- HyperCore (Hyperliquid L1 USDC via usdSend) ---------------------------------
|
|
# The buyer's EVM wallet signs a usdSend; payments verify in the payee's ledger.
|
|
# HYPERCORE_ENABLED=false
|
|
# HYPERCORE_NETWORK=mainnet # defaults to SETTLEKIT_CHAIN_ENV, then testnet
|
|
# HYPERCORE_API_URL=https://api.hyperliquid.xyz
|
|
|
|
# --- Pay with any token (Relay, LI.FI fallback; mainnet only) ---------------------
|
|
# Buyer pays any token on any offered chain; the merchant receives the session's
|
|
# stablecoin on the session's network. Fulfilment still requires the destination
|
|
# transfer to verify on-chain. The worker's route-watch job uses the same vars.
|
|
# ROUTING_ENABLED=false
|
|
# RELAY_API_KEY= # optional, higher rate limits (enables referrer)
|
|
# RELAY_API_URL=https://api.relay.link
|
|
# LIFI_ENABLED=true
|
|
# LIFI_API_KEY=
|
|
# LIFI_INTEGRATOR=settlekit
|
|
# ROUTE_MAX_FEE_BPS=300 # route cost cap vs the amount owed (HyperCore needs ~500+ for small orders)
|
|
# ROUTE_MAX_SLIPPAGE_BPS=100
|
|
# ROUTE_QUOTE_TTL_SEC=120
|
|
# ROUTE_ORIGIN_ALLOWLIST=* # or e.g. 8453:*,42161:0xaf88d065e77c8cc2239327c5edb3a432268e5831
|
|
# ROUTE_APP_FEE_BPS=0
|
|
# ROUTE_APP_FEE_RECIPIENT=0x...
|
|
|
|
# --- GitHub App (private repo / team delivery) -----------------------------------
|
|
# Without these, GitHub purchases show "pending setup"; the worker's
|
|
# github-delivery-retry job delivers them once the App is configured.
|
|
# GITHUB_APP_ID=
|
|
# GITHUB_APP_PRIVATE_KEY=
|
|
# GITHUB_APP_INSTALLATION_ID=
|
|
|
|
# --- Demo (no DATABASE_URL) --------------------------------------------------------
|
|
# Seeded sessions accept every EVM chain; the placeholder EVM address is only
|
|
# offered on testnets. Solana / Zcash are accepted only with a real address.
|
|
# CHECKOUT_DEMO_EVM_PAY_TO=0x...
|
|
# CHECKOUT_DEMO_SOLANA_PAY_TO=
|
|
# CHECKOUT_DEMO_ZCASH_PAY_TO=t1...
|