> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentaos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sell a subscription

> Create a monthly plan with a free trial, share it, take your first subscriber, change their plan, and cancel. All from the dashboard, in test mode.

This guide takes you from no plan to a running subscription in the dashboard. You create a monthly plan with a 14-day free trial, pay for it yourself as a test buyer, then move the subscriber to another plan and cancel. Everything runs in **Test mode**, so no real money moves.

How subscriptions behave over their life, and the same actions from code, are on the [Subscriptions](/payments/subscriptions) page.

## Before you start

* An AgentaOS account. The dashboard opens in **Test mode**. You only need to verify your business to take real money: see [Go live](/guides/go-live).
* A second browser, or a private window, to act as the buyer.
* The test card `4242 4242 4242 4242`, with any future expiry date and any CVC. Type it only into the card form on the checkout page.

## Create the plan

<Steps>
  <Step title="Start a new product">
    In the sidebar, click **Products**, then click **New product**.
  </Step>

  <Step title="Name it">
    Under **Details**, type a **Product name**, for example `Pro`. Buyers see the name and the description on the checkout.
  </Step>

  <Step title="Set the price">
    Under **Pricing**, type the price, for example `29`, and pick **EUR** or **USD**. Click **Subscription**, then **Monthly**.
  </Step>

  <Step title="Add the trial">
    In **Free trial (days)**, type `14`. Leave **Trial price** empty for a free trial.
  </Step>

  <Step title="Create it">
    Click **Create product**. The next screen says "Pro is live". Live here is the product's word for published. You are still in test mode.
  </Step>
</Steps>

Click **View product** to open the plan's page.

<Frame caption="The plan's page. Copy link gives you the link for buyers.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/plan-page.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=242648bd5d3df7cf19239c6a15dfc502" alt="The product page for Pro: Active, Subscription, EUR, €29.00 per month, VAT added at checkout, with the buttons Copy link, Edit, Copy to live, Preview, QR code, and Deactivate." width="1440" height="787" data-path="images/subscriptions/plan-page.png" />
</Frame>

## Share the link or embed it

Click **Copy link** and send the link to a buyer: in an email, on your pricing page, or in a post. One link works for every buyer.

To show the checkout on your own site instead, open **Building this into your site?** on the plan's page. Under **Embed on your site**, click **Copy snippet** and paste it into your page. The snippet works only on sites you approve under **Settings → Developers → Approved sites**. See [Embedded checkout](/payments/embedded-checkout).

## Take the first subscriber

Open the link in your second browser and pay as the buyer.

