# Monthly API subscription — $9.99 USDC every 30 days.
#
# Run locally:
#   pay --sandbox server start monthly.yml
#
# Activate from another terminal:
#   pay --sandbox curl http://127.0.0.1:1402/api/v1/pro/feed

name: monthly-pro-feed
subdomain: monthly-pro-feed
title: 'Monthly Pro Feed'
description: 'Subscription example — flat $9.99 USDC every 30 days.'
category: data
version: v1

# `respond` returns 200 with the verified payment signature so you can
# run this spec with no upstream service. Flip to `proxy` and set `url:`
# when you want the gateway to forward paid traffic to a real API.
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/pro/feed'
    resource: 'pro-feed'
    description: 'Pro feed — monthly subscription.'
    subscription:
      period: '30d'
      price_usd: 9.99
      currency: USDC
