---
eip: 6932
label: ERC-6932
title: Subscription-Based Token
status: Draft
type: Standards Track
category: ERC
created: 2023-04-25
requires: 20
official: https://eips.ethereum.org/EIPS/eip-6932
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6932.md
canonical: https://eips.huatuo.xyz/eip-6932/
lang: en
tldr: "A draft ERC-20 extension for recurring payments: a holder subscribes once and the token contract deducts a fixed fee from their balance every period."
tags: [token, erc20, subscription, payments]
---

# ERC-6932: Subscription-Based Token

> ERC-20 extension providing access to a service or product that requires recurring payments.

**TL;DR:** A draft ERC-20 extension for recurring payments: a holder subscribes once and the token contract deducts a fixed fee from their balance every period.

## What problem does it solve?

Subscriptions are everywhere off-chain, but on Ethereum users usually have to pay manually each period, or grant an open-ended allowance to a merchant contract. Missed payments interrupt service, and big allowances are risky.

ERC-6932 builds the subscription into the [ERC-20](/eip-20/) token itself. A holder subscribes, and the contract treats a growing slice of their balance as already paid, period after period, until they unsubscribe.

## How it works

Each subscription token contract describes one service:

- `subscriptionFee()` is the amount charged per period.
- `subscriptionFrequency()` is the period length in seconds (e.g. a day, a week, a month).
- `subscriptionInfo()` returns an ID, name, description and terms-and-conditions text.
- `subscribers(idx)` lists subscribed addresses (returns `address(0)` past the end).
- `subscribe()` and `unsubscribe()` are called by the holder.

Charging is lazy, not pushed by a keeper. The rationale sketches computing how many full periods have passed since the subscription started and treating `fee × periods` as locked, capped at the holder's effective balance. A holder's spendable balance is their effective balance minus what ongoing subscriptions have consumed.

```
intervals = (block.timestamp - start) / frequency
amount    = fee * intervals          // capped at effective balance
```

## Sample code

The interface from the spec:

```solidity
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;

interface ISubscriptionERC20 {
    function subscribers(uint256 idx) external view returns (address);
    function subscriptionInfo() external view returns (uint256, string memory, string memory, string memory);
    function subscribe() external;
    function unsubscribe() external;
    function subscriptionFee() external view returns (uint256);
    function subscriptionFrequency() external view returns (uint256);
}
```

Checking the cost before subscribing (ethers v6):

```ts
const [fee, freq] = await Promise.all([sub.subscriptionFee(), sub.subscriptionFrequency()]);
const perMonth = (fee * 30n * 86400n) / freq;
console.log(`~${formatUnits(perMonth, 18)} tokens per 30 days`);
await (await sub.subscribe()).wait();
```

## Things to know

- Status is **Draft**, and the text is loose. The abstract mentions `nextPaymentDate` and a `renewSubscription` method that do not appear in the interface, and the accounting formula is only sketched. Expect implementations to differ.
- Because balances shrink over time without a transaction, `balanceOf` can change from block to block. Integrations that cache balances or assume they only change on `Transfer` events may misbehave.
- One contract equals one subscription service, so the merchant controls the token's charging logic. Read it before subscribing.
- For subscriptions paid in an existing token, allowance-based or account-abstraction approaches are more common in practice.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-6932
