# Annual subscription with an HTTP-layer expiry cap.
#
# `period: 52w` plus `expires_at:` means the on-chain authorization can
# keep renewing forever, but the gateway stops accepting renewals after
# 2027-12-31T00:00:00Z and serves fresh 402 challenges.
#
# Run locally:
#   pay --sandbox server start annual-with-expiry.yml
#
# Activate from another terminal:
#   pay --sandbox curl http://127.0.0.1:1402/api/v1/research/quarterly

name: annual-research
subdomain: annual-research
title: 'Annual Research Archive'
description: 'Annual subscription with an HTTP-layer expiry cap.'
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/research/{report}'
    resource: 'research'
    description: 'Research archive — annual subscription, cap at end of 2027.'
    subscription:
      period: '52w'
      price_usd: 199.00
      currency: USDC
      expires_at: 2027-12-31T00:00:00Z
