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

# Create a static QR code

> Create a reusable payment code. HTTP 200 with INITIATED acknowledges creation; it does not establish readiness or payment success. Use the returned code_no to retrieve the code and its details. Reuse the same idempotency key and request after an uncertain response.



## OpenAPI

````yaml /global-acquiring/v1.6/payment.yaml post /v2/payment/static_qrs
openapi: 3.0.2
info:
  title: Payment API
  version: 0.0.1
  description: >
    UQPAY Payment API allows you to accept payments, manage transactions, and
    process refunds and payouts.


    ## What you can do

    - Create and confirm payment intents using cards, digital wallets, and local
    payment methods

    - Process full and partial refunds

    - Create payouts and bank account records

    - Query payment attempts, balances, and transaction history


    ## Authentication

    All requests require a valid auth token obtained via the [Access
    Token](/account-center/v1.6/api-reference/access-token) endpoint. Include
    the token in the `x-auth-token` header.


    ## Idempotency

    POST requests support the `x-idempotency-key` header to safely retry without
    creating duplicate resources.
  contact:
    name: UQPAY Support Team
    url: https://www.uqpay.com/support
    email: support@uqpay.com
  license:
    name: Proprietary
    url: https://www.uqpay.com/legal/api-terms
  termsOfService: https://www.uqpay.com/legal/terms
servers:
  - url: https://api-sandbox.uqpaytech.com/api
    description: Sandbox base URL.
  - url: https://api.uqpay.com/api
    description: Production base URL.
security:
  - XAuthToken: []
tags:
  - name: Payment Intents
    description: >-
      A PaymentIntent guides you through the process of collecting a payment
      from your customer. We recommend that you create exactly one PaymentIntent
      for each order or customer session in your system. You can reference the
      PaymentIntent later to see the history of payment attempts for a
      particular session.
  - name: Payment Attempts
    description: >-
      A PaymentAttempt object is created whenever a customer makes a payment
      with the chosen PaymentMethod. This API allows you to find out how your
      customer paid for your order.
  - name: Payment Refunds
    description: >
      You can create multiple partial refunds until reaching the original
      transaction amount. Each refund generates a unique record and undergoes
      automatic validation against available balances.

      A PaymentIntent guides you through the process of collecting a payment
      from your customer. We recommend that you create exactly one PaymentIntent
      for each order or customer session in your system. You can reference the
      PaymentIntent later to see the history of payment attempts for a
      particular session.
  - name: Payment Balances
    description: >
      Payment balance management allows you to query account balances for
      different currencies. You can retrieve individual currency balances or all
      currency balances with pagination support.
  - name: Payment Payouts
    description: >
      Payout management allows you to create and manage payout orders for fund
      transfers. You can create payouts, query individual payouts, and list all
      payouts with filtering and pagination support.
  - name: Terminal Management
    description: Terminal management APIs for POS device registration and key management.
  - name: Bank Accounts
    description: >
      Bank account management APIs for settlement accounts. Create, update,
      retrieve, and list bank accounts used for receiving settlement payments.
  - name: Static QR Codes
    description: Create, retrieve, list, and manage reusable payment QR codes.
