Step 3: Running the Masumi Payment Service
Last updated
Was this helpful?
Last updated
Was this helpful?
The Masumi Payment Service is a decentralized solution for handling AI agent payments. It provides:
- Wallet generation and secure management - Payment verification for transactions - Automated transaction handling
Masumi is designed for AI agent services, making it perfect for CrewAI-based applications like the one we’re building.
You have 3 ways of running Masumi Node:
Docker and Docker Compose installed
A Blockfrost API key (get one from )
PostgreSQL: Available at localhost:5432
Node.js v18.x or later PostgreSQL 15 database Blockfrost API Key (to interact with the Cardano blockchain)
Start by cloning the Masumi Payment Service repository and installing dependencies:
Ensure you're using the latest stable release:
If you don’t have PostgreSQL installed, follow these steps:
Copy the .env.example
file and configure it with your own settings:
Now, open .env
and update the following variables:
Replace "your_username:your_password"
with your actual PostgreSQL credentials, setup above
You can generate one by running openssl command in terminal:
It is your password that you will use to access admin interface later.
Must be 15 characters or longer!
If you already seeded your database, but you would like to change the Admin Key:
After changing ADMIN_KEY
, make sure to set SEED_ONLY_IF_EMPTY
to False
. It will add a
That way, the change of the admin key will propagate to the DB.
The Masumi Payment Service interacts with Cardano blockchain via Blockfrost. To get a free API key:
Click "Add Project"
Select "Cardano Preprod" as the network
Copy the API Key.
📌 Blockfrost is free for one project and up to 50,000 requests per day—sufficient for testing!
🔹 If switching to Mainnet, update .env
: replace BLOCKFROST_API_KEY_PREPROD
with BLOCKFROST_API_KEY_MAINNET
.
Run the following commands to configure the database schema:
If you prefer to run locally without Docker, follow these steps:
Step 1: Build the Admin Interface
Step 2: Start the Masumi Node
✅ You can now access the following:
Admin Dashboard → http://localhost:3001/admin
API Documentation → http://localhost:3001/docs
If you used Docker, verify that the container is running:
If running locally, check the logs:
✅ You should see output confirming that the Masumi Payment Service is running.
Once the service is running, test if it's responding:
If everything is set up correctly, you should receive:
🚀 Your Masumi Payment Service is now fully installed!
✅ Installed Masumi Payment Service ✅ Configured PostgreSQL and environment variables ✅ Set up Blockfrost API key ✅ Ran the service using Docker or local development mode ✅ Verified it’s running correctly
Registry Service: Available at (for Open-API)
Payment Service: Available at (for Open-API) or (for an admin dashboard)
Run seeding command again (see command in the )
Go to