> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plugtopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get public payment link details (by slug)

> Rota pública, sem autenticação. Usada pela página de checkout hospedada.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/p/{companySlug}/{linkSlug}
openapi: 3.0.0
info:
  title: PlugToPay API
  description: API to make payments easy in multiple gateways.
  version: 1.0.0
servers:
  - url: http://localhost:7701
    description: Test Server
security: []
paths:
  /api/v1/p/{companySlug}/{linkSlug}:
    get:
      tags:
        - Payment Links
      summary: Get public payment link details (by slug)
      description: Rota pública, sem autenticação. Usada pela página de checkout hospedada.
      parameters:
        - name: companySlug
          in: path
          required: true
          schema:
            type: string
            example: minha-empresa
        - name: linkSlug
          in: path
          required: true
          schema:
            type: string
            example: curso-premium
      responses:
        '200':
          description: Dados públicos do link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPaymentLink'
        '404':
          description: Link inexistente, inativo, expirado ou removido
components:
  schemas:
    PublicPaymentLink:
      type: object
      description: >-
        Subconjunto seguro exposto ao comprador: sem company_id, URLs de
        redirecionamento ou slug.
      properties:
        token:
          type: string
          example: pl_live_a1b2c3d4e5f6
        title:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - one_time
            - subscription
        amount:
          type: integer
          nullable: true
        currency:
          type: string
          example: BRL
        payment_method:
          type: string
          enum:
            - card
            - pix
          nullable: true
        items:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/PaymentLinkItem'
        plan:
          type: object
          nullable: true
          properties:
            name:
              type: string
            amount:
              type: integer
            interval:
              type: string
              enum:
                - weekly
                - monthly
                - yearly
            interval_count:
              type: integer
            trial_period_days:
              type: integer
              nullable: true
    PaymentLinkItem:
      type: object
      properties:
        name:
          type: string
          example: Curso Premium
        description:
          type: string
          nullable: true
          example: Acesso vitalício
        quantity:
          type: integer
          minimum: 1
          example: 1
        unit_price:
          type: integer
          description: Preço unitário em centavos
          example: 29900
        image_url:
          type: string
          format: uri
          nullable: true
      required:
        - name
        - quantity
        - unit_price

````