paths:
  /v2/payment/static_qrs:
    post:
      tags:
        - Static QR Codes
      summary: Create a static QR code
      description: >-
        Create a reusable payment code. HTTP 200 with INITIATED acknowledges
        creation; it does not establish readiness or payment success. Use the
        returned code_no to retrieve the code and its details. Reuse the same
        idempotency key and request after an uncertain response.
      operationId: create-static-qr-code
      parameters:
        - $ref: '#/components/parameters/XClientID'
        - $ref: '#/components/parameters/StaticQRTarget'
        - $ref: '#/components/parameters/StaticQRIdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StaticQRCreateRequest'
            examples:
              sandbox:
                summary: Create a static QR code
                value:
                  payment_methods:
                    - ALIPAY
                  currency: SGD
                  amount_mode: DYNAMIC
                  code_no: D5610f5e1
                  store_name: Docs Test
                  extension: no payment test
                description: >-
                  For a new code, omit code_no or choose an unused value, and
                  provide a new idempotency key.
              fixed:
                summary: Fixed amount
                value:
                  payment_methods:
                    - ALIPAY
                  currency: SGD
                  amount_mode: FIXED
                  amount: '1.23'
                  store_name: ''
      responses:
        '200':
          description: Request completed. Interpret the resource status separately.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticQRCreateResponse'
              examples:
                sandbox:
                  summary: Create a static QR code
                  value:
                    status: INITIATED
                    code_no: D5610f5e1
                    create_time: '2026-10-28T10:18:44+08:00'
                    payment_methods:
                      - ALIPAY
                    currency: SGD
                    amount_mode: DYNAMIC
                    amount: null
                    store_name: Docs Test
                    city: Singapore
                    extension: no payment test
                fixed:
                  summary: Fixed amount creation initiated
                  value:
                    status: INITIATED
                    code_no: '0006'
                    create_time: '2026-10-28T10:20:13+08:00'
                    payment_methods:
                      - ALIPAY
                    currency: SGD
                    amount_mode: FIXED
                    amount: '1.23'
                    store_name: UQPAY PTE LTD
                    city: Singapore
                    extension: ''
          headers:
            Retry-After:
              description: >-
                Suggested wait, in seconds, before checking the creation result
                when supplied.
              schema:
                type: integer
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticQRError'
              examples:
                sandbox:
                  summary: Invalid request.
                  value:
                    code: IDEMPOTENCY_KEY_REQUIRED
                    message: The "X-Idempotency-Key" request header is required.
                    type: static_qr_error
        '409':
          description: >-
            The code number is already used, or the idempotency key was used
            with different parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticQRError'
              examples:
                sandbox:
                  summary: The idempotency key conflicts with an earlier request.
                  value:
                    code: IDEMPOTENCY_KEY_CONFLICT
                    message: >-
                      This idempotency key has already been used with different
                      request parameters.
                    type: static_qr_error
        default:
          description: >-
            Other errors, including authentication failures, can use the common
            API error response.
