Environment

Backend environment variables (SuiOutKit operators only).

Not required for SDK integration. This page is for teams operating or running the SuiOutKit backend. Merchants only need `merchantAddress` in the SDK - see Installation.

Configure these values in backend/.env (see backend/.env.example). The table below separates core operator values from optional provider and storage settings. Keep operator private keys and provider secrets out of client-side code.

Core

VariableDescription
PORTHTTP port (default 5000)
REDIS_MODElocal (standalone Redis via ioredis) or live (Upstash REST)
REDIS_URLRedis connection string (used when REDIS_MODE=local)
REDIS_HOST, REDIS_PORTRedis host/port override (optional, default localhost:6379)
REDIS_PASSWORDRedis password / Upstash token
REDIS_TLS_ENABLEDSet true to enable TLS (Upstash)
SESSION_TTLCheckout session expiry in seconds (default 1800)

Minimum for local development

For a quick local run you typically need at least:

PORT=5000
REDIS_MODE=local
REDIS_URL=redis://localhost:6379
SUI_NETWORK=testnet
SUPPORTED_COINS='{"SUI":{"type":"0x2::sui::SUI","coingeckoId":"sui","decimals":9}}'

Operator-only values (Sui keys, WALRUS keys, provider secrets) are required for a production deployment. See backend/.env.example for full list and example values.

Payment providers

VariableDescription
FLW_API_BASEFlutterwave API base URL
FLW_PUBLIC_KEYFlutterwave public key
FLW_SECRET_KEYFlutterwave secret
FLW_HASHWebhook verification hash
STRIPE_PUBLIC_KEYStripe publishable key
STRIPE_SECRET_KEYStripe secret
STRIPE_WEBHOOK_SECRETStripe webhook signing secret

Notes:

  • Use Stripe test keys for development and sk_live... keys in production. Keep STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET server-side only.
  • For Flutterwave, FLW_SECRET_KEY should start with FLWSECK (Test or Live). FLW_HASH is used to validate incoming webhooks.

Sui

VariableDescription
SUI_RPC_ENDPOINTJSON-RPC endpoint (used by indexer for suix_queryEvents polling)
SUI_GRPC_ENDPOINTgRPC endpoint (used by SuiGrpcClient for Payment Kit flows)
SUI_NETWORKtestnet or mainnet
PACKAGE_IDPublished suioutkit Move package
PAYMENT_KIT_PACKAGE_ID_testnet / PAYMENT_KIT_PACKAGE_ID_mainnetPayment Kit registry package (required for outPay flow)
TREASURY_IDTreasury shared object
TREASURY_ADMIN_CAP_IDOptional - TreasuryAdminCap object ID (skips wallet scan on treasury scripts)
FIAT_REGISTRY_IDPayment Kit registry (fiat)
FIAT_REGISTRY_ADMIN_CAP_IDRegistry admin cap
FIAT_REGISTRY_NAMERegistry name string (e.g. suioutkit-fiat-settlements)
CRYPTO_REGISTRY_IDRegistry (crypto flows)
CRYPTO_REGISTRY_NAMERegistry name string
CRYPTO_REGISTRY_ADMIN_CAP_IDCrypto admin cap
SUPPORTED_COINSJSON map of settlement coins. Format: {"SYMBOL":{"type":"<full_coin_type>","coingeckoId":"<coingecko_id>","decimals":<int>}}. Example: {"SUI":{"type":"0x2::sui::SUI","coingeckoId":"sui","decimals":9},"USDC":{"type":"0x...::usdc::USDC","coingeckoId":"usd-coin","decimals":6}}
DEFAULT_COINSymbol of the default settlement coin (default SUI)
SETTLEMENT_TOKEN_TYPELegacy - fallback when SUPPORTED_COINS is not set. Use SUPPORTED_COINS instead.
SUI_OPERATOR_PRIVATE_KEYSigns settlement PTBs

Notes:

  • SUI_OPERATOR_PRIVATE_KEY must be kept secret. The backend accepts either bech32 (suiprivkey1...) or hex-prefixed (0x...) formats; ensure your operator wallet has SUI for gas.
  • PACKAGE_ID, TREASURY_ID, and registry IDs are populated when you deploy the Move package and bootstrap registries - see contracts/suioutkit/ and the Developer Guide for deploy steps.

Walrus

VariableDescription
WALRUS_UPLOAD_MODEpublisher or sdk
WALRUS_EPOCHSStorage epochs
WALRUS_DELETABLEAllow blob deletion (default false)
WALRUS_PUBLISHER_URLPublisher URL (testnet/mainnet)
WALRUS_USE_UPLOAD_RELAYEnable upload relay fallback
WALRUS_UPLOAD_RELAY_URLUpload relay endpoint
WALRUS_UPLOAD_RELAY_MAX_TIPMax tip for relay upload
WALRUS_OPERATOR_PRIVATE_KEYRequired when WALRUS_UPLOAD_MODE=sdk

Notes:

  • WALRUS_UPLOAD_MODE=publisher lets you use the public Walrus publisher endpoint (no operator key needed). sdk mode requires WALRUS_OPERATOR_PRIVATE_KEY and SUI/WAL funds for registering blobs.

Troubleshooting

IssueCheck
Treasury abort code 4Fund treasury for the settlement coin type (see SUPPORTED_COINS)
FX falls back to ~1300FX upstream unreachable
Walrus upload failsTry upload relay or publisher mode

If you are operating the backend in production, follow the Developer Guide (/docs/developer-guide) for deployment checklists (keys, secure env, and Sui object IDs). Always rotate and protect private keys.