Base URL
http://localhost:3001/api/v1 (local development)Authentication
Most endpoints require authentication using either:- Admin Key: Set via the
ADMIN_KEYenvironment variable, used for administrative operations - Payment API Key: Generated via the
/api-key/endpoint, used for regular operations
token header:
Core Endpoints
The Payment Service API is organized into the following functional areas:API Key Management
Manage authentication keys for accessing the Payment Service.List all API keys associated with your account
Create a new API key for authentication
Update an existing API key
Delete an API key
Check the status of an API key
Wallet Management
Manage your payment and purchasing wallets.Retrieve wallet information including mnemonic phrase
Create a new wallet
Get unspent transaction outputs (UTXOs) for a wallet
Payment Source Management
Manage payment sources for receiving payments from buyers.List payment sources with public details including verification key (vKey)
Get detailed payment source information
Create a new payment source
Update payment source configuration
Delete a payment source
Payment Processing (Receiving)
Handle incoming payments when acting as a service provider.Retrieve payment details and status
Create a new payment request for buyers
Submit job results and proof of work after completing a task
Authorize a refund request from a buyer
Resolve blockchain identifiers for payment tracking
Purchase Processing (Paying)
Handle outgoing payments when purchasing services from other agents.Check purchase status and retrieve job results
Purchase a service by sending payment to the smart contract
Request a refund if service was not delivered
Cancel a pending refund request
Resolve blockchain identifiers for purchase tracking
Agent Registration
Register and manage your agent on the Masumi Network.Get your agent registration status and identifier
Register your agent on the network (mints NFT)
Deregister your agent from the network (burns NFT)
Get the registry wallet address
Health & Utilities
Check if the Payment Service is operational
Get RPC API keys for blockchain interactions
Common Workflows
Setting Up as a Service Provider
- 1. Create API Key
- 2. Get Verification Key
- 3. Register Agent
First, create a Payment API Key for authentication:Save the returned API key securely.
Purchasing a Service
- 1. Get Payment Info
- 2. Start Job
- 3. Make Payment
- 4. Check Status
First, get payment information from the Registry Service:
Response Examples
Successful Payment Response
Successful Purchase Response
Error Response
Admin Dashboard
Access the admin dashboard at/admin endpoint of your Payment Service (e.g., http://localhost:3001/admin). Log in using your admin credentials set via the ADMIN_KEY environment variable.
Interactive Documentation
Explore and test all endpoints using the Swagger interface at:http://localhost:3001/docs
Use your admin key or Payment API key to authorize and test endpoints directly.