> ## Documentation Index
> Fetch the complete documentation index at: https://fastpay-mintlify-983ed565.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Payment Link

> Returns a Payment Link with its catalog items (each with a signed
`imageUrl`), freight configuration and optional `priceOverride`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/payment-links/{id}
openapi: 3.0.0
info:
  title: FastPay API
  version: 1.0.0
  description: >-
    API for creating and managing payment charges.


    ## Authentication


    This API uses **Basic Authentication** for direct API access, such as
    creating charges.

    Use your API key as the username and an empty string as password.

    The header should be formatted as:


    `Authorization: Basic {base64(apiKey:)}`.


    For example:


    ```

    Authorization: Basic YWxleG91dG9uOiIi

    ```


    ## Webhooks


    FastPay sends webhooks to notify your application about charge status
    changes in real-time.

    Webhooks are sent via HTTP POST requests to your configured webhook
    endpoints.


    ### Webhook Events


    The following webhook events are available for charges:


    - `charge.created` - Sent when a new charge is created

    - `charge.pending` - Sent when a charge is pending payment

    - `charge.paid` - Sent when a charge is successfully paid

    - `charge.updated` - Sent when a charge is updated


    ### Webhook Payload Structure


    All webhook payloads follow this structure:


    ```json

    {
      "id": "webhook_event_id",
      "event": "charge.paid",
      "data": {
        // Complete charge object
      }
    }

    ```


    ### Webhook Delivery


    - Webhooks are sent via HTTP POST requests

    - Content-Type: `application/json`

    - Retry logic is implemented for failed deliveries

    - Webhook events are stored in the database for audit purposes

    - Delivery logs are maintained for debugging and monitoring


    ### Webhook Security


    - Webhooks are sent to pre-configured endpoints

    - Endpoints can be enabled/disabled per merchant

    - Event filtering is supported (only receive specific events)

    - Failed deliveries are retried with exponential backoff
servers:
  - url: https://api-global.fastpaybrasil.com
    description: Produção e Sandbox (diferenciados pela API key)
security: []
paths:
  /v1/payment-links/{id}:
    get:
      tags:
        - Payment Links
      summary: Get a Payment Link
      description: |-
        Returns a Payment Link with its catalog items (each with a signed
        `imageUrl`), freight configuration and optional `priceOverride`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The Payment Link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
        '404':
          description: Payment Link not found
      security:
        - basic: []
components:
  schemas:
    PaymentLink:
      type: object
      description: |-
        A Payment Link with its catalog items, freight configuration and
        optional manual price override.
      properties:
        id:
          type: string
          example: 2RhQg9M7ZCg3X3nMb9W1kX8Q
        merchantId:
          type: string
          example: 2RhQg9M7ZCg3X3nMb9W1kX8Q
        name:
          type: string
          example: Kit Verão
        currency:
          type: string
          example: BRL
        price:
          type: number
          description: |-
            Base amount used to create charges. Equals `priceOverride` when set,
            otherwise equals the subtotal computed from `items[]`.
          example: 199
        priceOverride:
          type: number
          nullable: true
          description: Manual override of the base price. `null` when not set.
          example: 199
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLinkItemDetail'
        freight:
          $ref: '#/components/schemas/Freight'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PaymentLinkItemDetail:
      type: object
      description: |-
        Item as returned by `GET /v1/payment-links/{id}`. `price` and
        `productType` are derived live from the catalog product.
      properties:
        productId:
          type: string
          example: 2RhQg9M7ZCg3X3nMb9W1kX8Q
        name:
          type: string
          example: Camiseta Preta P
        productType:
          type: string
          enum:
            - physical
            - digital
        price:
          type: number
          example: 89.9
        quantity:
          type: integer
          example: 2
        imageUrl:
          type: string
          nullable: true
          description: Signed image URL, or `null` when the product has no image.
    Freight:
      type: object
      required:
        - mode
      properties:
        mode:
          type: string
          enum:
            - none
            - fixed
            - checkout
          description: >-
            * `none` — no freight (digital or pickup).

            * `fixed` — a fixed amount added to every charge from this link.

            * `checkout` — freight calculated at checkout via a connected
            freight integration. Requires `hasFreightTool = true`.
        fixedValue:
          type: number
          minimum: 0
          nullable: true
          description: Required when `mode = "fixed"`. Ignored otherwise.
          example: 19.9
  securitySchemes:
    basic:
      type: http
      scheme: basic
      description: |-
        HTTP Basic authentication. Use your secret key as the
        username and an empty string as password. The API key
        should be base64 encoded in the format 'username:' when
        sending the Authorization header.

````