> ## 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.

# Update a PaymentIntent

> Updates properties on a PaymentIntent object without confirming. Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the `payment_method` always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.



## OpenAPI

````yaml /global-acquiring/v1.6/payment.yaml post /v2/payment_intents/{id}
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

    - Manage customers and saved payment methods

    - 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: Customers
    description: >-
      Create and manage customer profiles. Customer objects store payment
      methods and billing details for use across multiple payments.
  - 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.
paths:
  /v2/payment_intents/{id}:
    post:
      tags:
        - Payment Intents
      summary: Update a PaymentIntent
      description: >-
        Updates properties on a PaymentIntent object without confirming.
        Depending on which properties you update, you might need to confirm the
        PaymentIntent again. For example, updating the `payment_method` always
        requires you to confirm the PaymentIntent again. If you prefer to update
        and confirm at the same time, we recommend updating properties through
        the confirm API instead.
      operationId: update-payment-intent
      parameters:
        - $ref: '#/components/parameters/PaymentIntentId'
        - $ref: '#/components/parameters/XOnBehalfOf'
        - $ref: '#/components/parameters/XIdempotencyKey'
        - $ref: '#/components/parameters/XClientID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentIntentUpdateRequest'
      responses:
        '200':
          description: Payment intent updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentCreateResponse'
