secure

Process payment with credit cards (authentication and authorization) as well as other payment methods (e.g., direct debit and APM) through the 2C2P Payment Page. Returns a JOSE response message.

post/prePaymentUI

Request

  • Base URL
    https://core.demo-paco.2c2p.com/api/2.0/Payment
  • URL
    https://core.demo-paco.2c2p.com/api/2.0/Payment/prePaymentUI
  • Auth
    API key in header apiKey

Request body application/jose

officeIdstring paco-CODE required

Office ID

orderNostring required

Order No.

productDescriptionstring required

Product Description

paymentCategory'ECOM' | 'VEDC' | 'QUICKPAY' | 'RPP' paco-CODE

Code of Payment Category:

  • ECOM = E-commerce
  • VEDC = Virtual EDC
  • QUICKPAY = QuickPay
  • RPP = Recurring Payment
paymentType'CC' | 'IPP' | 'CC-VI' | 'CC-CA' | 'CC-AX' | 'CC-UP' | 'CC-JC' | 'QR' | 'DEEPLINK' | 'WALLET' | 'OTC' | 'SSM' | 'WEBPAY' | 'IMBANK' paco-CODE

Code of Payment Type:

  • CC = Credit Card
  • IPP = Installment
  • CC-VI = Credit Card (Visa)
  • CC-CA = Credit Card (MasterCard)
  • CC-AX = Credit Card (American Express)
  • CC-UP = Credit Card (UnionPay International)
  • CC-JC = Credit Card (JCB)
  • QR = QR Payment
  • DEEPLINK = Deeplink
  • WALLET = Wallet
  • OTC = Over the Counter
  • SSM = Self Service Machines
  • WEBPAY = Web Payment
  • IMBANK = Internet Mobile Banking
paymentExpiryDateTimestring date-time
linkExpiryDateTimestring date-time
channelCodestring

Code of Payment Channel. Only required for Alternative Payment Method (APM).

agentCodestring

Code of Payment Agent. Only required for Alternative Payment Method (APM).

preferredPaymentTypesPaymentType[]

Hint to Payment Page to show only preferred payment types to customer. The first payment type in this list will be the default one.

  • preferredPaymentTypes will be processed only if paymentType is not available.
request3dsFlagstring paco-3DS_Type

Whether to perform 3DS authentication. N=No 3DS authentication. Y=Perform 3DS authentication in relax mode. Accept successful authentication by both card holder and merchant. Y-Strict=Perform 3DS authentication in strict mode. Accept successful authentication by card holder only. Default value is N.

autoRedirectDelayTimernumber

Number of seconds to show system payment result page before continue with redirection to notificationURLs (confirmationURL or failedURL). Default is 10 seconds. When set to 0 second, it will effectively has no delay in which the system payment result page will entirely skipped.

statementDescriptorstring

Dynamic statement description displayed on the customer’s account.

  • Restrictions: cannot contain the following special characters: < > ' " *
  • Note: Feature availability is subject to the acquiring bank
transactionInitiatorstring

Identifies who initiated the transaction:

  • C = Customer (default)
  • M = Merchant
previousPaymentIDstring

Required when transactionInitiator is set to 'M'.

userDefined1string

For merchants to submit their specific data (No. 1).

userDefined2string

For merchants to submit their specific data (No. 2).

userDefined3string

For merchants to submit their specific data (No. 3).

userDefined4string

For merchants to submit their specific data (No. 4).

userDefined5string

For merchants to submit their specific data (No. 5).

userDefined6string

For merchants to submit their specific data (No. 6).

userDefined7string

For merchants to submit their specific data (No. 7).

userDefined8string

For merchants to submit their specific data (No. 8).

userDefined9string

For merchants to submit their specific data (No. 9).

userDefined10string

For merchants to submit their specific data (No. 10).

Example request

