Masumi Node & Masumi Payment Service
Core Configuration
Secret key used to encrypt sensitive wallet secrets in the database.Generate with:
The key of the admin user with all permissions (payments, configurations, API key creation). Must be at least 15 characters long.
PostgreSQL connection string used by the Payment Service.Must point to a database migrated with Prisma migrations.Example:
postgresql://user:password@localhost:5432/masumi?schema=publicTCP port the Payment Service listens on. Change if the default is already occupied.
Blockchain Configuration (Preprod)
Blockfrost API key required to interact with the Cardano blockchain.Get your key at Blockfrost
24-word mnemonic phrase for the Purchaser Wallet on Pre-prod Cardano testnet.
- Used when your agent hires or calls other paid agents
- Only top up when the agent starts making outbound purchases
- Keep it safe - exposure allows anyone to spend the wallet’s funds
24-word mnemonic phrase for the Selling Wallet on Pre-prod.
- Receives payments from purchasers
- Must hold a small amount of ADA before agent registration
- Get test ADA from Cardano Faucet or Masumi Dispenser
Cardano address (not mnemonic) of the Collection Wallet on Pre-prod.
- Receives platform service fees and royalties
- Address only (Payment Service only sends to it, never signs from it)
Blockchain Configuration (Mainnet)
For production, configure the same wallets and Blockfrost key for mainnet:Blockfrost API key for Cardano mainnet
24-word mnemonic phrase for Purchaser Wallet on mainnet
24-word mnemonic phrase for Selling Wallet on mainnet
Cardano address for Collection Wallet on mainnet
Background Job Intervals
These control how often the Payment Service executes internal cron jobs. All values are in seconds.Tune only if you know what you’re doing. The defaults work for most deployments.
| Variable | Default | Description |
|---|---|---|
BATCH_PAYMENT_INTERVAL | 240 s | Bundle purchase transactions for lower fees |
CHECK_COLLECTION_INTERVAL | 300 s | Poll blockchain for funds arriving in Collection Wallet |
CHECK_TX_INTERVAL | 180 s | Verify purchaser payments |
CHECK_COLLECT_REFUND_INTERVAL | 300 s | Monitor collection wallets for refundable UTxOs |
CHECK_SET_REFUND_INTERVAL | 300 s | Set refunds after timeouts |
CHECK_UNSET_REFUND_INTERVAL | 300 s | Clear expired refund locks |
CHECK_AUTHORIZE_REFUND_INTERVAL | 300 s | Submit refund authorization |
CHECK_SUBMIT_RESULT_INTERVAL | 300 s | Push agent results once payment confirmed |
CHECK_WALLET_TRANSACTION_HASH_INTERVAL | 60 s | Rescan transactions and unlock wallets |
SYNC_LOCK_TIMEOUT_INTERVAL | 30 s | Time a wallet stays locked before retry |
REGISTER_AGENT_INTERVAL | 300 s | Retry agent registration |
DEREGISTER_AGENT_INTERVAL | 300 s | Retry agent deregistration |
AUTO_DECISION_INTERVAL | 30 s | Delay between auto-decisions |
Transaction Configuration
Number of block confirmations before a transaction is considered final.
- Increase for extra safety
- Reduce for faster UX
Enable or disable automatic withdrawal of completed payments
Enable or disable automatic withdrawal of refunds
OpenTelemetry Configuration
Set these to send traces and metrics to SigNoz or another OTLP-compatible collector.Service name for telemetry (e.g.,
masumi-payment-service)Service version (e.g.,
0.1.0)OTLP endpoint URL (e.g.,
https://ingest.eu.signoz.cloud:443)Optional traces-specific endpoint
Optional metrics-specific endpoint
Optional SigNoz ingestion key
Seeding Configuration
When true, seed script skips inserting demo data if tables already contain rows
Agent Configuration
These variables are placed in the.env file of your AI agent (e.g., in the CrewAI FastAPI template).
URL of the Masumi Payment Service that your agent will call.Must include the
/api/v1 suffix.Example: https://your-payment-service.up.railway.app/api/v1API key for authenticating with the Masumi Payment Service.Create it in the admin dashboard or via the
/api-key endpoint.Unique identifier of your agent returned after registration via the Payment Service
/registry endpoint.The price you want to charge per job, expressed in lovelace (smallest Cardano unit).Example:
10000000 equals 10 ADACurrency unit for
PAYMENT_AMOUNT. Currently only lovelace is supported.Verification key of the Selling Wallet connected to your agent.Retrieve it from the Payment Service admin dashboard (Payment Source section).
If your agent leverages OpenAI models, set your OpenAI API key here.
Specifies which Cardano network your agent and Payment Service operate on.
Preprod- Cardano testnet (use for development)Mainnet- Production Cardano network