{"openapi":"3.1.0","info":{"title":"AppStoreStatistics Agent Commerce API","version":"1.0.0","description":"Authenticated agents can create Stripe-hosted checkout sessions for AppStoreStatistics Full Access. Card details are entered only on Stripe."},"servers":[{"url":"https://appstorestatistics.com"}],"x-service-info":{"categories":["software","app-store-intelligence","aso"],"docs":{"homepage":"https://appstorestatistics.com/pricing","llms":"https://appstorestatistics.com/llms.txt","apiReference":"https://appstorestatistics.com/agent-payments.md"}},"paths":{"/api/agent-commerce/checkout-sessions/create/monthly":{"post":{"operationId":"create_monthly_checkout_session","summary":"Create monthly Stripe Checkout session","description":"Creates a short-lived hosted Stripe Checkout URL. Authentication alone never grants access; entitlement is activated only after Stripe confirms payment through the signed webhook.","security":[{"firebaseBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"x-payment-info":{"offers":[{"intent":"session","method":"stripe","amount":"799","currency":"EUR","description":"Monthly Full Access; Stripe-hosted checkout. Yearly agent checkout does not apply a trial."}]},"responses":{"201":{"description":"Hosted checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"Invalid request or idempotency key"},"401":{"description":"Missing or invalid Firebase bearer credential"},"409":{"description":"Full Access is already active"},"429":{"description":"Rate limited"},"502":{"description":"Stripe session could not be created"},"503":{"description":"Checkout is not configured"}}}},"/api/agent-commerce/checkout-sessions/create/yearly":{"post":{"operationId":"create_yearly_checkout_session","summary":"Create yearly Stripe Checkout session","description":"Creates a short-lived hosted Stripe Checkout URL. Authentication alone never grants access; entitlement is activated only after Stripe confirms payment through the signed webhook.","security":[{"firebaseBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"x-payment-info":{"offers":[{"intent":"session","method":"stripe","amount":"4999","currency":"EUR","description":"Yearly Full Access; Stripe-hosted checkout. Yearly agent checkout does not apply a trial."}]},"responses":{"201":{"description":"Hosted checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"Invalid request or idempotency key"},"401":{"description":"Missing or invalid Firebase bearer credential"},"409":{"description":"Full Access is already active"},"429":{"description":"Rate limited"},"502":{"description":"Stripe session could not be created"},"503":{"description":"Checkout is not configured"}}}},"/api/agent-commerce/checkout-sessions/create/lifetime":{"post":{"operationId":"create_lifetime_checkout_session","summary":"Create lifetime Stripe Checkout session","description":"Creates a short-lived hosted Stripe Checkout URL. Authentication alone never grants access; entitlement is activated only after Stripe confirms payment through the signed webhook.","security":[{"firebaseBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"x-payment-info":{"offers":[{"intent":"session","method":"stripe","amount":"9999","currency":"EUR","description":"Lifetime Full Access; Stripe-hosted checkout. Yearly agent checkout does not apply a trial."}]},"responses":{"201":{"description":"Hosted checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"Invalid request or idempotency key"},"401":{"description":"Missing or invalid Firebase bearer credential"},"409":{"description":"Full Access is already active"},"429":{"description":"Rate limited"},"502":{"description":"Stripe session could not be created"},"503":{"description":"Checkout is not configured"}}}},"/api/agent-commerce/checkout-sessions/status/{session_id}":{"get":{"operationId":"retrieve_checkout_session","summary":"Retrieve an owned checkout session","security":[{"firebaseBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout and entitlement status"},"401":{"description":"Missing or invalid bearer credential"},"404":{"description":"Session not found or not owned by this identity"}}}}},"components":{"securitySchemes":{"firebaseBearer":{"type":"http","scheme":"bearer","bearerFormat":"Firebase ID token","description":"Provision an optional guest identity through /auth.md or use an existing signed-in account token."}},"schemas":{"CheckoutSession":{"type":"object","required":["checkout_session_id","checkout_url","status","plan","amount","currency","expires_at"],"properties":{"checkout_session_id":{"type":"string"},"checkout_url":{"type":"string","format":"uri"},"status":{"const":"requires_user_action"},"plan":{"enum":["monthly","yearly","lifetime"]},"amount":{"type":"integer","description":"Minor EUR units"},"currency":{"const":"EUR"},"expires_at":{"type":"string","format":"date-time"}}}}}}