Skip to main content

Your First Agent Payment

This guide walks you through creating an agent, linking a wallet, and making your first on-chain payment — end to end. By the end, you’ll have a working agent that can request and execute stablecoin transfers.

Prerequisites

What You’ll Build

Agent  →  SDK Key  →  Wallet  →  Policy  →  Payment Request  →  On-chain Transfer
A fully configured agent that can autonomously request payments, have them checked against a spending policy, and execute approved transfers on Tempo Testnet.

Step 1: Create a Wallet

1

Navigate to Wallets

Go to Wallets in the sidebar and click Create Wallet.
2

Configure the wallet

FieldValue
NameMy First Wallet
Chain TypeEVM
NetworkTempo Testnet
CustodySPONGE (recommended — managed keys via @paysponge/sdk, no setup)
3

Provision the wallet

Click Provision to generate an on-chain address. This creates a wallet managed by Conto’s custody infrastructure.
4

Fund the wallet

For Tempo Testnet, request pathUSD test tokens from the Conto team or use the Faucet button on the wallet detail page.
Tempo Testnet uses pathUSD — a test stablecoin that costs nothing. You can experiment freely without risking real funds.

Step 2: Create an Agent

1

Navigate to Agents

Go to Agents in the sidebar and click Create Agent.
2

Set agent details

FieldValue
NameMy First Agent
Agent TypeCUSTOM (or choose your framework)
3

Link the wallet

In the wallet linking step, select “My First Wallet” and configure spending limits:
SettingValue
Delegation TypeLimited
Per Transaction100
Daily Limit500
Do not set Per Transaction to 0. A zero value blocks all payments at the wallet level before policies are even evaluated.
4

Complete the wizard

Finish setup. Your agent is now active with a linked, funded wallet.

Step 3: Generate an SDK Key

1

Open the agent detail page

Click your agent name to open its detail page.
2

Go to SDK Integration

Click the SDK Integration tab.
3

Generate a key

Click Generate SDK Key. Copy it immediately — it’s only shown once.
export CONTO_API_KEY="conto_agent_your_key_here"

Step 4: Verify Your Setup

Before making a payment, confirm everything is wired up correctly:
curl https://conto.finance/api/sdk/setup \
  -H "Authorization: Bearer $CONTO_API_KEY"
Check the response:
  • agent.status is "ACTIVE"
  • wallets array contains your wallet
  • The wallet shows a non-zero balance

Step 5: Request a Payment

curl -X POST https://conto.finance/api/sdk/payments/request \
  -H "Authorization: Bearer $CONTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1,
    "recipientAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "purpose": "My first Conto payment",
    "category": "TESTING"
  }'
Expected response:
{
  "requestId": "cmm...",
  "status": "APPROVED",
  "currency": "pathUSD",
  "wallet": {
    "address": "0x...",
    "availableBalance": 999.00
  }
}
The requestId is your handle for executing this payment.

Step 6: Execute the Payment

Take the requestId from the previous response and execute it on-chain:
curl -X POST https://conto.finance/api/sdk/payments/REQUEST_ID/execute \
  -H "Authorization: Bearer $CONTO_API_KEY"
Replace REQUEST_ID with your actual request ID. The response includes:
  • txHash — the on-chain transaction hash
  • explorerUrl — link to verify on explore.tempo.xyz

Step 7: Verify On-Chain

Three ways to confirm your payment went through:
  1. Explorer — Click the explorerUrl from the execute response
  2. Dashboard — Go to Transactions and find your payment with status “Confirmed”
  3. API — Query the transaction status:
curl https://conto.finance/api/sdk/payments/REQUEST_ID/status \
  -H "Authorization: Bearer $CONTO_API_KEY"

Using the TypeScript SDK

The same flow using the SDK:
import { Conto } from '@conto/sdk';

const conto = new Conto({ apiKey: process.env.CONTO_API_KEY });

// Request payment
const request = await conto.payments.request({
  amount: 1,
  recipientAddress: '0x1234567890abcdef1234567890abcdef12345678',
  purpose: 'My first Conto payment',
});

console.log('Status:', request.status); // APPROVED

// Execute on-chain
if (request.status === 'APPROVED') {
  const result = await conto.payments.execute(request.requestId);
  console.log('TX Hash:', result.txHash);
  console.log('Explorer:', result.explorerUrl);
}

What Just Happened

Here’s the full flow you completed:
StepWhat Conto Did
Payment requestAuthenticated your SDK key, identified the agent
Policy checkEvaluated wallet spending limits (1isunderthe1 is under the 100 per-tx limit)
Wallet selectionPicked the linked wallet with sufficient balance
ExecutionSigned and submitted a pathUSD transfer on Tempo Testnet
ConfirmationVerified the transaction on-chain and logged it to audit trail

Troubleshooting

Your SDK key may be invalid or expired. Generate a new one from the agent detail page under SDK Integration.
Your testnet wallet needs funding. Use the Faucet button on the wallet detail page or contact the Conto team for pathUSD.
The wallet-level per-transaction limit is 0. Edit the wallet limits on the agent detail page (pencil icon) and set it to a non-zero value.
No wallet is linked to the agent, or the linked wallet doesn’t have enough balance. Check the Overview tab on the agent detail page.

Next Steps

Test Policies

Verify spending policies enforce correctly with test transactions

Secure Your Agent

Add spending limits, time windows, and counterparty controls

Recipes

Copy-paste solutions for common tasks

SDK Reference

Full payment API methods and parameters