components:
  parameters:
    XClientID:
      in: header
      name: x-client-id
      schema:
        type: string
      required: true
      description: The API client id generated by UQPAY
      example: Up1HIsjiETgON9PMGPXLy7
    StaticQRTarget:
      name: x-on-behalf-of
      in: header
      required: false
      description: >-
        The authorized connected sub-account to manage. Omit or send an empty
        value to use the credential account. Use the same target account for all
        operations on a code. Do not send the credential account ID as an
        explicit sub-account.
      schema:
        type: string
        format: uuid
    StaticQRIdempotencyKey:
      name: x-idempotency-key
      in: header
      required: true
      description: >-
        Use a new key for each new creation. Retry the same request with the
        same key after an uncertain response. Reusing a key with different
        request parameters returns a conflict. Send this header only once.
      schema:
        type: string
  schemas:
    StaticQRCreateRequest:
      type: object
      required:
        - payment_methods
        - currency
        - amount_mode
      properties:
        payment_methods:
          type: array
          description: >-
            Select methods enabled for the target account. Check account and
            channel readiness through the options endpoint. In payment
            notifications, `data.payment_method.type` identifies the single
            method used for that transaction, not this array.
          minItems: 1
          maxItems: 4
          uniqueItems: true
          items:
            type: string
            enum:
              - ALIPAY
              - WECHAT
              - PAYNOW
              - UNIONPAY
        currency:
          type: string
          description: >-
            Use an uppercase currency returned by the options endpoint. Payment
            notifications report the transaction currency in `data.currency`.
        amount_mode:
          type: string
          enum:
            - FIXED
            - DYNAMIC
          description: >-
            FIXED uses the specified amount; DYNAMIC lets the payer enter the
            amount.
        amount:
          type: string
          description: >-
            Required for FIXED: a positive decimal string in major currency
            units with exactly two decimal places. For DYNAMIC, omit this field
            entirely; null, an empty string, and zero are not accepted. For
            reconciliation, read the transaction amount from `data.amount` in
            payment notifications, not the null amount of a DYNAMIC code.
          pattern: ^[0-9]+\.[0-9]{2}$
        store_name:
          type: string
          description: >-
            Maximum 25 bytes. Omit or send an empty string to use the target
            account name. null is not accepted.
        code_no:
          type: string
          description: >-
            Custom code identifier. Omit or send an empty string to generate
            one. Keep it as a string to preserve leading zeros. Use only ASCII
            letters and digits. The values options and requests are reserved.
            null is not accepted. Static QR payment notifications identify this
            code in `data.payment_method.<method>.static_qrcode_number_plate`;
            one code can be used for multiple payments. See [payment
            notification field
            mapping](/global-acquiring/v1.6/guide/static-qr-codes#receive-and-reconcile-payments).
          maxLength: 10
          pattern: ^[A-Za-z0-9]{0,10}$
        extension:
          type: string
          description: >-
            Your reference information; defaults to an empty string when
            omitted. It is not encoded into the QR payment parameters. null is
            not accepted. The corresponding field in static QR payment
            notifications is
            `data.payment_method.<method>.static_qrcode_extension`; it is not
            `data.metadata` or a merchant order ID. See [payment notification
            field
            mapping](/global-acquiring/v1.6/guide/static-qr-codes#receive-and-reconcile-payments).
          maxLength: 512
    StaticQRCreateResponse:
      type: object
      required:
        - code_no
        - status
        - payment_methods
        - currency
        - amount_mode
        - amount
        - store_name
        - city
        - extension
        - create_time
      properties:
        code_no:
          type: string
          description: >-
            Code identifier. Preserve case and leading zeros. Static QR payment
            notifications identify this code in
            `data.payment_method.<method>.static_qrcode_number_plate`; one code
            can be used for multiple payments. See [payment notification field
            mapping](/global-acquiring/v1.6/guide/static-qr-codes#receive-and-reconcile-payments).
        status:
          type: string
          description: >-
            Code creation status, not payment status. INITIATED means creation
            has started; SUCCEEDED means the code has been created.
        payment_methods:
          type: array
          description: >-
            Payment methods associated with this code. In payment notifications,
            `data.payment_method.type` identifies the single method used for
            that transaction, not this array.
          items:
            type: string
            enum:
              - ALIPAY
              - WECHAT
              - PAYNOW
              - UNIONPAY
        currency:
          type: string
          description: >-
            Currency used for payments with this code. Payment notifications
            report the transaction currency in `data.currency`.
        amount_mode:
          type: string
          enum:
            - FIXED
            - DYNAMIC
          description: >-
            FIXED uses the specified amount; DYNAMIC lets the payer enter the
            amount.
        amount:
          type: string
          description: >-
            Fixed payment amount in major currency units; null for DYNAMIC
            codes. Response decimal precision may differ from the create
            request. For reconciliation, read the transaction amount from
            `data.amount` in payment notifications, not the null amount of a
            DYNAMIC code.
          nullable: true
        store_name:
          type: string
          description: Store name associated with the code.
        city:
          type: string
          description: City associated with the code.
        extension:
          type: string
          description: >-
            Your reference information. It is not encoded in the QR payment
            parameters. The corresponding field in static QR payment
            notifications is
            `data.payment_method.<method>.static_qrcode_extension`; it is not
            `data.metadata` or a merchant order ID. See [payment notification
            field
            mapping](/global-acquiring/v1.6/guide/static-qr-codes#receive-and-reconcile-payments).
        create_time:
          type: string
          description: Creation timestamp with a timezone offset.
          format: date-time
    StaticQRError:
      type: object
      required:
        - code
        - message
        - type
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Explanation of the failure and, where available, how to correct it.
        type:
          type: string
          enum:
            - static_qr_error
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: The API token for login provided by UQPAY.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.