AI Agent Payments

How AI Trading Bots Can Pay for Subscriptions Autonomously

Autonomous trading bots need uninterrupted access to market data, signal feeds, and infrastructure APIs. One missed payment means trading blind. AuthOnce fixes this with ERC-1271 native recurring payments — the bot authorises once, pays forever.

Vasco Diogo · June 28, 2026 · 8 min read · authonce.io

The problem: autonomous bots, manual payments

A production trading bot operates 24 hours a day, 7 days a week. It monitors order books, executes strategies, manages risk — all without human intervention. That is the point. Autonomy is the feature.

But when it comes to paying for the services it depends on, the autonomy breaks down completely. Every data provider, signal API, and infrastructure tool requires either a human credit card on file or a manual USDC transfer. Both require a human in the loop.

The consequences of a missed payment are severe:

In a fast-moving market, any of these means losses. The bot that was supposed to run autonomously now depends entirely on a human remembering to top up a subscription.

The core problem: There is no existing Web3-native solution for autonomous recurring payments. Every current approach requires either a custodial intermediary or a human approval step. AuthOnce was built to solve this.

The solution: ERC-1271 native recurring billing

AuthOnce is a non-custodial subscription protocol on Base Network. For AI agents and smart contract wallets, it implements ERC-1271 signature verification — the standard that allows smart contracts to sign messages and authorise on-chain actions.

The full autonomous payment cycle looks like this:

🤖
Trading bot
Smart wallet
✍️
Authorises once
ERC-1271 · EIP-712
🔄
Keeper pulls
Every cycle
🪝
Webhook fires
Agent responds

The bot signs a subscription authorisation once using ERC-1271. From that point, AuthOnce's keeper bot pulls the agreed USDC amount directly from the bot's wallet on each billing cycle — weekly, monthly, or yearly. No human approval. No manual transfer. No custodian holding funds.

Step-by-step: integrating a trading bot with AuthOnce

1. Deploy or use an existing smart wallet

The trading bot needs a smart contract wallet — any ERC-1271 compatible implementation works. Safe (formerly Gnosis Safe) is the most widely used. The wallet holds the bot's operating treasury in USDC.

2. Authorise the subscription on-chain

The bot calls the AuthOnce SubscriptionVault contract to create a subscription. This involves a single ERC-1271 signed permit — the bot's smart wallet signs the authorisation, specifying the merchant address, amount, token, and billing interval.

// Create subscription via AuthOnce SubscriptionVault
const tx = await vault.createSubscription({
  merchant: "0xMerchant...",
  token:    "0xUSDC...",
  amount:   parseUnits("49", 6),    // $49 USDC
  interval: "monthly",
  gracePeriodDays: 7,
});

3. Register a webhook endpoint

When creating the subscription via the AuthOnce API, the bot registers a webhook URL. This is the endpoint AuthOnce will POST to when payment events occur — failed payments, grace period warnings, expiry notices.

// Register webhook at subscription time
const res = await fetch("https://api.authonce.io/subscriptions/link", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    tx_hash:                subscribeTxHash,
    product_slug:           "market-data-pro",
    subscriber_webhook_url: "https://your-bot.com/authonce/events",
    is_contract_vault:      true,
  }),
});

4. Handle payment events programmatically

When a payment fails — say, the bot's USDC balance is temporarily low — AuthOnce fires a POST to the registered webhook. The bot receives the event and can respond autonomously: top up the wallet, trigger an alert, or pause trading until funds are restored.

// Bot's webhook handler
app.post("/authonce/events", (req, res) => {
  const { event, subscription_id, title } = req.body;

  if (event === "payment.alert") {
    // Respond autonomously — no human needed
    bot.topUpWallet();
    bot.pauseStrategy("insufficient_funds");
    alerts.send(title);
  }

  res.json({ received: true });
});

5. Autonomous grace period recovery

AuthOnce gives subscribers a programmable 1–30 day grace period when a payment fails. During this window, the keeper retries the pull daily. The bot has time to top up its wallet programmatically — without any subscription expiring or access being cut.

Zero downtime payments: With a 7-day grace period, the bot has a full week to detect the failure, top up, and resume normal billing — all without losing access to a single data feed.

What services can a trading bot subscribe to?

Any crypto data provider, API service, or infrastructure tool that integrates AuthOnce can be billed this way. The natural targets are:

📊 Market data providers

Real-time price feeds, order book data, historical OHLCV, liquidity analytics. Any subscription-based data service.

📡 Signal APIs

Alpha signal providers, sentiment feeds, on-chain flow data, MEV analytics. Recurring access to alpha.

⚡ RPC infrastructure

Dedicated node access, execution relay subscriptions, private mempool access, bundle submission APIs.

🔍 Indexing services

On-chain data indexers that power real-time position tracking, event monitoring, and analytics.

Why non-custodial matters for bots

Existing subscription solutions for crypto bots involve one of two bad patterns:

AuthOnce is neither. The bot's wallet retains full custody. AuthOnce only pulls the exact authorised amount on the billing date — nothing more. The smart contract is open-source and operates on Base Network with no intermediary between the bot's wallet and the merchant's wallet.

Technical specification

Current status

AuthOnce is live on Base Sepolia testnet. ERC-1271 smart wallet support, webhook notifications, and the keeper bot are all operational. Mainnet launch is targeted for September 2026, contingent on the completed security audit.

If you are building a trading bot, autonomous agent, or any smart contract wallet that needs recurring payment capability — apply as a founding merchant. The first 5 merchants get lifetime Growth tier free and direct access to the founder.

Build autonomous payments for your trading bot

ERC-1271 native. Non-custodial. Webhook-driven. Live on Base Sepolia testnet today.

Apply as founding merchant →