components:
  parameters:
    PaymentIntentId:
      name: id
      in: path
      required: true
      description: The unique ID of a payment intent.
      schema:
        type: string
        example: PI1925112193204883441
    XOnBehalfOf:
      in: header
      name: x-on-behalf-of
      schema:
        type: string
      required: false
      description: >
        Specifies the sub-account on whose behalf the request is made. This
        should be set to the `account_id`, which can be retrieved via the [List
        Connected
        Accounts](/account-center/v1.6/api-reference/list-connected-accounts).
        If omitted or empty, the request is executed using the master account.

        More information at [Connected
        Accounts](/account-center/v1.6/guide/connected-accounts).
      example: 18523f72-f4de-4f9c-bb8e-ec7d1c4f32be
    XIdempotencyKey:
      in: header
      name: x-idempotency-key
      schema:
        type: string
        format: uuid
      required: true
      description: >-
        A unique identifier (UUID) used to maintain operation idempotency,
        ensuring that repeated executions of the same operation do not result in
        unintended effects or duplication. It helps preserve data consistency in
        the face of network errors, retries, or failures.
      example: 2adesf8e-9d63-44bc-b975-9b6ae3440dde
    XClientID:
      in: header
      name: x-client-id
      schema:
        type: string
      required: true
      description: The API client id generated by UQPAY
      example: Up1HIsjiETgON9PMGPXLy7
  schemas:
    PaymentIntentUpdateRequest:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        customer:
          $ref: '#/components/schemas/CustomerRequest'
          description: >-
            Customer details pertaining to the entity executing payment for this
            Payment Intent shall be omitted when a `customer_id` parameter is
            specified in the request.
        customer_id:
          type: string
          description: >-
            The unique identifier of the customer must be provided when the
            Payment Intent is designated for recurring payments. This field
            should be left empty in cases where the customer remains
            unidentified (guest checkout) or when customer information is
            supplied through the customer object.
        payment_orders:
          type: object
          description: Purchase order related to this PaymentIntent
          properties:
            type:
              type: string
              description: Industry category of the order. Maximum of 128 characters.
              example: physical_goods
            products:
              $ref: '#/components/schemas/PaymentProducts'
        merchant_order_id:
          $ref: '#/components/schemas/MerchantOrderId'
        description:
          type: string
          maxLength: 32
          description: Descriptor that will display to the customer. Maximum length is 32.
        metadata:
          $ref: '#/components/schemas/Metadata'
        return_url:
          $ref: '#/components/schemas/ReturnUrl'
    PaymentIntentCreateResponse:
      type: object
      required:
        - payment_intent_id
        - amount
        - currency
        - intent_status
      properties:
        payment_intent_id:
          type: string
          example: b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6
          description: Unique identifier for the PaymentIntent
          maxLength: 36
        amount:
          $ref: '#/components/schemas/Amount'
          example: '10.12'
          description: >-
            Payment amount. This is the order amount you would like to charge
            your customer.
        currency:
          $ref: '#/components/schemas/Currency'
          example: SGD
        description:
          type: string
          description: Descriptor while creating a PaymentIntent.
          maxLength: 255
        available_payment_method_types:
          type: array
          nullable: true
          description: Available payment method types for this PaymentIntent.
          items:
            type: string
        captured_amount:
          $ref: '#/components/schemas/Amount'
          example: '10.12'
          description: Amount that captured from this PaymentIntent.
        customer:
          $ref: '#/components/schemas/CustomerResponse'
          description: >-
            Snapshot of the customer associated with this PaymentIntent.
            Returned when `customer` or `customer_id` was supplied at creation
            time. The customer's unique identifier is exposed at the top level
            as `customer_id`; the `id` field is not included inside this object.
        customer_id:
          type: string
          description: >-
            ID of the customer associated with this PaymentIntent. Empty for
            guest checkout.
          example: cus_asyknf3wlfxhs1s6plamk80i8v
          maxLength: 36
        cancel_time:
          $ref: '#/components/schemas/DateTime'
          description: >-
            Last time at which this PaymentIntent was cancelled. Only present
            when the PaymentIntent was successfully cancelled, i.e. status is
            `CANCELLED`.
        cancellation_reason:
          type: string
          description: Reason for canceling this PaymentIntent.
          example: Order cancelled
        client_secret:
          $ref: '#/components/schemas/ClientSecret'
          example: eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI
        merchant_order_id:
          $ref: '#/components/schemas/MerchantOrderId'
          example: 1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee
        metadata:
          $ref: '#/components/schemas/Metadata'
        next_action:
          $ref: '#/components/schemas/NextAction'
        return_url:
          type: string
          description: >-
            The web page URL or application scheme URI to redirect the customer
            after payment authentication.
          example: https://127.0.0.1:8080/api/v1/callback
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: Time at which this PaymentIntent was created.
        complete_time:
          $ref: '#/components/schemas/DateTime'
          description: Time at which this PaymentIntent reached its final state.
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: Last time at which this PaymentIntent was updated or operated on.
        latest_payment_attempt:
          $ref: '#/components/schemas/PaymentAttemptResponse'
          description: Latest PaymentAttempt that was created under the PaymentIntent.
        intent_status:
          $ref: '#/components/schemas/PaymentIntentStatus'
    Amount:
      type: string
    Currency:
      type: string
      description: Three-letter currency code
    CustomerRequest:
      type: object
      required:
        - first_name
        - last_name
        - email
      properties:
        business_name:
          type: string
          description: Customer's business name
          example: Acme Corp
          maxLength: 128
        external_customer_id:
          type: string
          description: >-
            Identifier for the customer in your own system. When supplied
            through the `customer` object on a PaymentIntent, UQPay uses it to
            look up an existing customer with the same external identifier
            before creating a new one.
          example: CUS_1715740800123
          maxLength: 128
        first_name:
          type: string
          description: Customer's first name
          example: John
          maxLength: 64
        last_name:
          type: string
          description: Customer's last name
          example: Doe
          maxLength: 64
        email:
          type: string
          format: email
          description: Customer's email address
          example: john.doe@example.com
          maxLength: 254
        phone_number:
          type: string
          description: Customer's phone number
          example: +1 123456789
          maxLength: 32
        description:
          type: string
          description: An arbitrary string that you can attach to a customer object.
          maximum: 255
          maxLength: 255
        address:
          $ref: '#/components/schemas/Address'
        metadata:
          $ref: '#/components/schemas/Metadata'
    PaymentProducts:
      type: array
      description: >-
        Order-related product information. The total sum of all product amounts
        must equal the overall payment amount.
      items:
        type: object
        required:
          - name
          - price
          - quantity
        properties:
          name:
            type: string
            description: Name of the product. Maximum of 255 characters.
          price:
            type: string
            description: The price per quantity of product.
          quantity:
            type: integer
            description: The quantity of the product to be purchased.
          image_url:
            type: string
            description: >-
              The preview image url for this product, which is usually displayed
              as thumbnail in the order details.
    MerchantOrderId:
      type: string
      maxLength: 36
      description: >-
        The merchant reference id created in merchant's system that corresponds
        to this PaymentIntent
    Metadata:
      additionalProperties:
        maxLength: 512
        type: string
      example:
        key1: value1
        key2: value2
      description: >-
        Any key-value object. Max length = 512 bytes. This must be valid JSON
        data.
      type: object
    ReturnUrl:
      type: string
      maxLength: 1024
      description: >-
        The web page URL or application scheme URI to redirect the customer
        after payment authentication.
    CustomerResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique customer ID
          example: cus_hkduz3gvz1feg25e87fjcahsxq
        external_customer_id:
          type: string
          description: >-
            Identifier for the customer in your own system, echoed back when
            supplied at creation time.
          example: CUS_1715740800123
          maxLength: 128
        first_name:
          type: string
          description: Customer's first name
          example: John
          maxLength: 64
        last_name:
          type: string
          description: Customer's last name
          example: Doe
          maxLength: 64
        email:
          type: string
          format: email
          description: Customer's email address
          example: john.doe@example.com
          maxLength: 254
        phone_number:
          type: string
          description: Customer's phone number
          example: +1 123456789
          maxLength: 32
        address:
          $ref: '#/components/schemas/Address'
        metadata:
          $ref: '#/components/schemas/Metadata'
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: Last time at which this customer was created.
          example: '2025-03-21T17:17:32+08:00'
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: Last time at which this customer was updated or operated on.
          example: '2025-03-21T17:17:32+08:00'
    DateTime:
      type: string
      format: date/time
      example: '2024-03-01T00:00:00+08:00'
    ClientSecret:
      type: string
      description: >-
        PaymentIntent's client secret for browser or app. Returned by
        PaymentIntent create API or PaymentIntent retrieve API. The provided
        client_secret is valid for 60 minutes.
    NextAction:
      type: object
      description: >-
        If present, this property tells you what actions you need to take in
        order for your customer to fulfill a payment using the provided source.
      required:
        - type
      properties:
        type:
          type: string
          description: >
            The type of action required to continue the payment.

            - `redirect_to_url`: Redirect the customer to a URL for
            authentication (e.g., 3DS verification or wallet login).

            - `display_qr_code`: Display a QR code for the customer to scan with
            their payment app.

            - `display_bank_details`: Display bank account details for the
            customer to complete a manual bank transfer.

            - `redirect_iframe`: Embed the provided iframe HTML into your page
            to display an inline authentication interface.
          enum:
            - redirect_to_url
            - display_qr_code
            - display_bank_details
            - redirect_iframe
        redirect_to_url:
          type: object
          description: >-
            Contains instructions for authenticating a payment by redirecting
            your customer to another page or application.
          properties:
            url:
              type: string
              format: uri
              description: >-
                The URL you must redirect your customer to in order to
                authenticate the payment.
              example: https://example.checkout-page.com
            return_url:
              type: string
              format: uri
              description: >-
                If the customer does not exit their browser while
                authenticating, they will be redirected to this specified URL
                after completion.
              example: https://example.payment-result-page.com
        redirect_iframe:
          type: object
          description: >-
            Contains instructions for authenticating a payment using an iframe
            embed method. The client needs to embed the returned iframe script
            content into their page to complete the payment authentication flow.
          properties:
            iframe:
              type: string
              format: html
              description: >-
                Complete iframe HTML script content containing the
                authentication page embed code. The client must directly embed
                this script into their page to display the authentication
                interface.
        display_qr_code:
          type: object
          description: The field that contains QR code info.
          properties:
            qr_code_url:
              type: string
              description: >-
                The URL to the hosted WeChat Pay instructions page, which allows
                customers to view the WeChat Pay QR code.
              example: >-
                https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=ASIAY******f987429
            expires_at:
              type: string
              format: date-time
              description: The date (unix timestamp) when the QR code expires.
        display_bank_details:
          type: object
          description: >-
            Contains the bank transfer details necessary for the customer to
            complete the payment.
          properties:
            bank_name:
              type: string
              description: The bank name of the account.
            account_number:
              type: string
              description: The account number.
              example: GB71950018692652646598
            routing_number:
              type: string
              description: The routing number.
              example: '012345678'
    PaymentAttemptResponse:
      type: object
      required:
        - attempt_id
        - amount
        - currency
      properties:
        attempt_id:
          type: string
          description: Unique identifier for the attempt.
          example: 24fc62b4-90d1-42e3-96ab-dd54ccc648b3
        amount:
          $ref: '#/components/schemas/Amount'
          example: '9.98'
          description: Amount of the PaymentAttempt.
        currency:
          $ref: '#/components/schemas/Currency'
          example: SGD
        captured_amount:
          $ref: '#/components/schemas/Amount'
          description: Captured amount.
          example: '0.00'
        refunded_amount:
          $ref: '#/components/schemas/Amount'
          description: Refunded amount.
          example: '0.00'
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: The time at which this PaymentAttempt was created.
          example: '2025-03-21T17:17:32+08:00'
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: Last time at which this PaymentAttempt was updated or operated on.
          example: '2025-03-21T17:17:32+08:00'
        complete_time:
          $ref: '#/components/schemas/DateTime'
          description: Time at which this PaymentAttempt was completed.
        cancellation_reason:
          type: string
          description: Reason for canceling this PaymentIntent.
          example: Order cancelled
        auth_code:
          type: string
          description: >-
            Authorization code returned by the issuer upon successful
            authorization.
          example: A12B3C
        arn:
          type: string
          description: >-
            Acquirer Reference Number (ARN). A 23-digit identifier used for
            cross-institution reconciliation and chargeback tracking.
          example: '74537604221222132710572'
        rrn:
          type: string
          description: >-
            Retrieval Reference Number (RRN). A 12-digit identifier used for
            transaction lookup and customer service queries.
          example: '123456789012'
        advice_code:
          type: string
          description: >
            Issuer advice code indicating the recommended action after a
            decline. Helps merchants implement intelligent retry strategies.


            - `01`: New attempt may succeed. Retry recommended.

            - `02`: Do not retry. Try a different payment method.

            - `03`: Do not retry. Cardholder should contact their issuer.

            - `21`: Cancel all pending authorizations. Card may be compromised.

            - `85`: Do not retry. Issuer will not approve this transaction type.
          enum:
            - '01'
            - '02'
            - '03'
            - '21'
            - '85'
          example: '01'
        authentication_data:
          type: object
          description: Authentication and verification data for this payment attempt.
          properties:
            cvv_result:
              type: string
              description: |
                CVV/CVC verification result returned by the issuer.

                - `M`: Match.
                - `N`: No match.
                - `P`: Not processed.
                - `U`: Unsupported.
              enum:
                - M
                - 'N'
                - P
                - U
            avs_result:
              type: string
              description: >-
                Address Verification System (AVS) result. Indicates whether the
                billing address provided matches the issuer's records.
              example: 'Y'
            three_ds:
              $ref: '#/components/schemas/CardThreeDSResponse'
        payment_method:
          $ref: '#/components/schemas/PaymentMethodResponse'
          description: The payment method details used for this PaymentAttempt.
        failure_code:
          $ref: '#/components/schemas/FailureCode'
        attempt_status:
          type: string
          description: >
            The status of the attempt.

            - `INITIATED`: The payment attempt has been created based on the
            initial request.

            - `AUTHENTICATION_REDIRECTED`: Waiting for the customer to complete
            identity verification, such as 3D Secure or QR code scanning.

            - `PENDING_AUTHORIZATION`: The authorization request has been
            received and is pending a final decision from the payment provider.

            - `AUTHORIZED`: The authorization has been successfully completed.
            Payment will be captured automatically or manually depending on
            configuration.

            - `CAPTURE_REQUESTED`: The capture request has been submitted
            successfully, and the payment is considered complete.

            - `SETTLED`: Funds have been settled from the payment provider and
            received by UQPAY.

            - `SUCCEEDED`: UQPAY has settled funds to your wallet.

            - `CANCELLED`: The payment attempt has been cancelled. Any
            authorized funds, if applicable, will be returned to the customer.

            - `EXPIRED`: The payment attempt was not completed within the
            allowed time window and has expired.

            - `FAILED`: The payment attempt has failed. Please create a new
            PaymentAttempt to retry.
          example: INITIATED
          enum:
            - INITIATED
            - AUTHENTICATION_REDIRECTED
            - PENDING_AUTHORIZATION
            - AUTHORIZED
            - CAPTURE_REQUESTED
            - SETTLED
            - SUCCEEDED
            - CANCELLED
            - EXPIRED
            - FAILED
    PaymentIntentStatus:
      type: string
      description: >
        Status of this PaymentIntent.


        - `REQUIRES_PAYMENT_METHOD`: The PaymentIntent is waiting for the
        confirm request.

        - `REQUIRES_CUSTOMER_ACTION`: The PaymentIntent is waiting for further
        customer action of authentication, e.g. 3DS verification and QR code
        scan. Please check the `next_action`.

        - `REQUIRES_CAPTURE`: The PaymentIntent is waiting for your capture to
        complete the payment.

        - `PENDING`: The PaymentIntent is pending the final result from the
        provider. No further action is required.

        - `SUCCEEDED`: The PaymentIntent has succeeded. The payment is complete.

        - `CANCELLED`: The PaymentIntent has been canceled by your request. The
        payment is closed.

        - `FAILED`: The PaymentIntent has failed.
      enum:
        - REQUIRES_PAYMENT_METHOD
        - REQUIRES_CUSTOMER_ACTION
        - REQUIRES_CAPTURE
        - PENDING
        - SUCCEEDED
        - CANCELLED
        - FAILED
    Address:
      type: object
      required:
        - country_code
        - city
        - street
        - postcode
      properties:
        country_code:
          type: string
          description: The two-letter country code in ISO 3166-1 alpha-2 format.
          minLength: 2
          maxLength: 2
          example: SG
        state:
          type: string
          description: |
            State or province of the address. Maximum of 100 characters.

            - Required when `country_code` is "US" or "CA".
          maxLength: 100
          example: ''
        city:
          type: string
          description: City of the address. Maximum of 100 characters.
          maxLength: 100
          example: Singapore
        street:
          type: string
          description: Street of the address. Maximum of 100 characters.
          maxLength: 100
          example: '444 Orchard Rd, Midpoint Orchard, Singapore '
        postcode:
          type: string
          description: Postcode of the address. Maximum of 10 characters.
          maxLength: 10
          example: '924011'
    CardThreeDSResponse:
      type: object
      properties:
        three_ds_version:
          type: string
          description: The 3D Secure protocol version used for authentication.
          example: 2.2.0
        eci:
          type: string
          description: >-
            Electronic Commerce Indicator. A two-digit code indicating the
            security level of the transaction and the liability shift outcome.
          example: '05'
        cavv:
          type: string
          description: >-
            Cardholder Authentication Verification Value. A cryptographic value
            generated by the issuer's Access Control Server confirming
            successful authentication.
          example: AAABCZIhcQAAAABZlyFxAAAAAAA=
        three_ds_authentication_status:
          type: string
          description: >
            The result of the 3DS authentication.


            - `Y`: Authentication successful.

            - `A`: Authentication attempted. Liability shift is granted but full
            authentication was not completed.

            - `N`: Authentication failed or denied.

            - `U`: Authentication could not be performed due to technical or
            other issues.

            - `R`: Authentication rejected by the issuer.

            - `C`: Challenge required. Additional verification steps are needed.
          example: 'Y'
          enum:
            - 'Y'
            - A
            - 'N'
            - U
            - R
            - C
        three_ds_cancellation_reason:
          type: string
          description: The reason the 3DS authentication flow was cancelled, if applicable.
          example: '01'
    PaymentMethodResponse:
      type: object
      properties:
        type:
          type: string
      description: >-
        The payment method details to confirm the PaymentIntent. The
        PaymentIntent will be confirmed automatically when `payment_method` is
        set.
      discriminator:
        propertyName: type
        mapping:
          card:
            $ref: '#/components/schemas/CardPaymentMethodResponse'
          applepay:
            $ref: '#/components/schemas/ApplePayPaymentMethodResponse'
          googlepay:
            $ref: '#/components/schemas/GooglePayPaymentMethodResponse'
          alipaycn:
            $ref: '#/components/schemas/AlipayCNPaymentMethodResponse'
          alipayhk:
            $ref: '#/components/schemas/AlipayHkPaymentMethodResponse'
          unionpay:
            $ref: '#/components/schemas/UnionPayPaymentMethodResponse'
          wechatpay:
            $ref: '#/components/schemas/WeChatPayPaymentMethodResponse'
          grabpay:
            $ref: '#/components/schemas/GrabPayPaymentMethodResponse'
          crypto:
            $ref: '#/components/schemas/CryptoPaymentMethodResponse'
          paynow:
            $ref: '#/components/schemas/PayNowPaymentMethodResponse'
          truemoney:
            $ref: '#/components/schemas/TruemoneyPaymentMethodResponse'
          tng:
            $ref: '#/components/schemas/TngPaymentMethodResponse'
          gcash:
            $ref: '#/components/schemas/GCashPaymentMethodResponse'
          dana:
            $ref: '#/components/schemas/DanaPaymentMethodResponse'
          kakaopay:
            $ref: '#/components/schemas/KakaopayPaymentMethodResponse'
          toss:
            $ref: '#/components/schemas/TossPaymentMethodResponse'
          naverpay:
            $ref: '#/components/schemas/NaverpayPaymentMethodResponse'
      oneOf:
        - $ref: '#/components/schemas/CardPaymentMethodResponse'
        - $ref: '#/components/schemas/ApplePayPaymentMethodResponse'
        - $ref: '#/components/schemas/GooglePayPaymentMethodResponse'
        - $ref: '#/components/schemas/AlipayCNPaymentMethodResponse'
        - $ref: '#/components/schemas/AlipayHkPaymentMethodResponse'
        - $ref: '#/components/schemas/UnionPayPaymentMethodResponse'
        - $ref: '#/components/schemas/WeChatPayPaymentMethodResponse'
        - $ref: '#/components/schemas/GrabPayPaymentMethodResponse'
        - $ref: '#/components/schemas/CryptoPaymentMethodResponse'
        - $ref: '#/components/schemas/PayNowPaymentMethodResponse'
        - $ref: '#/components/schemas/TruemoneyPaymentMethodResponse'
        - $ref: '#/components/schemas/TngPaymentMethodResponse'
        - $ref: '#/components/schemas/GCashPaymentMethodResponse'
        - $ref: '#/components/schemas/DanaPaymentMethodResponse'
        - $ref: '#/components/schemas/KakaopayPaymentMethodResponse'
        - $ref: '#/components/schemas/TossPaymentMethodResponse'
        - $ref: '#/components/schemas/NaverpayPaymentMethodResponse'
    FailureCode:
      type: string
      description: >-
        PaymentAttempt failure code. Possible values are defined in [Error Code
        Reference.payment_error](/global-acquiring/v1.6/guide/error-codes)
        section.
      example: ''
    CardPaymentMethodResponse:
      title: card
      type: object
      required:
        - type
        - card
      properties:
        type:
          type: string
          enum:
            - card
        card:
          type: object
          required:
            - card_name
            - card_number
            - network
            - authorization_type
          properties:
            card_name:
              type: string
              description: Card holder name. Maximum length is 128.
              example: john doe
            card_number:
              type: string
              description: >-
                Masked card number. First 6 digits (BIN) and last 4 digits are
                visible.
              example: 541333******4047
            network:
              type: string
              description: >-
                The card network. Examples include `visa`, `mastercard`,
                `unionpay`.
              enum:
                - visa
                - mastercard
                - unionpay
            brand:
              type: string
              description: The card brand.
              example: visa
            bin:
              type: string
              description: >-
                Bank Identification Number. The first 6–8 digits of the card
                number identifying the issuing institution.
              example: '541333'
            last4:
              type: string
              description: The last four digits of the card number.
              example: '4047'
            card_type:
              type: string
              description: The card funding type.
              enum:
                - credit
                - debit
                - prepaid
            expiry_month:
              type: string
              description: Two-digit expiry month of the card.
              example: '12'
            expiry_year:
              type: string
              description: Four-digit expiry year of the card.
              example: '2027'
            billing:
              $ref: '#/components/schemas/CardBilling'
            auto_capture:
              type: boolean
              default: true
              description: >-
                Specifies whether the funds should be requested automatically
                after the payment is authorized. Default to `true`. Set it to
                `false` if you want to capture the funds sometimes later.
            authorization_type:
              type: string
              description: >-
                The authorization type for the card payment. Options are
                `authorization` (default) and `pre_authorization`. Use
                `pre_authorization` to hold funds for more than 7 days,
                available only for Visa and Mastercard. `auto_capture` must be
                `false` for pre-authorization.
              enum:
                - authorization
                - pre_authorization
    ApplePayPaymentMethodResponse:
      title: applepay
      type: object
      required:
        - type
        - applepay
      properties:
        type:
          type: string
          enum:
            - applepay
        applepay:
          type: object
          description: Apple Pay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
            network:
              type: string
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: The type of card used (e.g., credit, debit).
              enum:
                - debit
                - credit
            token_type:
              type: string
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              enum:
                - cryptogram_3ds
                - pan_only
    GooglePayPaymentMethodResponse:
      title: googlepay
      type: object
      required:
        - type
        - googlepay
      properties:
        type:
          type: string
          enum:
            - googlepay
        googlepay:
          type: object
          description: Google Pay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
            network:
              type: string
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: The type of card used (e.g., credit, debit).
              enum:
                - debit
                - credit
            token_type:
              type: string
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              enum:
                - cryptogram_3ds
                - pan_only
    AlipayCNPaymentMethodResponse:
      title: alipaycn
      type: object
      required:
        - type
        - alipaycn
      properties:
        type:
          type: string
          enum:
            - alipaycn
        alipaycn:
          type: object
          description: AlipayCN payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    AlipayHkPaymentMethodResponse:
      title: alipayhk
      type: object
      required:
        - type
        - alipayhk
      properties:
        type:
          type: string
          enum:
            - alipayhk
        alipayhk:
          type: object
          description: AlipayHK payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    UnionPayPaymentMethodResponse:
      title: unionpay
      type: object
      required:
        - type
        - unionpay
      properties:
        type:
          type: string
          enum:
            - unionpay
        unionpay:
          type: object
          description: UnionPay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
                - securepay
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    WeChatPayPaymentMethodResponse:
      title: wechatpay
      type: object
      required:
        - type
        - wechatpay
      properties:
        type:
          type: string
          enum:
            - wechatpay
        wechatpay:
          type: object
          description: WeChat Pay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
                - mini_program
                - mobile_app
                - mobile_web
                - official_account
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    GrabPayPaymentMethodResponse:
      title: grabpay
      type: object
      required:
        - type
        - grabpay
      properties:
        type:
          type: string
          enum:
            - grabpay
        grabpay:
          type: object
          description: GrabPay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
            shopper_name:
              type: string
              description: The name of the shopper.
    CryptoPaymentMethodResponse:
      title: crypto
      type: object
      required:
        - type
        - crypto
      properties:
        type:
          type: string
          enum:
            - crypto
        crypto:
          type: object
          description: Cryptocurrency payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - redirect
                - qrcode
            network:
              type: string
              enum:
                - ETH
                - TRON
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    PayNowPaymentMethodResponse:
      title: paynow
      type: object
      required:
        - type
        - paynow
      properties:
        type:
          type: string
          enum:
            - paynow
        paynow:
          type: object
          description: PayNow payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    TruemoneyPaymentMethodResponse:
      title: truemoney
      type: object
      required:
        - type
        - truemoney
      properties:
        type:
          type: string
          enum:
            - truemoney
        truemoney:
          type: object
          description: Truemoney payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    TngPaymentMethodResponse:
      title: tng
      type: object
      required:
        - type
        - tng
      properties:
        type:
          type: string
          enum:
            - tng
        tng:
          type: object
          description: Touch'n Go payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    GCashPaymentMethodResponse:
      title: gcash
      type: object
      required:
        - type
        - gcash
      properties:
        type:
          type: string
          enum:
            - gcash
        gcash:
          type: object
          description: GCash payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    DanaPaymentMethodResponse:
      title: dana
      type: object
      required:
        - type
        - dana
      properties:
        type:
          type: string
          enum:
            - dana
        dana:
          type: object
          description: Dana payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    KakaopayPaymentMethodResponse:
      title: kakaopay
      type: object
      required:
        - type
        - kakaopay
      properties:
        type:
          type: string
          enum:
            - kakaopay
        kakaopay:
          type: object
          description: KakaoPay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    TossPaymentMethodResponse:
      title: toss
      type: object
      required:
        - type
        - toss
      properties:
        type:
          type: string
          enum:
            - toss
        toss:
          type: object
          description: Toss Pay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    NaverpayPaymentMethodResponse:
      title: naverpay
      type: object
      required:
        - type
        - naverpay
      properties:
        type:
          type: string
          enum:
            - naverpay
        naverpay:
          type: object
          description: Naver Pay payment information returned in the response.
          properties:
            flow:
              type: string
              description: The checkout flow used for this payment.
              enum:
                - qrcode
            os_type:
              type: string
              description: The operating system type of the customer device.
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: Whether this is an in-person (offline) payment.
    CardBilling:
      description: Billing information of the customer.
      type: object
      required:
        - first_name
        - last_name
        - email
        - address
      properties:
        first_name:
          type: string
          description: First name of the customer. Maximum length is 128.
          maxLength: 128
          example: John
        last_name:
          type: string
          description: Last name of the customer. Maximum length is 128.
          maxLength: 128
          example: Doe
        email:
          type: string
          description: Email address of the customer.
          maxLength: 225
          example: john.doe@example.com
          format: email
        phone_number:
          type: string
          description: Phone number of the customer.
          maxLength: 36
          example: '12025550123'
        address:
          $ref: '#/components/schemas/Address'
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: The API token for login provided by UQPay.

````