> For the complete documentation index, see [llms.txt](https://loopfin.gitbook.io/desu-or-decentralized-subscription-payments/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://loopfin.gitbook.io/desu-or-decentralized-subscription-payments/guides/decentralized-subscription-payments.md).

# Decentralized Subscription Payments

**Got a minute?** Check out a video demo of subscriptions on Desu:

{% embed url="<https://www.youtube.com/watch?t=2s&v=krR2-qRm4ts>" %}

{% hint style="info" %}
**Good to know:** All payments made in cryptocurrency on Desu are peer to peer and handled by smart contracts in a trustless manner. Desu is a non custodial platform and never has access to your funds or private keys!
{% endhint %}

## Subscription Overview

The create subscription function creates a smart contract between the creator and the subscriber. The smart contract transfers the payment/tokens into the Desu smart contract, tokens start getting transferred from the subscriber to the creator once every month.‌

Tokens are not actually transferred to the creators address until the creator withdraws the tokens that are allocated to them each month within the smart contract. What is actually happening in this allocation is not a transaction, rather an allocation of funds. Every month, the in-contract allowance of the subscriber decreases and the creators increases, but the tokens are not officially transfered to the creators wallet address until the creator executes the creator withdraw function. Learn more about this info below.&#x20;

## Subscription basics

Terms to cover for subscriptions on Desu.

1. Subscriber
2. Creator
3. Deposit
4. Creator Withdrawal
5. Cancel Subscription

Subscriber: The user who is subscribing to the creator to get access to exclusive content&#x20;

Creator: The user who is creating exclusive content&#x20;

Deposit: There is an initial deposit of funds made into a smart contract to cover the entire payment period chosen by the subscriber. Ex, the subscriber subscribes to the creator for 6 months with a monthly pay period of $10. A total of $60 will be deposited but only the first month will be charged to the subscriber. The subscriber can cancel anytime and receive all of their remainning funds back.

Creator Withdrawal: The smart contract will allocate funds deposited by the subscriber to the creator every monthly pay period to cover the monthly recurring subscription payment. This charge and allocation will be done every month until the entire subscription duration is over. After each month, the creator can withdraw their earnings from the smart contract into their wallet address to collect their earnings.&#x20;

Cancel Subscription: The subscriber may cancel their subscription at any moment and withdraw all funds that have not yet been charged from the smart contract. Ex. The Subscriber would like to cancel their 6 month subscription for $60 ($10 per month for 6 months). The subscriber is canceling their subscription after 3 months with 3 more months still remaining and yet to be charged. Upon the Subscriber canceling, the subscriber may withdraw and return their full remaining balance that has not been charged yet, which in this example would be $30 for the remaining 3 months that were not charged yet.

## [Sign Up Now!](/desu-or-decentralized-subscription-payments/guides/sign-up.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://loopfin.gitbook.io/desu-or-decentralized-subscription-payments/guides/decentralized-subscription-payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
