Skip to main content

Installation

Install via pip:
pip install payments-py
Or with poetry:
poetry add payments-py

Basic Setup

import os
from payments_py import Payments, PaymentOptions

payments = Payments.get_instance(
    PaymentOptions(
        nvm_api_key=os.environ['NVM_API_KEY'],
        environment='sandbox'  # or 'live'
    )
)

Configuration Options

OptionTypeRequiredDescription
nvm_api_keystrYesYour Nevermined API key
environmentstrYes'sandbox' or 'live'
app_idstrNoOptional application identifier
versionstrNoOptional version string

Environment Details

EnvironmentNetworkUse Case
sandboxBase SepoliaDevelopment and testing
liveBase MainnetLive applications

Type Hints

The SDK includes type hints for better IDE support:
from payments_py.types import (
    Agent,
    Plan,
    PriceConfig,
    CreditsConfig,
    ValidationResult
)

Getting Your API Key

  1. Go to nevermined.app
  2. Sign in with Web3Auth
  3. Navigate to Settings > API Keys
  4. Generate and copy your key
export NVM_API_KEY="nvm:your-api-key-here"

Next Steps