# Multi-tier subscription — basic, pro, enterprise on the same provider.
#
# Each tier is a separate endpoint and gets its own on-chain Plan PDA
# after `pay --sandbox server start` publishes them on first launch.
#
# Run locally:
#   pay --sandbox server start tiers.yml
#
# Activate the tier you want:
#   pay --sandbox curl http://127.0.0.1:1402/api/v1/basic/quote/AAPL
#   pay --sandbox curl http://127.0.0.1:1402/api/v1/pro/quote/AAPL
#   pay --sandbox curl http://127.0.0.1:1402/api/v1/enterprise/quote/AAPL

name: tiered-quotes
subdomain: tiered-quotes
title: 'Tiered Stock Quotes'
description: 'Three subscription tiers (basic / pro / enterprise) on the same provider.'
category: data
version: v1

routing:
  type: respond
  # type: proxy
  # url: https://api.example.com/

operator:
  currencies:
    usd: ['USDC']
  network: localnet
  fee_payer: true

endpoints:
  - method: GET
    path: 'api/v1/basic/quote/{symbol}'
    resource: 'basic-quote'
    description: 'Basic stock quotes — $5/month.'
    subscription:
      period: '30d'
      price_usd: 5.00
      currency: USDC

  - method: GET
    path: 'api/v1/pro/quote/{symbol}'
    resource: 'pro-quote'
    description: 'Pro stock quotes — $25/month.'
    subscription:
      period: '30d'
      price_usd: 25.00
      currency: USDC

  - method: GET
    path: 'api/v1/enterprise/quote/{symbol}'
    resource: 'enterprise-quote'
    description: 'Enterprise stock quotes — $199/month.'
    subscription:
      period: '30d'
      price_usd: 199.00
      currency: USDC
