openapi: 3.2.0 info: title: Pagesnap Billing API version: 1.1.0 description: Turn public HTTP(S) URLs into Markdown, structured data, images, PDFs, crawls, diffs, and monitors. Anonymous, API-key, agent-protocol, and x402 payment surfaces are described from the same runtime contract. contact: url: https://pagesnap.142-93-197-141.sslip.io/support license: name: Service terms url: https://pagesnap.142-93-197-141.sslip.io/terms x-guidance: For keyless USDC requests, call an /x402/v1 route once without payment, decode PAYMENT-REQUIRED, then retry the same request with PAYMENT-SIGNATURE. servers: - url: https://pagesnap.142-93-197-141.sslip.io security: - {} - bearer: [] - apiHeader: [] - apiQuery: [] tags: - name: Billing description: Checkout and receipts paths: /v1/checkout: post: operationId: createCheckout summary: Create a crypto upgrade invoice tags: - Billing security: - {} - bearer: [] - apiHeader: [] - apiQuery: [] requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: - plan properties: plan: type: string enum: - starter - pro - scale key: type: string description: Raw API key; omit when an authorization header identifies it. responses: '201': description: Wallet-ready invoice. content: application/json: schema: $ref: '#/components/schemas/Checkout' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '429': $ref: '#/components/responses/RateLimited' '502': $ref: '#/components/responses/UpstreamFailure' '503': $ref: '#/components/responses/Unavailable' /v1/checkout/{order_id}: get: operationId: getCheckout summary: Poll payment and plan activation tags: - Billing security: [] parameters: - name: order_id in: path required: true schema: type: string responses: '200': description: Invoice and activation state. content: application/json: schema: $ref: '#/components/schemas/CheckoutStatus' '404': $ref: '#/components/responses/NotFound' '503': $ref: '#/components/responses/Unavailable' /pay/{order_id}/receipt.html: get: operationId: getReceiptHtml summary: Get an HTML payment receipt tags: - Billing security: [] parameters: - name: order_id in: path required: true schema: type: string responses: '200': description: Private-cacheable HTML receipt. content: text/html: schema: type: string '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '422': $ref: '#/components/responses/Unprocessable' '503': $ref: '#/components/responses/Unavailable' /pay/{order_id}/receipt.pdf: get: operationId: getReceiptPdf summary: Get a PDF payment receipt tags: - Billing security: [] parameters: - name: order_id in: path required: true schema: type: string responses: '200': description: Private-cacheable PDF receipt. content: application/pdf: schema: type: string format: binary '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '422': $ref: '#/components/responses/Unprocessable' '503': $ref: '#/components/responses/Unavailable' /pay/{order_id}/status: get: operationId: getPayPageStatus summary: Poll payment status from the browser pay flow tags: - Billing security: [] parameters: - name: order_id in: path required: true schema: type: string responses: '200': description: Invoice and activation state. content: application/json: schema: $ref: '#/components/schemas/CheckoutStatus' '404': $ref: '#/components/responses/NotFound' '503': $ref: '#/components/responses/Unavailable' components: schemas: Checkout: type: object required: - ok - order_id - pay_url - status_url - amount_usd - expires_at - options properties: ok: const: true order_id: type: string pay_url: type: string status_url: type: string amount_usd: type: number expires_at: type: string format: date-time options: type: array items: $ref: '#/components/schemas/CheckoutOption' CheckoutOption: type: object required: - chain - chain_id - token - address - amount - pay_uri properties: chain: type: string chain_id: type: integer token: type: string contract: type: - string - 'null' address: type: string amount: type: string pay_uri: type: string CheckoutStatus: type: object required: - status - plan additionalProperties: true properties: status: type: string plan: type: string plan_expires_at: type: - string - 'null' format: date-time tx: type: - object - string - 'null' shortfall: type: - object - 'null' Error: type: object required: - error properties: error: type: object required: - code - message properties: code: type: string enum: - MISSING_URL - INVALID_URL - INVALID_ACTIONS - MISSING_HTML - MISSING_URLS - BATCH_TOO_LARGE - BAD_REQUEST - INVALID_KEY - KEY_REQUIRED - KEY_DISABLED - BLOCKED_URL - TIMEOUT - ACTION_FAILED - TOO_LARGE - RESULT_TOO_LARGE - UNSUPPORTED - UNSUPPORTED_MEDIA - RATE_LIMITED - TARGET_BUSY - ANON_GLOBAL_QUOTA - DAILY_QUOTA - MONTHLY_QUOTA - CONCURRENCY - KEY_LIMIT - KEY_SPIKE_LIMIT - BUSY - ENGINE_UNAVAILABLE - NAV_FAILED - HTTP_ERROR - BROWSER_ERROR - JOB_QUEUE_FULL - JOB_NOT_FOUND - JOB_NOT_READY - RESULT_UNAVAILABLE - INVALID_MODE - MONITOR_LIMIT - MONITOR_NOT_FOUND - MONITOR_RUNNING - MONITOR_PAUSED - PLAN_INTERVAL - SNAPSHOT_TOO_LARGE - INVALID_INTERVAL - INVALID_THRESHOLD - INVALID_SELECTOR - INVALID_PLAN - CHECKOUT_CONTEXT_REQUIRED - CHECKOUT_KEY_LIMIT - CHECKOUT_IP_LIMIT - BILLING_UNAVAILABLE - INVOICE_UNAVAILABLE - ORDER_NOT_FOUND - INVOICE_NOT_FOUND - PAYMENT_REPLAY - FACILITATOR_UNAVAILABLE - SETTLEMENT_UNVERIFIED - TICKET_LIMIT - NOT_FOUND - INTERNAL message: type: string reason: type: string enum: - bot_protection - interactive_challenge - ip_policy_or_geo_block upstream_status: type: integer minimum: 100 maximum: 599 responses: NotFound: description: Resource not found or expired. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' RateLimited: description: Caller, quota, concurrency, or target-host limit reached. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid or missing input. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' UpstreamFailure: description: Target or rendering engine failed. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' Conflict: description: Current resource state conflicts with the request. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid credentials. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' Unprocessable: description: Input is understood but unsupported or cannot be processed. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' Unavailable: description: Capacity, facilitator, billing, or engine temporarily unavailable. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' Forbidden: description: Disabled key, plan restriction, or blocked target. headers: Retry-After: schema: type: integer minimum: 0 description: Seconds to wait when supplied. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearer: type: http scheme: bearer bearerFormat: ps_live_… description: Pagesnap API key. apiHeader: type: apiKey in: header name: X-API-Key apiQuery: type: apiKey in: query name: key description: Compatibility only; headers avoid key leakage in URLs. x402: type: apiKey in: header name: PAYMENT-SIGNATURE description: x402 v2 exact EIP-3009 USDC authorization on Base; X-PAYMENT is a legacy alias. x-pagesnap-limits: quotaUnits: read: 1 screenshot: 1 pdf: 1 meta: 1 extract: 1 render: 1 diff: 2 batch: one per URL crawl: one per reserved page llmsTxt: one per reserved page monitorCheck: 1 planCrawlCaps: anon: 5 free: 25 starter: 50 pro: 200 scale: 200 synchronousCrawlPages: 25 target: perMin: 60 concurrency: 3 monitorCaps: free: 2 starter: 10 pro: 50 scale: 200 jobRetentionHours: 24 temporaryLinkHours: 1