Prerequisites
Before you begin, make sure you have:1
Development Environment
- Node.js 16+ and npm/yarn (for TypeScript)
- Python 3.8+ (for Python)
- A code editor (VS Code recommended)
2
Nevermined API Key
Get your API key from the Nevermined App
3
Test Tokens (Optional)
Some test tokens for testing (you can get some USDC from here)
Installation
Getting Your API Key
- Go to the Nevermined App
- Log in with your credentials (email, Google account, or GitHub)
- Navigate to the API Keys section in the left user menu
- Click on the New API Key button at the top right of the page
- Generate a new key, give it a descriptive name, and copy it
- Store this key securely as an environment variable (e.g.,
NVM_API_KEY
)
Never expose your API key in client-side code or commit it to version control. Always use environment variables.
Initialize the Payments Libraries
Environment Configuration
Choose the appropriate environment for your use case:Sandbox Environment
Sandbox Environment
- Use case: Development and testing
- Payments: Test fiat and tokens (free)
- Environment:
'sandbox'
- Network: Base Sepolia testnet
Live Environment
Live Environment
- Use case: Live applications
- Payments: Fiat (via Stripe) and any ERC-20 tokens
- Environment:
'live'
- Network: Base
Common Issues
Invalid API Key Error
Invalid API Key Error
Make sure your API key is correctly set in your environment variables and has the proper permissions.
Network Connection Issues
Network Connection Issues
Check that you’re using the correct environment (‘sandbox’ or ‘live’) and that your network connection is stable.