Skip to main content
Natural provides official SDKs for building agents that interact with the Natural platform.

Available SDKs

Python SDK

pip install naturalpay - Build agents in Python

TypeScript SDK

npm install @naturalpay/sdk - Build agents in TypeScript/JavaScript

Installation

pip install naturalpay
# or
uv add naturalpay

Quick start

from naturalpay import NaturalClient

# API key created from dashboard
client = NaturalClient(api_key="sk_ntl_sandbox_...")

# Create a payment on behalf of a customer
payment = await client.payments.create(
    recipient="contractor@example.com",
    amount=10000,  # cents — $100.00
    memo="Invoice #1234",
    agent_id="agt_019cd1798d637a4da75dce386343931d",
    customer_party_id="pty_019cd34e27c179bfbbe6870486b11b67",
    idempotency_key="pay_invoice_1234",
)

print(payment.transfer_id)  # "xfr_..."
print(payment.status)       # "PENDING" or "PENDING_CLAIM"

Agent authentication

Agents authenticate using API keys that belong to the developer’s party. When making payments on behalf of a customer, pass agent_id and customer_party_id:
# Payment using agent context
payment = await client.payments.create(
    recipient="vendor@example.com",
    amount=50000,  # cents — $500.00
    memo="Vendor payment",
    agent_id="agt_019cd1798d637a4da75dce386343931d",           # Your agent
    customer_party_id="pty_019cd34e27c27605a92edc2c7d1a5b34", # Customer who delegated
    idempotency_key="vendor_payment_001",
)

Available resources

Both SDKs provide these resources:
ResourceDescription
paymentsCreate and retrieve payments
walletCheck balance, withdraw
transactionsList transaction history
agentsCreate and manage agents
delegationsManage party-to-party delegations
customersList customers who delegated to you

MCP server

Both SDKs include a built-in MCP server for AI agent integration. See Send Payment for setup instructions.
  • Agents - How agents work
  • APIs - Direct API access