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

# Create QR

> Create a static or dynamic QR code



## OpenAPI

````yaml post /v1/aggregators/{raast-aggregator-id}/qrs
openapi: 3.1.0
info:
  title: Raast Wire
  version: 1.0.0
  description: ''
servers:
  - url: https://api.getsafepay.com/raastwire
security: []
tags:
  - name: Aggregators
  - name: Access Keys
  - name: Merchants
  - name: Raast Merchants
  - name: Payments
  - name: Refunds
  - name: QRs
  - name: Utilities
  - name: Aliases
  - name: Ledgers
  - name: Webhooks
paths:
  /v1/aggregators/{raast-aggregator-id}/qrs:
    parameters:
      - $ref: '#/components/parameters/AggregatorIdParam'
    post:
      tags:
        - QRs
      summary: Create QR
      description: Create a static or dynamic QR code
      requestBody:
        $ref: '#/components/requestBodies/CreateQRCode'
      responses:
        '200':
          $ref: '#/components/responses/CreateQRCodeResponse'
      security:
        - apiKey: []
components:
  parameters:
    AggregatorIdParam:
      name: raast-aggregator-id
      in: path
      required: true
      schema:
        type: string
        example: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
      description: The unique identifier for the aggregator
  requestBodies:
    CreateQRCode:
      description: Request to create a dynamic or static QR code
      content:
        application/json:
          schema:
            type: object
            description: Parameters accepted when generating a QR code
            properties:
              type:
                type: string
                description: QR code type to create; accepts STATIC or DYNAMIC
              aggregator_merchant_identifier:
                type: string
                description: Identifier of the aggregator merchant the QR code belongs to
              request_id:
                type: string
                description: Optional idempotency key provided by the client
              order_id:
                type: string
                description: Merchant-supplied order reference for dynamic QR codes
              amount:
                type: integer
                description: Optional amount to embed in the QR code for dynamic payments
              expiry_in_minutes:
                type: integer
                description: >-
                  Optional expiry window in minutes for dynamic QR codes;
                  defaults to 180 when omitted
            required:
              - type
              - aggregator_merchant_identifier
          examples:
            Create Static QR Code:
              value:
                type: STATIC
                aggregator_merchant_identifier: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
            Create Dynamic QR Code:
              value:
                type: DYNAMIC
                aggregator_merchant_identifier: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                order_id: '033301'
                request_id: 749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                amount: 1200
                expiry_in_minutes: 180
  responses:
    CreateQRCodeResponse:
      description: This response contains details of a QR Code
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLengthHeader'
        Date:
          $ref: '#/components/headers/DateHeader'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/StandardResponse'
              - type: object
                properties:
                  data:
                    $ref: '#/components/schemas/QRCode'
          examples:
            QRCodeCreated:
              value:
                api_version: v1
                data:
                  id: '4'
                  token: qr_4076ad61-75cf-44a3-97a1-b66643ea3bf2
                  aggregator_merchant_id: am_be454a50-7612-4dc6-a97e-284ebbe7ae93
                  type: DYNAMIC
                  code: >-
                    0002010102122876003285bc899c1dd443e3b3beb24631aef0930108SAFEPAYZ0224PK08ALFH00050010086764445207343434353035865406100.005802PK5921Timeless
                    Designs
                    Code6006Lahore62130509order12348476003285bc899c1dd443e3b3beb24631aef09301367b165d5f-01df-4bfe-81b4-bef010df9
                  terminal_label: ''
                  reference_label: ''
                  is_deleted: false
                  created_at: '2025-04-28T10:26:48Z'
  headers:
    ContentLengthHeader:
      schema:
        type: string
        example: '256'
    DateHeader:
      schema:
        type: string
        example: Sat, 12 Aug 2023 08:55:04 GMT
  schemas:
    StandardResponse:
      type: object
      description: Standard response structure for successful operations
      properties:
        api_version:
          type: string
          example: v1
          description: The current version of the API spec
        data:
          type: object
          description: Contains the response data
    QRCode:
      type: object
      properties:
        id:
          type: string
        token:
          type: string
        aggregator_merchant_id:
          type: string
        type:
          type: string
        code:
          type: string
        terminal_label:
          type: string
        reference_label:
          type: string
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-SFPY-AGGREGATOR-SECRET-KEY
      in: header

````