<Steps>
  <Step title="Fill in the buyer details">
    Type an email such as `buyer@example.com` and pick a **Country**. The checkout shows **Due today** €0.00 and the monthly price after the trial, with any VAT for that country.

    <Frame caption="The first checkout step for a plan with a free trial.">
      <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/checkout-trial.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=3f764ea37e2fdccc830f941bf56f29a5" alt="The checkout for Pro with the buyer's email, name, and Germany filled in. The summary shows Pro €29.00, Tax 24% €6.96, and Due today €0.00, then €35.96 a month after the 14-day free trial." width="1440" height="787" data-path="images/subscriptions/checkout-trial.png" />
    </Frame>

    The 24% is the Estonian rate. The checkout charges it to every EU consumer while AgentaOS sells under the EU distance-selling threshold. See [How tax works](/mor/tax#the-rate-on-eu-sales-today).
  </Step>

  <Step title="Continue to payment">
    Click **Continue to payment**.
  </Step>

  <Step title="Enter the test card">
    Type `4242 4242 4242 4242` in **Card number**, any future date in **Expiration date**, and any three digits in **Security code**.
  </Step>

  <Step title="Start the trial">
    Click **Start 14-day free trial**. The checkout confirms "Trial started" and €0.00 due today.
  </Step>
</Steps>

<Frame caption="What the buyer sees after starting the trial.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/trial-started.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=c2d4b1230d5cb06b6e938a2ff7aca67f" alt="The confirmation page: Trial started, €0.00 due today, then €35.96 a month after your 14-day free trial, and Card saved with AgentaOS." width="1440" height="787" data-path="images/subscriptions/trial-started.png" />
</Frame>

The buyer and you each get an email that the trial started. The first charge happens on the day the trial ends.

## See the subscriber

In the sidebar, click **Subscriptions**. The new subscriber shows with the status **Trialing** and the date of the first charge under **Renews**.

<Frame caption="The first subscriber, in their free trial.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/subscriptions-list.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=2af0f4af916df591e271bb27cb538997" alt="The Subscriptions list with one row: Alex Buyer, buyer@example.com, Trialing, Pro, €35.96/mo, renews Oct 12, 2026." width="1440" height="787" data-path="images/subscriptions/subscriptions-list.png" />
</Frame>

The price in the list includes any VAT the buyer pays, so it can be higher than the plan price. Click the subscriber's name to open the subscription.

<Frame caption="The subscription page. Change plan and Cancel subscription are on the right.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/subscription-page.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=84453aa15ee3482da3db002d376e0671" alt="The subscription page for Pro: €35.96/mo, Trialing, with the customer's name and email, the plan details, and the buttons Change plan and Cancel subscription." width="1440" height="787" data-path="images/subscriptions/subscription-page.png" />
</Frame>

## Change their plan

A plan change needs a second plan in the same currency and with the same interval. Create a product named `Pro Plus` at `49`, **Subscription**, **Monthly**, the same way as above.

<Steps>
  <Step title="Open the dialog">
    On the subscription page, click **Change plan**.
  </Step>

  <Step title="Pick the new plan">
    Pick **Pro Plus** from the list. The dialog shows what is due today and the price from the next renewal.
  </Step>

  <Step title="Confirm">
    Click **Confirm change**. An upgrade applies at once, so the subscription now shows Pro Plus.
  </Step>
</Steps>

A move to a cheaper plan waits for the end of the period. The dialog says "No charge today" and the date the change takes effect.

<Frame caption="A downgrade back to Pro: nothing is charged today.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/change-plan-downgrade.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=ecc371317655716a23f864f2fce2a1f5" alt="The Change plan dialog with Pro at €29.00 a month selected. It says No charge today, and Takes effect Oct 12, 2026, then €35.96 a month." width="1440" height="787" data-path="images/subscriptions/change-plan-downgrade.png" />
</Frame>

After you confirm a downgrade, the subscription shows **Scheduled change** with the new plan and its start date. To drop the scheduled change, click **Change plan** again and pick the plan marked "current plan".

## Cancel

<Steps>
  <Step title="Start the cancellation">
    On the subscription page, click **Cancel subscription**.
  </Step>

  <Step title="Confirm">
    Read the dialog, then click **Cancel subscription** again.
  </Step>
</Steps>

<Frame caption="Canceling keeps the period the buyer already has.">
  <img src="https://mintcdn.com/agentokratia/ob7A8SZLgGb2oPrT/images/subscriptions/cancel-dialog.png?fit=max&auto=format&n=ob7A8SZLgGb2oPrT&q=85&s=c3228a2e2f5ade4ee4e0901aaf8cff4d" alt="The Cancel subscription? dialog. It says the subscription stays active until the end of the current period, Oct 12, 2026, the customer keeps what they have paid for, and there is no refund." width="1440" height="787" data-path="images/subscriptions/cancel-dialog.png" />
</Frame>

The status changes to **Cancels** followed by the end date. The subscriber keeps access until then, and nothing more is charged. To keep them after all, click **Resume subscription** before that date.

## From code: subscribe a signed-in user

When the buyer already has an account in your app, create the checkout from your server with the plan's link ID and your own user ID in `metadata`. Use these pages:

* [Subscriptions in the SDK](/sdk/pay-subscriptions): the checkout call for a signed-in user, and how to match renewals to your user.
* [Paywall for logged-in users](/sdk/paywall-for-logged-in-users): the complete integration, as a runnable demo app with the user's invoices and plan management.
* [Subscriptions](/payments/subscriptions#from-code): creating plans, listing subscriptions, plan changes, and canceling from code.

## Next steps

<Columns cols={2}>
  <Card title="Subscriptions" icon="rotate" href="/payments/subscriptions">
    Trials, plan changes, cancellation, and the code for each.
  </Card>

  <Card title="Discount codes" icon="ticket" href="/payments/discount-codes">
    Give new subscribers money off their first invoice.
  </Card>

  <Card title="Receive webhooks in Express" icon="bell" href="/sdk/handle-webhooks">
    Unlock access when a subscriber pays.
  </Card>

  <Card title="Go live" icon="rocket" href="/guides/go-live">
    Take real payments.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.