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 is building ERC-1271 native recurring payments for exactly this — a fresh signed authorisation each billing cycle, no human in the loop once it ships.
Status: not yet live in production. createSubscription() works today on Base Sepolia testnet — a smart wallet can register an ERC-1271 subscription now. But the production keeper bot does not yet execute recurring pulls for ERC-1271 (smart-contract wallet) subscriptions. A subscription created this way will not be billed automatically until this ships. If you're evaluating this for a live trading bot, contact us first.
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:
- Market data cuts out — the bot trades on stale prices
- Signal feed expires — the strategy goes blind
- RPC node throttles — execution slows or fails
- Indexer access revoked — on-chain data disappears
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:
Unlike an EOA wallet using an EIP-2612 permit, a smart-contract wallet can't sign one permit that covers every future cycle — ERC-1271 requires a fresh signed authorisation for each billing cycle, bound to that specific pull. This is a deliberate security choice: it bounds the blast radius of any single signature. Once production keeper support ships, the bot signs each cycle's authorisation and AuthOnce's keeper submits it on-chain, pulling the agreed USDC amount directly from the bot's wallet — no manual transfer, no custodian holding funds. No new human approval is needed per cycle, but the bot's own wallet software must produce the signature each time.
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. Create the subscription on-chain
The bot calls the AuthOnce SubscriptionVault contract to create a subscription, specifying the merchant address, amount, token, and billing interval. This registers the subscription's terms on-chain. It is a separate step from authorising each pull: because the wallet is a smart contract, ERC-1271 requires a fresh signature for each individual billing cycle rather than one signature covering all future cycles.
// 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. Once production keeper support for ERC-1271 pulls ships, the keeper will retry the pull daily during this window, giving the bot 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:
- Custodial pre-funding — lock USDC with a platform that controls disbursement. The platform holds your funds.
- Manual transfers — a human sends USDC each billing cycle. Not autonomous at all.
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
- Signature standard: ERC-1271 (smart contract signature verification) + EIP-712
- Tokens: USDC, USDT, EURC on Base Network
- Billing intervals: Weekly, monthly, yearly
- Grace period: 1–30 days, configurable per subscription
- Protocol fee: 0.5% flat — no per-transaction fee, no monthly platform fee
- Webhook events:
payment.alert,subscription.expired,subscription.resumed - Network: Base Network (Ethereum L2, OP Stack)
Current status
AuthOnce is live on Base Sepolia testnet. Webhook notifications and the keeper bot's standard (EOA) payment execution are operational today. ERC-1271 recurring pull execution for smart-contract wallets — the mechanism this article describes — is not yet live in production; createSubscription() works, but a subscription created this way is not billed automatically until keeper support ships. Mainnet launch timing depends on completion of the security audit; no date is committed yet.
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 subscription creation is live on Base Sepolia testnet today. Recurring pull execution is in development — contact us to discuss timelines.
Apply as founding merchant →