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

# QR Payment

> QR Payment allows customers to complete transactions by scanning a generated QR code using a supported payment application. This section uses PayNow as an example of QR-based payment integration.

### Key Points

> [!NOTE]
>
> Merchant Configuration
>
> * The **Merchant ID** must be configured to support the selected QR payment method.
> * For the **PayNow** example, the `payment_method` type must be set to `paynow`.
> * The PayNow request example uses **SGD** as the processing currency.
>
> QR Code Generation
>
> * The Direct Payment API generates QR code data for the customer to complete the payment.
> * For PayNow, the response includes a Base64-encoded QR code image in `url.qrCode` and the corresponding QR payment payload in `url.data`.
> * The merchant can display the QR code for the customer to scan using a supported banking application.
> * QR code generation does not indicate that payment has been completed.


## OpenAPI

````yaml api-reference/en/open-api-config/wallet/qr-payment.json POST /api/v1/server-to-server-interface/payment
openapi: 3.0.1
info:
  title: Payment Options API
  description: API reference for QR payments using PayNow as the integration example.
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/payment:
    post:
      tags:
        - QR Payment
      summary: Create QR Payment (PayNow)
      description: >-
        Creates a QR payment using PayNow as an example. The response contains a
        Base64 PNG QR image and QR payment payload; generation is not
        confirmation of successful payment.
      operationId: createQrPayment
      requestBody:
        description: >-
          PayNow Direct Payment request. Billing address is required; shipping
          address is optional.
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - amount
                - currency
                - payment_method
                - merchant_txn_ref
                - customer_ip
                - merchant_id
                - return_url
                - billing_address
              properties:
                amount:
                  type: string
                  description: Transaction amount, represented as a string.
                  example: '200'
                currency:
                  type: string
                  description: Processing currency (SGD in this PayNow example).
                  maxLength: 3
                  example: SGD
                payment_method:
                  type: object
                  additionalProperties: false
                  description: A JSON object containing payment method details.
                  properties:
                    type:
                      type: string
                      description: >-
                        Payment method identifier. Set to paynow for this
                        example.
                      maxLength: 128
                      example: paynow
                      enum:
                        - paynow
                  required:
                    - type
                merchant_txn_ref:
                  type: string
                  description: The merchant transaction reference ID.
                  maxLength: 45
                  example: TEST00989012878787878787878787
                customer_ip:
                  type: string
                  description: The IP address of the customer initiating the transaction.
                  example: 124.219.163.171
                merchant_id:
                  type: string
                  description: The unique identifier of the merchant (DASMID).
                  maxLength: 128
                  example: SG00003085
                return_url:
                  type: object
                  additionalProperties: false
                  description: Callback and return URLs for the transaction.
                  properties:
                    webhook_url:
                      type: string
                      description: The webhook URL for asynchronous notifications.
                      maxLength: 255
                      example: https://merchant.example.com/webhook
                    success_url:
                      type: string
                      description: >-
                        The URL to redirect the user to after a successful
                        transaction.
                      maxLength: 255
                      example: https://merchant.example.com/success
                    decline_url:
                      type: string
                      description: >-
                        The URL to redirect the user to after a failed
                        transaction.
                      maxLength: 255
                      example: https://merchant.example.com/decline
                billing_address:
                  type: object
                  additionalProperties: false
                  description: Required billing address for the customer.
                  properties:
                    country:
                      type: string
                      description: The cardholder’s billing country code.
                      maxLength: 2
                      example: JP
                    email:
                      type: string
                      description: The cardholder’s billing email address.
                      maxLength: 45
                      example: customer@example.com
                    phone_number:
                      type: string
                      description: The cardholder’s billing phone number.
                      maxLength: 15
                      example: '767676767'
                    address1:
                      type: string
                      description: The cardholder’s billing address line.
                      maxLength: 199
                      example: Chiyoda1-1
                    city:
                      type: string
                      description: The cardholder’s billing city.
                      maxLength: 65
                      example: Minatoku
                    state:
                      type: string
                      description: The cardholder’s billing state.
                      maxLength: 65
                      example: Tokyoto
                    postal_code:
                      type: string
                      description: The cardholder’s billing postal code.
                      maxLength: 45
                      example: '1000001'
                shipping_address:
                  type: object
                  additionalProperties: false
                  description: Optional shipping address. May be omitted from the request.
                  properties:
                    country:
                      type: string
                      description: The cardholder’s shipping country code.
                      maxLength: 2
                      example: JP
                    email:
                      type: string
                      description: The cardholder’s shipping email address.
                      maxLength: 45
                      example: customer@example.com
                    phone_number:
                      type: string
                      description: The cardholder’s shipping phone number.
                      maxLength: 15
                      example: '08012341234'
                    address1:
                      type: string
                      description: The cardholder’s shipping address line.
                      maxLength: 199
                      example: Chiyoda1-1
                    city:
                      type: string
                      description: The cardholder’s shipping city.
                      maxLength: 65
                      example: Minatoku
                    state:
                      type: string
                      description: The cardholder’s shipping state.
                      maxLength: 65
                      example: Tokyoto
                    postal_code:
                      type: string
                      description: The cardholder’s shipping postal code.
                      maxLength: 45
                      example: '1000001'
                time_zone:
                  type: string
                  description: The time zone for the transaction.
                  example: Asia/Tokyo
            example:
              amount: '200'
              currency: SGD
              payment_method:
                type: paynow
              merchant_txn_ref: TEST00989012878787878787878787
              customer_ip: 124.219.163.171
              merchant_id: SG00003085
              return_url:
                webhook_url: https://merchant.example.com/webhook
                success_url: https://merchant.example.com/success
                decline_url: https://merchant.example.com/decline
              billing_address:
                country: JP
                email: customer@example.com
                address1: Chiyoda1-1
                phone_number: '767676767'
                city: Minatoku
                state: Tokyoto
                postal_code: '1000001'
              shipping_address:
                country: JP
                email: customer@example.com
                address1: Chiyoda1-1
                phone_number: '08012341234'
                city: Minatoku
                state: Tokyoto
                postal_code: '1000001'
              time_zone: Asia/Tokyo
      responses:
        '200':
          description: >-
            QR payment created; QR data returned. This does not indicate payment
            completion.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The transaction reference ID.
                    example: cd3c8f8c-75ec-4d63-a90d-10046616c5da
                  url:
                    type: object
                    description: Generated QR payment data (not a checkout URL).
                    properties:
                      qrCode:
                        type: string
                        description: Base64-encoded PNG QR image as a data URI.
                        example: data:image/png;base64,<BASE64_PNG_DATA>
                      data:
                        type: string
                        description: PayNow QR payment payload.
                        example: >-
                          00020101021226490009SG.PAYNOW010120210201213048R0301004082026123152040000530370254032005802SG5919BeanWorks
                          Pte. Ltd.6009SINGAPORE621001063535026304C619
                  amount:
                    type: integer
                    description: The transaction amount.
                    example: 200
                  currency:
                    type: string
                    description: The processing currency.
                    example: SGD
                  merchant_txn_ref:
                    type: string
                    description: The merchant transaction reference ID.
                    example: TEST00989012878787878787878787
                  merchant_id:
                    type: string
                    description: The merchant ID for the transaction.
                    example: SG00003085
                  merchant_email:
                    type: string
                    nullable: true
                    description: Merchant email when available.
                    example: null
                  return_url:
                    type: object
                    description: Return URL details for payment callbacks.
                    properties:
                      webhook_url:
                        type: string
                        description: The webhook URL for notifications.
                        example: https://merchant.example.com/webhook
                      success_url:
                        type: string
                        description: The success URL.
                        example: https://merchant.example.com/success
                      decline_url:
                        type: string
                        description: The decline URL.
                        example: https://merchant.example.com/decline
                  billing_address:
                    type: object
                    description: The billing address details.
                    properties:
                      city:
                        type: string
                        description: The billing city.
                        example: Minatoku
                      email:
                        type: string
                        description: The billing email address.
                        example: customer@example.com
                      state:
                        type: string
                        description: The billing state.
                        example: Tokyoto
                      country:
                        type: string
                        description: The billing country.
                        example: JP
                      address1:
                        type: string
                        description: The billing address line.
                        example: Chiyoda1-1
                      postal_code:
                        type: string
                        description: The billing postal code.
                        example: '1000001'
                      phone_number:
                        type: string
                        description: The billing phone number.
                        example: '767676767'
                  shipping_address:
                    type: object
                    description: >-
                      Shipping address details when supplied; may be an empty
                      object when omitted.
                    properties:
                      city:
                        type: string
                        description: The shipping city.
                        example: Minatoku
                      email:
                        type: string
                        description: The shipping email address.
                        example: customer@example.com
                      state:
                        type: string
                        description: The shipping state.
                        example: Tokyoto
                      country:
                        type: string
                        description: The shipping country.
                        example: JP
                      address1:
                        type: string
                        description: The shipping address line.
                        example: Chiyoda1-1
                      postal_code:
                        type: string
                        description: The shipping postal code.
                        example: '1000001'
                      phone_number:
                        type: string
                        description: The shipping phone number.
                        example: '08012341234'
                  redirecturl:
                    type: object
                    description: >-
                      QR data also provided in redirecturl (object, not a
                      conventional redirect URL).
                    properties:
                      qrCode:
                        type: string
                        description: Base64-encoded PNG QR image as a data URI.
                        example: data:image/png;base64,<BASE64_PNG_DATA>
                      data:
                        type: string
                        description: PayNow QR payment payload.
                        example: >-
                          00020101021226490009SG.PAYNOW010120210201213048R0301004082026123152040000530370254032005802SG5919BeanWorks
                          Pte. Ltd.6009SINGAPORE621001063535026304C619
              example:
                id: cd3c8f8c-75ec-4d63-a90d-10046616c5da
                url:
                  qrCode: data:image/png;base64,<BASE64_PNG_DATA>
                  data: >-
                    00020101021226490009SG.PAYNOW010120210201213048R0301004082026123152040000530370254032005802SG5919BeanWorks
                    Pte. Ltd.6009SINGAPORE621001063535026304C619
                amount: 200
                currency: SGD
                merchant_txn_ref: TEST00989012878787878787878787
                merchant_id: SG00003085
                merchant_email: null
                return_url:
                  webhook_url: https://merchant.example.com/webhook
                  success_url: https://merchant.example.com/success
                  decline_url: https://merchant.example.com/decline
                billing_address:
                  city: Minatoku
                  email: customer@example.com
                  state: Tokyoto
                  country: JP
                  address1: Chiyoda1-1
                  postal_code: '1000001'
                  phone_number: '767676767'
                shipping_address: {}
                redirecturl:
                  qrCode: data:image/png;base64,<BASE64_PNG_DATA>
                  data: >-
                    00020101021226490009SG.PAYNOW010120210201213048R0301004082026123152040000530370254032005802SG5919BeanWorks
                    Pte. Ltd.6009SINGAPORE621001063535026304C619
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: 'API Key for Authorization. Format: ''Basic YOUR_API_KEY_HERE'''
    xApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: API Key specific to x-api-key.

````

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