---
updatedAt: 2026-07-31T02:48:25.000Z
agentTools:
  projectIndex: https://devzone.2c2p.com/llms.txt
---

# /nonUi

Process payments with credit cards (authentication and authorization) as well as other payment methods, such as direct debit and APM.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payment",
    "description": "Initiate a payment transaction for credit card processing.",
    "license": {
      "name": "2C2P Proprietary License",
      "url": "https://devzone.2c2p.com/docs/general"
    },
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://core.demo-paco.2c2p.com/api/2.0/Payment/",
      "description": "SwaggerHub API Auto Mocking"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "secure",
      "description": "Secured operations. Requires API Key and may have usage quota."
    }
  ],
  "paths": {
    "/nonUi": {
      "post": {
        "tags": [
          "secure"
        ],
        "description": "Process payments with credit cards (authentication and authorization) as well as other payment methods, such as direct debit and APM.",
        "operationId": "pay",
        "requestBody": {
          "content": {
            "application/jose": {
              "schema": {
                "$ref": "#/components/schemas/NonUiRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Result of payment transaction",
            "content": {
              "application/jose": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCompleteResponse"
                }
              }
            }
          },
          "202": {
            "description": "Result of payment transaction (incomplete - requires further action)",
            "content": {
              "application/jose": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentIncompleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/jose": {
                "schema": {
                  "$ref": "#/components/schemas/BasicResponseFields"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "apiKey",
        "in": "header"
      }
    },
    "schemas": {
      "NonUiRequestBody": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasicRequestFields"
          },
          {
            "type": "object",
            "required": [
              "officeId",
              "orderNo",
              "paymentType",
              "productDescription",
              "transactionAmount",
              "notificationUrls"
            ],
            "properties": {
              "officeId": {
                "type": "string",
                "maxLength": 20,
                "format": "paco-CODE"
              },
              "terminalId": {
                "type": "string",
                "maxLength": 20,
                "example": "75002084"
              },
              "orderNo": {
                "type": "string",
                "maxLength": 40,
                "example": "ORD001"
              },
              "productDescription": {
                "type": "string",
                "maxLength": 50,
                "example": "Product01"
              },
              "paymentCategory": {
                "$ref": "#/components/schemas/PaymentCategory"
              },
              "paymentType": {
                "$ref": "#/components/schemas/PaymentType"
              },
              "paymentExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "example": "2025-08-28T23:59:59.999Z"
              },
              "channelCode": {
                "$ref": "#/components/schemas/ChannelCode"
              },
              "agentCode": {
                "$ref": "#/components/schemas/AgentCode"
              },
              "creditCardDetails": {
                "$ref": "#/components/schemas/CreditCardDetailsRequest"
              },
              "tokenizeDetails": {
                "$ref": "#/components/schemas/TokenizeDetails"
              },
              "installmentPaymentDetails": {
                "$ref": "#/components/schemas/InstallmentPaymentDetails"
              },
              "recurringPaymentDetails": {
                "$ref": "#/components/schemas/RecurringPaymentDetails"
              },
              "deviceDetails": {
                "$ref": "#/components/schemas/DeviceDetails"
              },
              "billingAddress": {
                "$ref": "#/components/schemas/BillingAddress"
              },
              "shippingAddress": {
                "$ref": "#/components/schemas/ShippingAddress"
              },
              "currencyConversionDetails": {
                "$ref": "#/components/schemas/CurrencyConversionDetailsNonUi"
              },
              "request3dsFlag": {
                "type": "string",
                "description": "N=No 3DS. Y=Relax. Y-Strict=Strict. Default from backend profile."
              },
              "originalTransactionAmount": {
                "$ref": "#/components/schemas/AmountCompound"
              },
              "transactionAmount": {
                "$ref": "#/components/schemas/AmountCompound"
              },
              "notificationUrls": {
                "$ref": "#/components/schemas/NotificationUrls"
              },
              "generalPayerDetails": {
                "$ref": "#/components/schemas/PersonBase"
              },
              "purchaseItemize": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PurchaseItemNonUi"
                }
              },
              "airlineData": {
                "$ref": "#/components/schemas/AirlineData"
              },
              "statementDescriptor": {
                "type": "string",
                "maxLength": 20
              },
              "transactionInitiator": {
                "type": "string",
                "maxLength": 1,
                "description": "C=Customer (default), M=Merchant",
                "example": "C"
              },
              "previousPaymentId": {
                "type": "string",
                "maxLength": 255,
                "description": "Required when transactionInitiator is M."
              },
              "userDefined1": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined2": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined3": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined4": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined5": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined6": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined7": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined8": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined9": {
                "type": "string",
                "maxLength": 150
              },
              "userDefined10": {
                "type": "string",
                "maxLength": 150
              }
            }
          }
        ]
      },
      "BasicRequestFields": {
        "type": "object",
        "required": [
          "apiRequest"
        ],
        "properties": {
          "apiRequest": {
            "type": "object",
            "required": [
              "requestMessageID",
              "requestDateTime"
            ],
            "properties": {
              "requestMessageID": {
                "type": "string",
                "format": "guid",
                "example": "e952828c-6d19-4a08-92e4-1bc47e1945a2"
              },
              "requestDateTime": {
                "type": "string",
                "format": "date-time",
                "example": "2025-08-28T09:12:34.001Z"
              },
              "language": {
                "type": "string",
                "example": "en-US"
              }
            }
          }
        }
      },
      "PaymentCategory": {
        "type": "string",
        "maxLength": 20,
        "enum": [
          "ECOM",
          "VEDC",
          "QUICKPAY",
          "RPP",
          "IPP"
        ],
        "example": "ECOM"
      },
      "PaymentType": {
        "type": "string",
        "maxLength": 20,
        "enum": [
          "CC",
          "IPP",
          "CC-VI",
          "CC-CA",
          "CC-AX",
          "CC-DC",
          "CC-DS",
          "CC-UP",
          "CC-JC",
          "CC-MP",
          "CC-KP",
          "CC-TP",
          "QR",
          "DEEPLINK",
          "WALLET",
          "OTC",
          "SSM",
          "WEBPAY",
          "IMBANK",
          "EXT"
        ],
        "example": "CC-VI"
      },
      "ChannelCode": {
        "type": "string",
        "maxLength": 20
      },
      "AgentCode": {
        "type": "string",
        "maxLength": 20
      },
      "AmountCompound": {
        "type": "object",
        "required": [
          "amount",
          "amountText",
          "currencyCode",
          "decimalPlaces"
        ],
        "properties": {
          "amountText": {
            "type": "string",
            "maxLength": 12,
            "minLength": 12,
            "example": "000000005050"
          },
          "currencyCode": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "THB"
          },
          "decimalPlaces": {
            "type": "integer",
            "example": 2
          },
          "amount": {
            "type": "number",
            "format": "decimal",
            "example": 50.5
          }
        }
      },
      "NotificationUrls": {
        "type": "object",
        "required": [
          "confirmationUrl",
          "failedUrl",
          "cancellationUrl",
          "backendUrl"
        ],
        "properties": {
          "confirmationUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com"
          },
          "failedUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com"
          },
          "cancellationUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com"
          },
          "backendUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com"
          }
        }
      },
      "TokenizeDetails": {
        "type": "object",
        "description": "Card tokenization (stored card) configuration for the transaction.\nThis replaces the legacy 'storeCardDetails' object.\nTokenization allows saving card details securely for future payments\nwithout requiring the cardholder to re-enter card information.\n",
        "properties": {
          "tokenizeFlag": {
            "type": "string",
            "description": "Controls tokenization behavior for this transaction:\n- Y = Tokenize card upon successful authorization. If tokenRef is not provided, a new token is created and returned. If tokenRef is provided, the system uses the existing token instead of creating a new one.\n- N = Do not tokenize. No card data is stored.\n- F = Force token creation. A new token is always created regardless of existing tokens. The tokenRef field must NOT be provided. request3dsFlag must be enabled (Y or Y-Strict).\n\nNote: Required in prepayment (prePaymentUi) flow when tokenizeDetails is provided. In nonUI flow, if tokenizeFlag is null or N, the tokenizeDetails object is silently ignored.\n",
            "enum": [
              "Y",
              "N",
              "F"
            ],
            "example": "Y"
          },
          "profileRef": {
            "type": "string",
            "maxLength": 255,
            "description": "Profile reference for grouping tokens under a customer profile.\nUsed to organize multiple stored cards belonging to the same cardholder.\nWhen provided during tokenization (tokenizeFlag=Y), the token is associated with this profile.\nWhen provided during token lookup, only tokens matching this profile are returned.\n"
          },
          "tokenRef": {
            "type": "string",
            "description": "Reference to an existing stored card token.\n- Forbidden when tokenizeFlag is 'F' (Force). tokenRef must NOT be provided.\n- Forbidden when tokenizeFlag is 'N' or null in nonUI flow (request will be rejected).\n- Forbidden in prepayment (prePaymentUi) flow.\n- When provided with tokenizeFlag='Y' in nonUI flow, the system uses this existing token instead of creating a new one.\n"
          },
          "tokenRefList": {
            "type": "array",
            "description": "List of token references to be validated and made available on the Payment Page.\n- Only allowed in prepayment (prePaymentUi) flow.\n- Forbidden in nonUI flow (will be rejected by validation).\n- Forbidden when tokenizeFlag is 'F'.\n- The Payment Page will display these stored cards for the cardholder to choose from.\n",
            "items": {
              "type": "object",
              "description": "A single token reference item in the list.",
              "required": [
                "tokenRef"
              ],
              "properties": {
                "tokenRef": {
                  "type": "string",
                  "description": "Token reference string identifying a previously stored card."
                }
              }
            }
          }
        }
      },
      "CreditCardDetailsRequest": {
        "type": "object",
        "required": [
          "cardNumber"
        ],
        "properties": {
          "cardNumber": {
            "type": "string",
            "maxLength": 19,
            "minLength": 13,
            "format": "password",
            "example": "4012000000003335"
          },
          "cardExpiryMMYY": {
            "type": "string",
            "maxLength": 4,
            "minLength": 4,
            "example": "1124"
          },
          "cvvCode": {
            "type": "string",
            "maxLength": 3,
            "example": "123"
          },
          "cardType": {
            "type": "string",
            "maxLength": 20
          },
          "cardHolderName": {
            "type": "string",
            "maxLength": 45,
            "minLength": 2,
            "example": "John Doe"
          },
          "payerName": {
            "type": "string",
            "maxLength": 100,
            "minLength": 2,
            "example": "John Doe"
          },
          "issuerCode": {
            "type": "string",
            "maxLength": 5
          },
          "issuerBankName": {
            "type": "string",
            "maxLength": 100
          },
          "issuerBankCountry": {
            "type": "string",
            "maxLength": 2,
            "minLength": 2,
            "example": "TH"
          },
          "acquirerBank": {
            "type": "string",
            "maxLength": 100
          },
          "acquirerMerchantID": {
            "type": "string",
            "maxLength": 20
          },
          "enrolledFlag": {
            "type": "string",
            "maxLength": 1,
            "example": "Y"
          },
          "authentication3DSVersion": {
            "type": "string",
            "maxLength": 10
          },
          "authenticationStatus": {
            "type": "string",
            "maxLength": 1,
            "example": "Y"
          },
          "authenticationStatusReason": {
            "type": "string"
          },
          "eciValue": {
            "type": "string",
            "maxLength": 2,
            "example": "02"
          },
          "cavvValue": {
            "type": "string",
            "maxLength": 40
          },
          "threeDSServerTransID": {
            "type": "string",
            "maxLength": 36,
            "minLength": 36,
            "example": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e"
          },
          "dsTransID": {
            "type": "string",
            "maxLength": 36,
            "minLength": 36,
            "example": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e"
          },
          "paRes": {
            "type": "string"
          }
        }
      },
      "InstallmentPaymentDetails": {
        "type": "object",
        "required": [
          "ippFlag"
        ],
        "properties": {
          "ippFlag": {
            "type": "string",
            "example": "Y"
          },
          "installmentPlanGroup": {
            "type": "string"
          },
          "installmentPlan": {
            "type": "string"
          },
          "interestType": {
            "type": "string",
            "example": "C"
          },
          "installmentPeriod": {
            "type": "integer",
            "format": "int32",
            "example": 10
          },
          "bankProductCode": {
            "type": "string"
          }
        }
      },
      "RecurringPaymentDetails": {
        "type": "object",
        "required": [
          "rppFlag"
        ],
        "properties": {
          "rppFlag": {
            "type": "string",
            "example": "Y"
          },
          "orderNoPrefix": {
            "type": "string"
          },
          "recurringIntervalNumber": {
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "recurringInterval": {
            "type": "string",
            "example": "Monthly"
          },
          "recurringTimes": {
            "type": "integer",
            "format": "int32"
          },
          "recurringAutoAccumulate": {
            "type": "string"
          },
          "recurringStartDate": {
            "type": "string",
            "format": "date"
          },
          "recurringEndDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "DeviceDetails": {
        "type": "object",
        "properties": {
          "browser": {
            "type": "string"
          },
          "browserAcceptHeader": {
            "type": "string"
          },
          "browserIP": {
            "type": "string"
          },
          "browserJavaEnabled": {
            "type": "string",
            "enum": [
              "Y",
              "N"
            ],
            "description": "Whether the browser has Java enabled. Y = enabled, N = disabled.",
            "example": "N"
          },
          "browserLanguage": {
            "type": "string"
          },
          "browserColorDepth": {
            "type": "string"
          },
          "browserScreenHeight": {
            "type": "string"
          },
          "browserScreenWidth": {
            "type": "string"
          },
          "browserTZ": {
            "type": "string"
          },
          "browserUserAgent": {
            "type": "string"
          },
          "mobileDeviceFlag": {
            "type": "string"
          }
        }
      },
      "BillingAddress": {
        "type": "object",
        "properties": {
          "billAddrCity": {
            "type": "string",
            "maxLength": 50
          },
          "billAddrCountry": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "764"
          },
          "billAddrLine1": {
            "type": "string",
            "maxLength": 50
          },
          "billAddrLine2": {
            "type": "string",
            "maxLength": 50
          },
          "billAddrLine3": {
            "type": "string",
            "maxLength": 50
          },
          "billAddrPostCode": {
            "type": "string",
            "maxLength": 16
          },
          "billAddrState": {
            "type": "string",
            "maxLength": 3,
            "example": "40"
          }
        }
      },
      "ShippingAddress": {
        "type": "object",
        "properties": {
          "shipAddrCity": {
            "type": "string",
            "maxLength": 50
          },
          "shipAddrCountry": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "764"
          },
          "shipAddrLine1": {
            "type": "string",
            "maxLength": 50
          },
          "shipAddrLine2": {
            "type": "string",
            "maxLength": 50
          },
          "shipAddrLine3": {
            "type": "string",
            "maxLength": 50
          },
          "shipAddrPostCode": {
            "type": "string",
            "maxLength": 16
          },
          "shipAddrState": {
            "type": "string",
            "maxLength": 3,
            "example": "40"
          }
        }
      },
      "CurrencyConversionDetailsNonUi": {
        "type": "object",
        "required": [
          "enabledFlag",
          "conversionType",
          "messageId"
        ],
        "properties": {
          "enabledFlag": {
            "type": "boolean"
          },
          "conversionType": {
            "type": "string",
            "enum": [
              "None",
              "DCC",
              "MCC",
              "MCP"
            ]
          },
          "messageId": {
            "type": "string"
          }
        }
      },
      "PersonBase": {
        "type": "object",
        "properties": {
          "personType": {
            "type": "string",
            "enum": [
              "general",
              "passenger",
              "guest"
            ]
          },
          "seqNo": {
            "type": "integer"
          },
          "personName": {
            "type": "object",
            "properties": {
              "fullName": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "middleName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              }
            }
          },
          "email": {
            "type": "string",
            "maxLength": 100
          },
          "mobilePhoneCountryCode": {
            "type": "string",
            "maxLength": 4,
            "example": "+66"
          },
          "mobilePhone": {
            "type": "string",
            "maxLength": 15,
            "minLength": 8,
            "example": "+66861234567"
          },
          "businessPhoneCountryCode": {
            "type": "string",
            "maxLength": 4,
            "example": "+66"
          },
          "businessPhone": {
            "type": "string",
            "maxLength": 15,
            "minLength": 8,
            "example": "+6621167000"
          },
          "emailForFxReceipt": {
            "type": "string",
            "maxLength": 100
          }
        }
      },
      "PurchaseItemNonUi": {
        "type": "object",
        "required": [
          "purchaseItemType"
        ],
        "properties": {
          "purchaseItemType": {
            "type": "string",
            "enum": [
              "ticket",
              "insurance"
            ]
          },
          "purchaseItemDescription": {
            "type": "string"
          },
          "purchaseItemPrice": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "originalPurchaseItemPrice": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "subMerchantID": {
            "type": "string"
          }
        }
      },
      "AirlineData": {
        "type": "object",
        "required": [
          "bookingReference",
          "flightSegments",
          "passengers"
        ],
        "properties": {
          "bypassForward": {
            "type": "boolean",
            "default": false
          },
          "bookingReference": {
            "type": "object",
            "required": [
              "pnrCode",
              "bookingDateTime"
            ],
            "properties": {
              "pnrCode": {
                "type": "string",
                "maxLength": 6,
                "minLength": 6,
                "example": "DEF456"
              },
              "bookingDateTime": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "type": "string",
                "maxLength": 2,
                "example": "HK"
              }
            }
          },
          "agency": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 50
              },
              "code": {
                "type": "string",
                "maxLength": 20
              },
              "id": {
                "type": "string",
                "maxLength": 20
              },
              "invoiceNo": {
                "type": "string",
                "maxLength": 50
              },
              "planName": {
                "type": "string",
                "maxLength": 30
              }
            }
          },
          "flightSegments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "sequenceNo",
                "marketingAirlineCode",
                "marketingFlightNo",
                "departure",
                "arrival"
              ],
              "properties": {
                "sequenceNo": {
                  "type": "integer",
                  "example": 1
                },
                "marketingAirlineName": {
                  "type": "string",
                  "maxLength": 50,
                  "example": "Thai Airways"
                },
                "marketingAirlineCode": {
                  "type": "string",
                  "maxLength": 2,
                  "minLength": 2,
                  "example": "TG"
                },
                "marketingFlightNo": {
                  "type": "string",
                  "maxLength": 4,
                  "example": "1234"
                },
                "operatingAirlineName": {
                  "type": "string",
                  "maxLength": 50,
                  "example": "Thai Smile"
                },
                "operatingAirlineCode": {
                  "type": "string",
                  "maxLength": 2,
                  "example": "WE"
                },
                "operatingflightNo": {
                  "type": "string",
                  "maxLength": 4,
                  "example": "5678"
                },
                "flightType": {
                  "type": "string",
                  "maxLength": 20
                },
                "isChartered": {
                  "type": "boolean"
                },
                "departure": {
                  "$ref": "#/components/schemas/LocationDetails"
                },
                "arrival": {
                  "$ref": "#/components/schemas/LocationDetails"
                },
                "isStopOver": {
                  "type": "boolean"
                },
                "fareClass": {
                  "type": "string",
                  "maxLength": 1,
                  "example": "Y"
                },
                "fareBasisCode": {
                  "type": "string",
                  "maxLength": 15,
                  "example": "B2NR"
                },
                "endorsementOrRestriction": {
                  "type": "string",
                  "maxLength": 100,
                  "example": "NOT REFUNDABLE"
                },
                "isReturnFlight": {
                  "type": "boolean"
                }
              }
            }
          },
          "tickets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "passengerSequenceNo": {
                  "type": "integer"
                },
                "ticketNo": {
                  "type": "string",
                  "maxLength": 64
                },
                "ticketIssueDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "ticketReservationSystemCode": {
                  "type": "string",
                  "maxLength": 4,
                  "example": "AMAD"
                },
                "isSeatSale": {
                  "type": "boolean"
                },
                "isWithChild": {
                  "type": "boolean"
                },
                "purchaseType": {
                  "type": "string",
                  "maxLength": 40
                },
                "isPackageTravel": {
                  "type": "boolean"
                },
                "isFlexTicket": {
                  "type": "boolean"
                },
                "isInsurancePurchased": {
                  "type": "boolean"
                },
                "securityProgramTravelCode": {
                  "type": "string",
                  "maxLength": 30
                },
                "taxAmount": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "ticketFare": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "ticketFareTax": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "airportTax": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "agentFee": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "agentFeeVat": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "baseRefundVat": {
                  "$ref": "#/components/schemas/AmountCompound"
                },
                "agentFeeBaseRefundVat": {
                  "$ref": "#/components/schemas/AmountCompound"
                }
              }
            }
          },
          "passengers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "sequenceNo",
                "firstName",
                "lastName",
                "email"
              ],
              "properties": {
                "sequenceNo": {
                  "type": "integer"
                },
                "identificationNo": {
                  "type": "string",
                  "maxLength": 30
                },
                "documentType": {
                  "type": "string",
                  "maxLength": 30
                },
                "isPurchaser": {
                  "type": "boolean"
                },
                "title": {
                  "type": "string",
                  "maxLength": 10
                },
                "firstName": {
                  "type": "string",
                  "maxLength": 64
                },
                "middleName": {
                  "type": "string",
                  "maxLength": 64
                },
                "lastName": {
                  "type": "string",
                  "maxLength": 64
                },
                "gender": {
                  "type": "string",
                  "maxLength": 1,
                  "enum": [
                    "F",
                    "M",
                    "X"
                  ],
                  "example": "M"
                },
                "email": {
                  "type": "string",
                  "maxLength": 100,
                  "format": "email"
                },
                "mobileNo": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 8
                },
                "type": {
                  "type": "string",
                  "maxLength": 3,
                  "description": "Passenger type code (IATA standard, e.g., ADT=Adult, CHD=Child, INF=Infant).",
                  "example": "ADT"
                },
                "isFrequentFlyer": {
                  "type": "boolean"
                },
                "frequentFlyerStatus": {
                  "type": "string",
                  "maxLength": 64
                },
                "frequentFlyerNumber": {
                  "type": "string",
                  "maxLength": 64
                }
              }
            }
          }
        }
      },
      "LocationDetails": {
        "type": "object",
        "properties": {
          "airportCode": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "DMK"
          },
          "cityCode": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "BKK"
          },
          "cityName": {
            "type": "string",
            "maxLength": 50
          },
          "countryCode": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "example": "764"
          },
          "countryName": {
            "type": "string",
            "maxLength": 70
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BasicResponseFields": {
        "type": "object",
        "required": [
          "version",
          "apiResponse"
        ],
        "properties": {
          "version": {
            "type": "string",
            "example": "2.0"
          },
          "apiResponse": {
            "$ref": "#/components/schemas/ApiResponseDetails"
          }
        }
      },
      "ApiResponseDetails": {
        "type": "object",
        "required": [
          "responseCode",
          "responseDescription",
          "responseDateTime"
        ],
        "properties": {
          "responseMessageId": {
            "type": "string",
            "format": "guid"
          },
          "responseToRequestMessageId": {
            "type": "string",
            "format": "guid"
          },
          "responseCode": {
            "type": "string",
            "maxLength": 20,
            "example": "PC-B050000"
          },
          "responseDescription": {
            "type": "string",
            "maxLength": 200,
            "example": "Success"
          },
          "responseDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "responseTime": {
            "type": "integer",
            "format": "int64",
            "description": "Response time in milliseconds."
          },
          "acquirerResponseCode": {
            "type": "string",
            "maxLength": 20
          },
          "acquirerResponseDescription": {
            "type": "string",
            "maxLength": 200
          },
          "eciValue": {
            "type": "string",
            "maxLength": 2,
            "example": "02"
          },
          "marketingDescription": {
            "type": "string",
            "maxLength": 5000
          }
        }
      },
      "PaymentCompleteResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasicResponseFields"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "paymentResult": {
                    "$ref": "#/components/schemas/CompletePaymentResult"
                  }
                }
              }
            }
          }
        ]
      },
      "CompletePaymentResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentResultBase"
          },
          {
            "type": "object",
            "properties": {
              "surchargeFee": {
                "type": "object",
                "description": "Surcharge fee amounts applied to this transaction (if surcharge is enabled for the office).",
                "properties": {
                  "feeBaseAmount": {
                    "$ref": "#/components/schemas/AmountCompound"
                  },
                  "feeQuoteAmount": {
                    "$ref": "#/components/schemas/AmountCompound"
                  }
                }
              },
              "creditCardAuthenticatedDetails": {
                "$ref": "#/components/schemas/CreditCardDetailsResponse"
              },
              "approvalCode": {
                "type": "string",
                "maxLength": 20
              },
              "pspName": {
                "type": "string",
                "maxLength": 50
              },
              "pspMerchantId": {
                "type": "string",
                "maxLength": 20
              },
              "failedReason": {
                "type": "string",
                "maxLength": 200
              },
              "pspResponse": {
                "$ref": "#/components/schemas/PspResponseDetails"
              },
              "paymentExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "Expiry date/time of the pending payment. Payment can no longer be completed after this time."
              },
              "linkExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "Expiry date/time of the payment page link. The page is inaccessible after this time."
              },
              "pspExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "PSP-level expiry date/time (e.g., QR code or deep link validity window)."
              },
              "payslipURL": {
                "type": "string",
                "format": "uri",
                "description": "URL to retrieve the payslip document. Only applicable for PayLater payment methods."
              },
              "pspReferenceNo": {
                "type": "string",
                "maxLength": 50,
                "description": "Reference number assigned by the PSP for this transaction."
              },
              "tokenizeDetails": {
                "$ref": "#/components/schemas/TokenizeDetailsResponse"
              },
              "installmentPaymentResults": {
                "$ref": "#/components/schemas/InstallmentPaymentResults"
              }
            }
          }
        ]
      },
      "PaymentIncompleteResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasicResponseFields"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "object",
                "required": [
                  "paymentIncompleteResult",
                  "paymentPage"
                ],
                "properties": {
                  "paymentIncompleteResult": {
                    "$ref": "#/components/schemas/IncompletePaymentResult"
                  },
                  "paymentPage": {
                    "$ref": "#/components/schemas/PaymentPageDetails"
                  }
                }
              }
            }
          }
        ]
      },
      "IncompletePaymentResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentResultBase"
          },
          {
            "type": "object",
            "properties": {
              "notificationURLs": {
                "type": "object",
                "description": "Notification URLs echoed back. Response uses uppercase 'URL' suffix per [JsonPropertyName].",
                "properties": {
                  "confirmationURL": {
                    "type": "string",
                    "description": "URL where successful payment response is redirected."
                  },
                  "failedURL": {
                    "type": "string",
                    "description": "URL where failed payment response is redirected."
                  },
                  "cancellationURL": {
                    "type": "string",
                    "description": "URL where cancelled payment response is redirected."
                  },
                  "backendURL": {
                    "type": "string",
                    "description": "Backend server-to-server notification URL."
                  }
                }
              },
              "aresACSChallenge": {
                "$ref": "#/components/schemas/AResACSChallenge"
              },
              "failedReason": {
                "type": "string",
                "description": "Reason description if the payment failed at this stage."
              },
              "availablePaymentTypes": {
                "type": "array",
                "description": "List of payment types available for this transaction on the Payment Page.",
                "items": {
                  "$ref": "#/components/schemas/PaymentType"
                }
              },
              "tokenizeDetails": {
                "$ref": "#/components/schemas/IncompleteTokenizeDetailsResponse"
              },
              "paymentExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "Expiry date/time of the pending payment."
              },
              "linkExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "Expiry date/time of the payment page link. Page cannot be opened after this."
              },
              "pspExpiryDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "PSP-level expiry (e.g., for QR or deeplink validity)."
              },
              "currencyConversionType": {
                "type": "string",
                "description": "Currency conversion type applied to this transaction (DCC, MCC, or MCP)."
              },
              "currencyConversionMerchantId": {
                "type": "string",
                "description": "Merchant ID used for currency conversion with the FX provider."
              },
              "preferredPaymentTypes": {
                "type": "array",
                "description": "Preferred payment types from the original request, echoed back for Payment Page rendering.",
                "items": {
                  "$ref": "#/components/schemas/PaymentType"
                }
              }
            }
          }
        ]
      },
      "PaymentPageDetails": {
        "type": "object",
        "description": "Payment Page URL and validity information for redirecting the cardholder.",
        "required": [
          "paymentPageURL"
        ],
        "properties": {
          "paymentPageURL": {
            "type": "string",
            "format": "uri",
            "description": "URL to redirect the cardholder to display the Payment Page UI.",
            "example": "https://demo-paco.2c2p.com/payment/form"
          },
          "validTillDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The payment page URL is valid and accessible until this date/time (UTC). After this, the page returns an error."
          }
        }
      },
      "PaymentResultBase": {
        "type": "object",
        "description": "Base fields shared between complete and incomplete payment results.",
        "properties": {
          "transactionDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Date/time when the payment transaction was initiated."
          },
          "officeGroupId": {
            "type": "string",
            "maxLength": 36,
            "description": "Office Group ID (UUID format)."
          },
          "officeId": {
            "type": "string",
            "maxLength": 20,
            "description": "Office ID that processed this transaction."
          },
          "orderNo": {
            "type": "string",
            "description": "Merchant's order number."
          },
          "productDescription": {
            "type": "string",
            "description": "Product description from the original request."
          },
          "invoiceNo2C2P": {
            "type": "string",
            "description": "2C2P-assigned invoice number."
          },
          "pspInvoiceNo": {
            "type": "string",
            "description": "Invoice number at the PSP level."
          },
          "pspReferenceNo": {
            "type": "string",
            "description": "Reference number from the PSP."
          },
          "controllerInternalID": {
            "type": "string",
            "format": "uuid",
            "description": "PACO internal payment ID (UUID format)."
          },
          "paymentStatusInfo": {
            "type": "object",
            "description": "Current payment status and step information.",
            "required": [
              "paymentStatus",
              "paymentStep"
            ],
            "properties": {
              "paymentStatus": {
                "type": "string",
                "description": "Payment status code (e.g., A=Authorized, S=Settled, V=Voided, F=Failed, P=Pending).",
                "example": "A"
              },
              "paymentStep": {
                "type": "string",
                "description": "Payment step code (e.g., PA=Pre-Authorized, AU=Authorized, ST=Settled).",
                "example": "PA"
              },
              "lastUpdatedDateTime": {
                "type": "string",
                "format": "date-time",
                "description": "Last time the payment status was updated."
              }
            }
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "channelCode": {
            "$ref": "#/components/schemas/ChannelCode"
          },
          "agentCode": {
            "$ref": "#/components/schemas/AgentCode"
          },
          "currencyConversionFlag": {
            "type": "boolean",
            "description": "Indicates whether currency conversion was activated for this transaction."
          },
          "transactionAmount": {
            "description": "Transaction amount (in cardholder currency if DCC/MCC applied).",
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountCompound"
              }
            ]
          },
          "originalTransactionAmount": {
            "description": "Original transaction amount in base (merchant) currency before conversion.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountCompound"
              }
            ]
          },
          "settlementAmount": {
            "description": "Settlement amount (may differ from transaction amount due to fees or conversion).",
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountCompound"
              }
            ]
          },
          "statementDescriptor": {
            "type": "string",
            "maxLength": 20,
            "description": "Dynamic statement description displayed on the customer's account."
          },
          "transactionInitiator": {
            "type": "string",
            "maxLength": 1,
            "description": "Who initiated the transaction: C=Customer, M=Merchant.",
            "example": "C"
          },
          "previousPaymentId": {
            "type": "string",
            "maxLength": 255,
            "description": "Reference to a previous payment (for merchant-initiated subsequent transactions)."
          },
          "purchaseItemize": {
            "type": "array",
            "description": "Purchase line items submitted with the transaction.",
            "items": {
              "$ref": "#/components/schemas/PurchaseItemNonUi"
            }
          },
          "userDefined1": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 1."
          },
          "userDefined2": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 2."
          },
          "userDefined3": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 3."
          },
          "userDefined4": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 4."
          },
          "userDefined5": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 5."
          },
          "userDefined6": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 6."
          },
          "userDefined7": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 7."
          },
          "userDefined8": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 8."
          },
          "userDefined9": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 9."
          },
          "userDefined10": {
            "type": "string",
            "maxLength": 150,
            "description": "Merchant-specific custom data field 10."
          }
        }
      },
      "CreditCardDetailsResponse": {
        "type": "object",
        "description": "Credit card details with authentication info returned in the payment response.",
        "properties": {
          "cardNumber": {
            "type": "string",
            "format": "password",
            "description": "Masked credit card number (PAN)."
          },
          "localScheme": {
            "type": "string",
            "description": "Local card scheme identifier (e.g., domestic network brand)."
          },
          "cardExpiryMMYY": {
            "type": "string",
            "maxLength": 4,
            "description": "Card expiry date in MMYY format.",
            "example": "1224"
          },
          "issuerCode": {
            "type": "string",
            "maxLength": 5,
            "description": "Issuer code of the credit card (e.g., VI, CA, AX)."
          },
          "payerName": {
            "type": "string",
            "maxLength": 100,
            "description": "Payer name (First Name + Last Name)."
          },
          "cardHolderName": {
            "type": "string",
            "maxLength": 45,
            "description": "Card holder name as printed on the card."
          },
          "terminalTransStatus": {
            "type": "string",
            "maxLength": 3,
            "description": "ACS-Core / Admin non-EMV terminal transaction status, returned as received from the 3DS Server (e.g. CY, AY, C, A, CPC, CPE, CPM).",
            "example": "CY"
          },
          "authenticationStatus": {
            "type": "string",
            "maxLength": 1,
            "description": "Indicates whether a transaction qualifies as authenticated (Y/N/A/U/R).",
            "example": "Y"
          },
          "authenticationStatusReason": {
            "type": "string",
            "maxLength": 5,
            "description": "Reason code for the authenticationStatus value."
          },
          "eciValue": {
            "type": "string",
            "maxLength": 2,
            "description": "Electronic Commerce Indicator value from 3DS authentication.",
            "example": "02"
          },
          "issuerBankCountry": {
            "type": "string",
            "maxLength": 2,
            "description": "Country of issuer bank in ISO 3166-1 alpha-2 format.",
            "example": "TH"
          },
          "issuerBankName": {
            "type": "string",
            "maxLength": 100,
            "description": "Name of the card issuing bank."
          },
          "cardType": {
            "type": "string",
            "maxLength": 20,
            "description": "Fund source type (e.g., credit, debit, prepaid)."
          },
          "authentication3DSVersion": {
            "type": "string",
            "maxLength": 10,
            "description": "Version of the 3DS protocol used (e.g., 2.2.0). Returned only for PCI-compliant clients."
          },
          "threeDSServerTransId": {
            "type": "string",
            "maxLength": 36,
            "description": "Transaction ID assigned by the 3DS Server. Returned only for PCI-compliant clients.",
            "example": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e"
          }
        }
      },
      "PspResponseDetails": {
        "type": "object",
        "description": "Response details from the Payment Service Provider (PSP/Acquirer).",
        "properties": {
          "responseMessageID": {
            "type": "string",
            "description": "Unique message identifier from the PSP response."
          },
          "responseToRequestMessageID": {
            "type": "string",
            "description": "Reflects the requestMessageID that this PSP response replies to."
          },
          "pspPaymentId": {
            "type": "string",
            "description": "Payment identifier assigned by the PSP."
          },
          "responseCode": {
            "type": "string",
            "maxLength": 20,
            "description": "PSP response code."
          },
          "responseDescription": {
            "type": "string",
            "maxLength": 200,
            "description": "PSP response description."
          },
          "responseDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "Date/time when the PSP responded."
          },
          "responseTime": {
            "type": "integer",
            "format": "int64",
            "description": "PSP response time in milliseconds."
          },
          "approvalCode": {
            "type": "string",
            "maxLength": 20,
            "description": "Authorization approval code from the acquirer."
          },
          "pspReferenceNo": {
            "type": "string",
            "maxLength": 100,
            "description": "Reference number assigned by the PSP."
          },
          "pspInvoiceNo": {
            "type": "string",
            "description": "Invoice number from the PSP."
          },
          "response63": {
            "type": "string",
            "description": "ISO 8583 Field 63 response data from the PSP (additional private data)."
          },
          "paymentScheme": {
            "type": "string",
            "description": "Payment scheme used for processing (e.g., VISA, MASTERCARD)."
          },
          "pacoIssuerCode": {
            "type": "string",
            "description": "PACO internal issuer code resolved from the card BIN."
          },
          "pspAccountNumber": {
            "type": "string",
            "description": "Account number returned by the PSP (if applicable)."
          },
          "pspCardNumber": {
            "type": "string",
            "description": "Card number returned by the PSP (may differ from request due to network tokenization)."
          },
          "acquirerName": {
            "type": "string",
            "description": "Name of the acquiring bank that processed the transaction."
          },
          "acquirerBackendMerchantId": {
            "type": "string",
            "description": "Merchant ID at the acquirer backend used for this transaction."
          }
        }
      },
      "AResACSChallenge": {
        "type": "object",
        "description": "3DS ARes/ACS Challenge data returned when cardholder authentication challenge is required.",
        "required": [
          "transStatus",
          "acsURL"
        ],
        "properties": {
          "transStatus": {
            "type": "string",
            "description": "Transaction status from 3DS authentication. 'C' indicates challenge required.",
            "example": "C"
          },
          "acsURL": {
            "type": "string",
            "format": "uri",
            "description": "Fully qualified URL of the ACS to be used for the challenge flow."
          },
          "cReq": {
            "type": "string",
            "deprecated": true,
            "description": "DEPRECATED - Alias of challengeHtml. The Base64url-encoded CReq message for backward compatibility."
          },
          "rawCreq": {
            "type": "string",
            "description": "Raw 3DS CReq JSON message in Base64 encoded format. Used by clients that construct their own challenge form."
          },
          "challengeHtml": {
            "type": "string",
            "description": "Pre-built challenge HTML page content (Base64 encoded). Render this directly to initiate the challenge UI."
          },
          "threeDSSessionData": {
            "type": "string",
            "description": "3DS session data in Base64url format. Must be included when submitting the challenge result back."
          }
        }
      },
      "TokenizeDetailsResponse": {
        "type": "object",
        "description": "Tokenization result returned after successful card tokenization (nonUI complete response).",
        "properties": {
          "tokenizeFlag": {
            "type": "string",
            "description": "The tokenization flag that was applied to this transaction."
          },
          "tokenRef": {
            "type": "string",
            "description": "Unique token reference for the stored card. Use this for subsequent payments."
          },
          "profileRef": {
            "type": "string",
            "description": "Profile reference under which this token is grouped."
          },
          "maskedIdentifier": {
            "type": "string",
            "description": "Masked card number (PAN) associated with this token."
          },
          "tokenExpiry": {
            "type": "string",
            "format": "date-time",
            "description": "Expiry date/time of the token (based on card expiry with grace period)."
          }
        }
      },
      "IncompleteTokenizeDetailsResponse": {
        "type": "object",
        "description": "Tokenization details returned in incomplete/prepayment response for Payment Page rendering.",
        "properties": {
          "tokenizeFlag": {
            "type": "string",
            "description": "The tokenization flag from the original request."
          },
          "profileRef": {
            "type": "string",
            "description": "Profile reference for token grouping."
          },
          "maskedIdentifier": {
            "type": "string",
            "description": "Masked card identifier for display purposes."
          },
          "tokenExpiry": {
            "type": "string",
            "format": "date-time",
            "description": "Token expiry date/time."
          },
          "tokenRefList": {
            "type": "array",
            "description": "List of available token references that the Payment Page can offer to the cardholder.",
            "items": {
              "type": "object",
              "properties": {
                "tokenRef": {
                  "type": "string",
                  "description": "Token reference string for an existing stored card."
                }
              }
            }
          }
        }
      },
      "InstallmentPaymentResults": {
        "type": "object",
        "properties": {
          "installmentPlanGroup": {
            "type": "string"
          },
          "installmentPlan": {
            "type": "string"
          },
          "installmentPeriod": {
            "type": "integer",
            "format": "int32"
          },
          "installmentInterestRate": {
            "type": "number",
            "format": "decimal"
          },
          "monthlyAmount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "firstAmount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "lastAmount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "tier1FromMonth": {
            "type": "integer"
          },
          "tier1ToMonth": {
            "type": "integer"
          },
          "tier1Amount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "tier1Interest": {
            "type": "number",
            "format": "decimal"
          },
          "tier2FromMonth": {
            "type": "integer"
          },
          "tier2ToMonth": {
            "type": "integer"
          },
          "tier2Amount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "tier2Interest": {
            "type": "number",
            "format": "decimal"
          },
          "tier3FromMonth": {
            "type": "integer"
          },
          "tier3ToMonth": {
            "type": "integer"
          },
          "tier3Amount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "tier3Interest": {
            "type": "number",
            "format": "decimal"
          },
          "interestFreeMonthNumber": {
            "type": "integer"
          },
          "interestFreeMonthFrom": {
            "type": "integer"
          },
          "interestFreeMonthTo": {
            "type": "integer"
          },
          "handlingFee": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "totalIPPAmount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "totalIPPAmountWithInterest": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "totalInterestAmount": {
            "$ref": "#/components/schemas/AmountCompound"
          },
          "ippReferenceNo": {
            "type": "string"
          }
        }
      }
    }
  }
}
```