> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://natural.ferndocs.com/guides/create-payment/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://natural.ferndocs.com/_mcp/server. # Create a payment Send money to an agent, email, phone number, or Natural party ID. For new parties, Natural creates a payment link, delivers the link by email or SMS, and onboards the new party. Every call is shown five ways — MCP, Python, TypeScript, CLI, and cURL. The MCP tab is the natural-language prompt you'd give an AI agent. ## 1. Get your API key Sign up at [natural.co/signup](https://natural.co/signup) (Google OAuth, email/password, or phone) and complete identity verification — KYC for individuals, KYB for businesses. See [compliance](/guides/overview/compliance) for details. Then create a developer API key in the dashboard. It's shown once — store it in a secret manager and never in version control. ```bash export NATURAL_API_TOKEN=sk_ntl_prod_abc123... ``` Connect to MCP, CLI, or SDK. For first time users, we recommend connecting over MCP. **`MCP (Claude Code)`** ```bash title="MCP (Claude Code)" claude mcp add --transport http natural https://mcp.natural.co \ --header "Authorization: Bearer $NATURAL_API_TOKEN" ``` **`Python`** ```bash title="Python" pip install natural-sdk ``` **`TypeScript`** ```bash title="TypeScript" npm install @natural-co/sdk ``` **`CLI`** ```bash title="CLI" git clone https://github.com/fern-demo/natural-cli.git && cd natural-cli && cargo build --release ``` ## 2. Create an agent Agents execute transactions. Create one in the Agents tab of the dashboard, or: **`MCP`** ```text title="MCP" Create an agent called "Carrier Payment Agent" for paying delivery carriers. ``` **`Python`** ```python title="Python" import os from natural import NaturalClient client = NaturalClient(token=os.environ["NATURAL_API_TOKEN"]) agent = client.agents.create( idempotency_key="create-carrier-agent", data={ "attributes": { "name": "Carrier Payment Agent", "description": "Pays delivery carriers", } }, ) ``` **`TypeScript`** ```typescript title="TypeScript" import { NaturalClient } from "@natural-co/sdk"; const client = new NaturalClient({ token: process.env.NATURAL_API_TOKEN }); const agent = await client.agents.create({ idempotencyKey: "create-carrier-agent", data: { attributes: { name: "Carrier Payment Agent", description: "Pays delivery carriers", }, }, }); ``` **`CLI`** ```bash title="CLI" natural-api agents create \ --idempotency-key "create-carrier-agent" \ --data.attributes.name "Carrier Payment Agent" \ --data.attributes.description "Pays delivery carriers" ``` **`cURL`** ```bash title="cURL" curl -X POST https://api.natural.co/agents \ -H "Authorization: Bearer $NATURAL_API_TOKEN" \ -H "Idempotency-Key: create-carrier-agent" \ -H "Content-Type: application/json" \ -d '{ "data": { "attributes": { "name": "Carrier Payment Agent", "description": "Pays delivery carriers" } } }' ``` The response includes the agent's `id` (`agt_*`) — store it to associate your agent for future requests. ## 3. Connect a bank account and fund your wallet Fund your wallet from a linked bank account so your agent can transact autonomously. ### Connect a bank account Link a bank account from the Wallet tab of your dashboard — Natural connects it securely through Plaid. Once linked, list your external accounts to get the `eac_*` ID to deposit from: **`MCP`** ```text title="MCP" List my linked bank accounts. ``` **`Python`** ```python title="Python" accounts = client.external_accounts.list() ``` **`TypeScript`** ```typescript title="TypeScript" const accounts = await client.externalAccounts.list(); ``` **`CLI`** ```bash title="CLI" natural-api external-accounts list ``` **`cURL`** ```bash title="cURL" curl https://api.natural.co/external-accounts \ -H "Authorization: Bearer $NATURAL_API_TOKEN" ``` ### Fund your wallet Pull funds from the linked account into your wallet: **`MCP`** ```text title="MCP" Deposit $50,000 into my wallet from my linked bank account. ``` **`Python`** ```python title="Python" deposit = client.transfers.initiate_deposit( idempotency_key="deposit-50k", data={ "attributes": { "amount": 5_000_000, "currency": "USD", "externalAccountId": "eac_550e8400e29b41d4a716446655440000", } }, ) ``` **`TypeScript`** ```typescript title="TypeScript" const deposit = await client.transfers.initiateDeposit({ idempotencyKey: "deposit-50k", data: { attributes: { amount: 5_000_000, currency: "USD", externalAccountId: "eac_550e8400e29b41d4a716446655440000", }, }, }); ``` **`CLI`** ```bash title="CLI" natural-api transfers initiateDeposit \ --idempotency-key "deposit-50k" \ --json '{"data":{"attributes":{"amount":5000000,"currency":"USD","externalAccountId":"eac_550e8400e29b41d4a716446655440000"}}}' ``` **`cURL`** ```bash title="cURL" curl -X POST https://api.natural.co/transfers/deposit \ -H "Authorization: Bearer $NATURAL_API_TOKEN" \ -H "Idempotency-Key: deposit-50k" \ -H "Content-Type: application/json" \ -d '{ "data": { "attributes": { "amount": 5000000, "currency": "USD", "externalAccountId": "eac_550e8400e29b41d4a716446655440000" } } }' ``` Confirm the funds landed before paying. Each wallet's `balance.available` is the spendable balance after pending holds: **`MCP`** ```text title="MCP" What's my wallet's available balance? ``` **`Python`** ```python title="Python" wallets = client.wallets.list() balance = wallets.data[0].attributes.balance ``` **`TypeScript`** ```typescript title="TypeScript" const wallets = await client.wallets.list(); const balance = wallets.data[0].attributes.balance; ``` **`CLI`** ```bash title="CLI" natural-api wallets list ``` **`cURL`** ```bash title="cURL" curl https://api.natural.co/wallets \ -H "Authorization: Bearer $NATURAL_API_TOKEN" ``` ## 4. Send the payment **`MCP`** ```text title="MCP" Using my Carrier Payment Agent, pay terri@contractor.com $5,000 for Q4 development work. ``` **`Python`** ```python title="Python" payment = client.payments.create( idempotency_key="pay-q4-dev-work", data={ "attributes": { "amount": 500_000, "counterparty": {"type": "email", "value": "terri@contractor.com"}, "description": "Q4 development work", "customerPartyId": "pty_019cd34e27c179bfbbe6870486b11b67", } }, ) ``` **`TypeScript`** ```typescript title="TypeScript" const payment = await client.payments.create({ idempotencyKey: "pay-q4-dev-work", data: { attributes: { amount: 500_000, counterparty: { type: "email", value: "terri@contractor.com" }, description: "Q4 development work", customerPartyId: "pty_019cd34e27c179bfbbe6870486b11b67", }, }, }); ``` **`CLI`** ```bash title="CLI" natural-api payments create \ --idempotency-key "pay-q4-dev-work" \ --x-agent-i-d agt_019cd1798d637a4da75dce386343931d \ --x-instance-i-d "$(uuidgen)" \ --json '{"data":{"attributes":{"amount":500000,"currency":"USD","counterparty":{"type":"email","value":"terri@contractor.com"},"description":"Q4 development work"}}}' ``` **`cURL`** ```bash title="cURL" curl -X POST https://api.natural.co/payments \ -H "Authorization: Bearer $NATURAL_API_TOKEN" \ -H "X-Agent-ID: agt_019cd1798d637a4da75dce386343931d" \ -H "X-Instance-ID: $(uuidgen)" \ -H "Idempotency-Key: pay-q4-dev-work" \ -H "Content-Type: application/json" \ -d '{ "data": { "attributes": { "amount": 500000, "currency": "USD", "counterparty": {"type": "email", "value": "terri@contractor.com"}, "description": "Q4 development work" } } }' ``` ## 5. Track the payment Use the transaction's `txn_*` ID to check status: **`MCP`** ```text title="MCP" Check the status of transaction txn_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p. ``` **`Python`** ```python title="Python" tx = client.transactions.get("txn_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p") ``` **`TypeScript`** ```typescript title="TypeScript" const tx = await client.transactions.get("txn_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p"); ``` **`CLI`** ```bash title="CLI" natural-api transactions get --transaction-id txn_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p ``` **`cURL`** ```bash title="cURL" curl https://api.natural.co/transactions/txn_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p \ -H "Authorization: Bearer $NATURAL_API_TOKEN" ``` ## Next steps * [Request a payment](/guides/request-payment) — collect with a payment link * [Webhooks](/guides/webhooks) — receive real-time event notifications > Send money to an agent, email, phone number, or Natural party ID