# Check subscription status via payment hash

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/public/v1/subscription/{paymentHash}:
    get:
      summary: Check subscription status via payment hash
      deprecated: false
      description: ''
      tags:
        - 📢 Public
      parameters:
        - name: paymentHash
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatus'
          headers: {}
          x-apidog-name: ''
        '404':
          description: Subscription not found
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: 📢 Public
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361232/apis/api-4204017-run
components:
  schemas:
    SubscriptionStatus:
      type: object
      required:
        - paymentHash
        - status
        - serverId
        - duration
        - isProvisioned
      properties:
        paymentHash:
          type: string
        status:
          type: string
          enum:
            - unpaid
            - paid
            - expired
            - success
        serverId:
          type: string
        duration:
          type: integer
        isProvisioned:
          type: boolean
        server:
          type: object
          properties:
            domain:
              type: string
            endpoint:
              type: string
          x-apidog-orders:
            - domain
            - endpoint
          x-apidog-ignore-properties: []
          nullable: true
        subscriptionEnd:
          type: string
          format: date-time
          nullable: true
        message:
          type: string
          nullable: true
      x-apidog-orders:
        - paymentHash
        - status
        - serverId
        - duration
        - isProvisioned
        - server
        - subscriptionEnd
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    ApiKeyAuth:
      type: bearer
      scheme: bearer
      description: Authenticate using your TunnelSats API Key (sk_live_...).
    NostrAuth:
      type: bearer
      scheme: bearer
      description: >-
        NIP-98 Nostr Authentication. The 'token' should be the base64-encoded
        NIP-98 event JSON.
servers:
  - url: https://tunnelsats.com
    description: Prod Env
security: []

```