{
  "apiRequest": {
    "requestMessageID": "e952828c-6d19-4a08-92e4-1bc47e1945a2",
    "requestDateTime": "2023-08-29T09:12:34.001Z",
    "language": "en-US"
  },
  "orderNo": "ORD001",
  "productDescription": "Product01",
  "paymentCategory": "ECOM",
  "paymentType": "CC-VI",
  "paymentExpiryDateTime": "2025-08-28T23:59:59.999Z",
  "linkExpiryDateTime": "2025-08-28T23:59:59.999Z",
  "preferredPaymentTypes": [
    "CC",
    "IPP"
  ],
  "currencyConversionDetails": {
    "conversionType": "DCC"
  },
  "installmentPaymentDetails": {
    "ippFlag": "Y",
    "installmentPeriod": 6
  },
  "recurringPaymentDetails": {
    "rppFlag": "Y",
    "orderNoPrefix": "M-Ref 61000",
    "recurringIntervalNumber": 1,
    "recurringInterval": "Monthly",
    "recurringTimes": 5,
    "recurringAutoAccumulate": "Y"
  },
  "transactionAmount": {
    "amountText": "000000999950",
    "currencyCode": "THB",
    "decimalPlaces": 2,
    "amount": 9999.5
  },
  "notificationURLs": {
    "confirmationURL": "http://.../ConfirmationURL.aspx",
    "failedURL": "http://.../ErrorURL.aspx",
    "cancellationURL": "http://.../CancellationURL.aspx"
  },
  "generalPayerDetails": {
    "seqNo": 1,
    "personName": {
      "fullName": "Mr. John Doe",
      "title": "Mr.",
      "firstName": "John",
      "lastName": "Doe"
    },
    "email": "John@2c2p.com",
    "mobilePhoneCountryCode": "+66",
    "mobilePhone": "+66861234567",
    "businessPhoneCountryCode": "+66",
    "businessPhone": "+6621167000",
    "emailForFxReceipt": "John@2c2p.com"
  },
  "purchaseItemize": [
    {
      "purchaseItemDescription": "Ticket Number",
      "purchaseItemPrice": {
        "amountText": "000000999950",
        "currencyCode": "THB",
        "decimalPlaces": 2,
        "amount": 9999.5
      }
    }
  ],
  "billingAddress": {
    "billAddrCity": "Bangkok",
    "billAddrCountry": "764",
    "billAddrLine1": "Bill Address Line 1",
    "billAddrLine2": "Bill Address Line 2",
    "billAddrLine3": "Bill Address Line 3",
    "billAddrPostCode": "10230",
    "billAddrState": "40"
  },
  "airlineData": {
    "bookingReference": {
      "pnrCode": "DEF456",
      "bookingDateTime": "2025-02-17T16:21:23.000Z",
      "status": "HK"
    },
    "agency": {
      "name": "TravelPro",
      "code": "TP1234",
      "id": "X22131002312",
      "invoiceNo": "INV20250224001",
      "planName": "PremiumPlan"
    },
    "flightSegments": [
      {
        "sequenceNo": 1,
        "marketingAirlineCode": "AB",
        "marketingFlightNo": "1234",
        "operatingAirlineCode": "CD",
        "operatingflightNo": "5678",
        "flightType": "International",
        "departure": {
          "airportCode": "DMK",
          "cityCode": "BKK",
          "cityName": "Bangkok",
          "countryCode": "764",
          "countryName": "Thailand"
        },
        "arrival": {
          "airportCode": "DMK",
          "cityCode": "BKK",
          "cityName": "Bangkok",
          "countryCode": "764",
          "countryName": "Thailand"
        },
        "fareClass": "Y",
        "fareBasisCode": "B2NR",
        "endorsementOrRestriction": "NOT REFUNDABLE",
        "isReturnFlight": true
      }
    ],
    "tickets": [
      {
        "ticketNo": "1254567890123",
        "ticketIssueDate": "2025-02-17T00:00:00.000Z",
        "purchaseType": "CORPORATE",
        "securityProgramTravelCode": "NEXUS",
        "taxAmount": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "ticketFare": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "ticketFareTax": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "airportTax": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "agentFee": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "agentFeeVat": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "baseRefundVat": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        },
        "agentFeeBaseRefundVat": {
          "amountText": "000000999950",
          "currencyCode": "THB",
          "decimalPlaces": 2,
          "amount": 9999.5
        }
      }
    ],
    "passengers": [
      {
        "sequenceNo": 1,
        "identificationNo": "AA23456789",
        "documentType": "passport",
        "isPurchaser": true,
        "title": "MR, MS",
        "firstName": "John",
        "middleName": "Michael",
        "lastName": "Doe",
        "gender": "F",
        "email": "john.doe@example.com",
        "mobileNo": "1234567890",
        "type": "ADT",
        "isFrequentFlyer": true,
        "frequentFlyerStatus": "PLATINUM, GOLD, SILVER",
        "frequentFlyerNumber": "ABC1111111111111"
      }
    ]
  }
}

Response

Result of payment transaction

Changes

No recorded changes to this operation across all 1 revision of this API.