Paydollar PayGate Integration Guide ## Sections • [Introduction](https://developer.asiapay.com/integration-guide/introduction.md): Welcome to our Payment Gateway System Our powerful web-based online payment services platform, a trusted solution utilized by numerous renowned companies and organizations in the region. Our system offers a secure, multi-channel, multi-lingual, and multi-currency payment experience. Integration Methods: Choose the integration method that best suits your needs: Title Description Web Integration Mobile Integration Client Post through Browser (e.g. Shopping Cart) This method is favoured by merchants for its simplicity and speed. It enables swift website integration, ensuring a seamless user experience with a streamlined transaction flow. PaySDK Android Mobile SDK This section explains the integration of PaySDK Android SDK in merchant android mobile application. Direct Client Side Connection Tailored for Online Shopping Carts, this method uses HTML and JavaScript for broad compatibility, ensuring a seamless experience PaySDK IOS Mobile SDK This section explains integration of PaySDK iOS SDK in merchant iOS mobile application. Server Side Direct Connection (e.g. IVR System, Mobile App) Merchants request payment authorization via our gateway, pending bank approval. They integrate their IVR or app, and create a custom payment page eWallet Direct Connection Merchants can seek direct payment authorization from the bank via our gateway, pending acquiring bank approval. They'll set up a custom payment page to collect information like credit card details, which will be sent to a specific URL provided by the acquiring bank. Customers won't encounter a bank payment page in this process. Purpose of this Document: This technical specification document prescribes the constituent parts of specification for integration of an e-commerce web site with PayDollar/SiamPay/PesoPay e-commerce service, the on-line payment service by AsiaPay (HK) Limited, by subscribed merchants of the service. This document has been created to ensure that all technical specifications contain sufficient information to enable a merchant to design and modify the codes of an existing on-line shopping architecture or software to cater for the payment –enabling service. It also provides a checklist to enable the reviewers of specifications to conduct tests on the functionalities of the integration. Enhanced Security with 3DS 2.0: There is an extra parameter section under each connection method. That section is especially designed for 3DS 2.0 (Three Domain Secure 2.0). 3DS authentication is an additional security layer for card-not-present transactions. With 3DS 2.0, it is aimed to achieve a better, stronger fraud-detection intelligence. Merchant API Functions: In a later section, we'll provide an in-depth description of the various API functions available to subscribed merchants, ensuring a seamless integration process. Thank you for choosing our payment gateway system. Let's get started. • [Web Integration](https://developer.asiapay.com/integration-guide/web-integration.md): Following are the three methods of Web Integration Title Client Post through Browser (e.g. Shopping Cart) Direct Client Side Connection Server Side Direct Connection (e.g. IVR System, Mobile App) • [Client Post Through Browser](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser.md): Introduction This method stands as the preferred choice among merchants for its simplicity and speed. It offers a swift integration process, allowing merchants to launch their website seamlessly. The transaction flow is ready-made, streamlining the payment process for an optimal user experience. This method is characterized by its: Simplicity : With an intuitive integration process, merchants can swiftly incorporate our payment gateway into their website. Speed : The connection is established quickly, ensuring a seamless checkout experience for customers. Ready-to-Use Flow : The payment transaction flow is pre-configured, saving merchants time and effort. Additionally, this method supports small-scale integrations, enabling merchants to set up their website promptly. Scope and Compatibility (Requirement) Software Code Compatibility HTML Version: 4.0 JavaScript Version: 1.3 Browser Compatibility This method is compatible with modern browser versions: Microsoft Internet Explorer: Version 11 or above Mozilla Firefox: Version 27 or above Google Chrome: Version 30 or above Safari: Version 7 or above This ensures a consistent experience across popular browsers, enabling a smooth payment process for all users. • [Sample Code](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/sample-code.md): Kick Off After the integration has been completed, it is ready to launch your e-commerce web to serve your customers. Please copy the following TESTING URL for client post method: Title Description Payment Gateway Testing URL PayDollar https://test.paydollar.com/b2cDemo/eng/payment/payForm.jsp SiamPay https://test.siampay.com/b2cDemo/eng/payment/payForm.jsp PesoPay https://test.pesopay.com/b2cDemo/eng/payment/payForm.jsp Base URL Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/payment SiamPay https://test.siampay.com/b2cDemo/eng/payment PesoPay https://test.pesopay.com/b2cDemo/eng/payment The following is an example of integration of shopping cart routine with the payment routine of our payment gateway in HTML. It is noteworthy that the portion in bold typeface as follows is mandatory for successful integration. In the following sample form, hidden fields are used to hold the values. Please change the action URL to integrate with your preferred gateway Plain text • [Integration Parameters](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters.md): The following are the parameters for integration. Our payment gateway system is case sensitive. Make sure the typeface is correct. When a transaction is finished, the system will return customer a payment message. Merchant can create static HTML pages to display the message. If merchant’s web site supports datafeed, the system can return payment message as shown in the following table. • [Required Parameters](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/required-parameters.md): Required Parameter ( with UTF-8 Encoding ) for connect to our payment page Title Description Title Parameters Data Type Descriptions orderRef Text (35) Merchant‘s Order Reference Number currCode Text (3) The currency of the payment: “344” – HKD “840” – USD “702” – SGD “156” – CNY (RMB) “392” – JPY “901” – TWD “036” – AUD “978” – EUR “826” – GBP “124” – CAD “446” – MOP “608” – PHP “764” – THB “458” – MYR “360” – IDR “410” – KRW “682” – SAR “554” – NZD “784” – AED “096” – BND “704” – VND “356” – INR Remark: mpsMode = SCP, the currCode value should be in foreign currency. mpsMode = MCP, the currCode value should be in base currency. amount Number (12,2) The total amount you want to charge the customer for the provided currency. Remark: mpsMode = SCP, the amount should be calculated in foreign currency. mpsMode = MCP, the amount should be calculated in base currency. lang Text (1) The language of the payment page “E” – English “C” – Traditional Chinese “X” – Simplified Chinese “J” – Japanese “T” – Thai “F” – French “G” – German “R” – Russian “S” – Spanish “V” – Vietnamese cancelUrl Text (300) A Web page address you want us to redirect upon the transaction being cancelled by your customer (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) failUrl Text (300) A Web page address you want us to redirect upon the transaction being rejected by us. (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) successUrl Text (300) A Web page address you want us to redirect upon the transaction being accepted by us (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) merchantId Number The merchant ID we provide to you payType Text(1) (“N”, ”H”) The payment type: ”N” – Normal Payment (Sales) ”H” – Hold Payment (Authorize only) For merchants who use authorize mode, please be reminded to perform the CAPTURE action as soon as the transaction is confirmed as valid. Once captured, the customer’s credit card will be debited in coming bank settlement processing. If the merchant does not capture/reverse the authorized transaction over 14 days, the credit limit will be released to the cardholder after a time period which is subjected to card issuing bank Merchant may capture/reverse the authorized transaction in the merchant administration site > Operation > Transaction Detail. Remark: Hold Payment is not available for 99BILL, ALIPAY, CHIANPAY, PAYPAL, PPS, TENPAY, WECHAT, MEPS,OCTOPUS departureDate Text(10) Format: yyyy-MM-dd Remark: This parameter is only required for SLICEPAY payMethod Text The payment method: "All" – All the available payment method "ALIPAY" – Alipay By PayDollar Payment "ALIPAYHKONL" – Alipay HK By PayDollar Payment "ALIPAYPLUS" – Alipay+ "AMEX" – AMEX Payment "ATOME" – Atome Payment "AU" – au PAY "BANKTRANSFERJPN" – BANK TRANSFER JPN "BillDesk" – India BillDesk Payment "BPI" – BPI Netbanking Payment "BPM" – Bill Payment BY PayDollar Payment "BoCPay" – BoCPay Wallet or BoCPay UnionPay QR Payment "Brankas" – Brankas Net Banking Payment (Philippines) "CC" – Credit Card Payment "CHINAPAY" – China UnionPay By PayDollar Payment "CIMBCLICK" – CIMBCLICK BY PayDollar Payment "CLICKTOPAY" – Click to Pay "DANA" – DANA Payment "Diners" – Diners Club Payment "DuitNow" – DuitNow Payment "ENETS" – eNETS Payment "ENETSBANKING" – eNETS Net Banking Payment "ENETSQR" – eNETS QR Payment "Eximbay" – Eximbay Payment (Korea) "FPX" – FPX Net Banking Payment (Malaysia) "FPS" – FPS Payment "GCash" – GCash Payment "GRABPAY" – GrabPay Wallet Payment “HANDSIN” - Split Payment "HOOLAH" – hoolah Payment "humm" – humm Payment "IBANKING" – Bangkok Bank iBanking BY PayDollar Payment "IOUPay" – IOU Pay Digital Banking Payment "JCB" – JCB Payment "JKOPAY" – JKOPAY Wallet Payment "KONBINI" – Konbini payment "KREDIVO" – Kredivo Payment "KRUNGSRIONLINE" – Bank of Ayudhya (KRUNGSRIONLINE) BY PayDollar Payment "KTB" – Krung Thai Bank (KTB Online) BY PayDollar Payment "LINEPAY" – LINE Pay Payment "M2U" – M2U BY PayDollar Payment "Master" – MasterCard Payment "MERPAY" – MerPay Payment "MEPS" – MEPS BY PayDollar Payment "Momopay" – MoMo eWallet Payment "MP" – MasterPass Payment "NAPAS" – napas Digital Payment "NICEPAY" – NicePay Payment "NTTDOCOMO" – NTT Docomo "OCTOPUS" – OCTOPUS BY PayDollar Payment "OnePay" – ONEPAY BY PayDollar Payment "OVO" – OVO Payment "PACE" – Pace Payment "PAIDY" – PAIDY "PAYEASY" – Pay-easy Payment "PAYID" – PayID Payment "PayMe" – PayMe Payment "PayMaya" – PayMaya Payment "PAYPAL" – PayPal By PayDollar Payment "PAYPAY" – PayPay Payment "PAYU" – PayU Payment "PAYSBUY" – Paysbuy Payment (if applicable) "POLI" – POLi Payments "PPS" – PayDollar PPS Payment "QRIS" – QR Code Indonesian Standard Payment "SCB" – SCB (SCB Easy) BY PayDollar Payment "SGQR" – SGQR Payment "SHOPEEPAY" – ShopeePay Wallet Payment "SLICEPAY" – SLICEPAY Payment "SOFTBANK" – Softbank "TendoPay" – TendoPay Payment "TENPAY" – TENPAY BY PayDollar Payment "TMB" – TMB Bank BY PayDollar Payment "TOSS" – Toss Payment (Korea) "TouchnGo" – Touch n’ Go Payment "TRUEMONEY" – TrueMoney Wallet Payment "UOB" – United Oversea Bank BY PayDollar Payment "UPOP" – UPOP BY PayDollar Payment "VCO" – VISA Checkout Payment "VISA" – Visa Payment "WECHAT" – WeChat Pay BY PayDollar Payment (deprecated) "WECHATONL" – WeChat Pay BY PayDollar Payment "WELEND" – WELEND BY PayDollar Payment "ZIPPAY" – ZipPay Payment "99BILL" – 99BILL BY PayDollar Payment Device Wallet Payment: "APPLEPAY" – Apple Pay Payment "GOOGLE" – Google Pay™ Payment “SAMSUNG” – Samsung Pay Payment • [Installment](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/installment.md): Optional Parameter for Installment Title Description Title Parameters Data Type Descriptions installment_service Text (1) (“T”,”F”) Installment service indicator installment_period Text (20) In number of months *Not provide will Enable installment selection during the payment *Multiple period with separator “|” only for payment method “WELEND“ installOnly Text (1) (“T”,”F”) Control the mandatory of Installment payment • [Airline Data](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/airline-data.md): Optional Parameter for Airline Data Title Description Title Parameters Data Type Descriptions airline_service Text (1) (“T”,”F”) Airline service indicator airline_ticketNumber Text (13) Air ticket number • [Multi Currency Pricing (MCP)](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/multi-currency-pricing-mcp.md): Optional Parameter for Multi Currency Pricing (MCP) Title Description Title Parameters Data Type Descriptions mpsMode Text(3) The Multi-Currency Processing Service (MPS) Mode: “NIL” or not provide – Disable MPS (merchant not using MPS) “SCP” – Enable MPS with ‘Simple Currency Conversion’ “DCC” – Enable MPS with ‘Dynamic Currency Conversion’ “MCP” – Enable MPS with ‘Multi Currency Pricing’ For merchant who applied MPS function multiRateID Text (12) Unique Rate ID *Returned from API function “MCPMultiRateEnquiry” mpsExRate Number (10,4) Exchange rate between the merchant’s base currency and the foreign currency. *Returned from API function “MCPMultiRateEnquiry” foreignCurrCode Text (3) Foreign currency code foreignAmount Number (12,2) Calculated foreign amount *The foreign amount should be converted from a base amount with minimum value HKD10 / MOP10 to avoid tolerance check failure. • [Promotion](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/promotion.md): Optional Parameter for Promotion Title Description Title Parameters Data Type Descriptions promotion Text(1); (“T” or “F”) Enable / Disable the promotion promotionCode Text(8); The promotion campaign code promotionRuleCode Text(8); The promotion rule code promotionOriginalAmt Number (12,2) The promotion original amount • [Connect to Payment Page](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/connect-to-payment-page.md): Optional Parameter for connect to our payment page Title Description Title Parameters Data Type Descriptions remark Text (50) A remark field for you to store additional data that will not show on the transaction web page deviceMode Text Control the display mode for the payment page auto – PayDollar determine the display mode automatics by using the browser environment (Default) pc – Force to use pc layout mobile – Force to use mobile layout and payment flow redirect Number Number of seconds auto-redirection to merchant’s site takes place at PayDollar’s Payment Success / Fail page 0 – Skip PayDollar/SiamPay/PesoPay Payment result page and auto-redirect to merchant result page -1 – Disable auto-redirection for PayDollar’s Payment result page -2 – Only skip PayDollar/SiamPay/PesoPay Payment result page and auto-redirect to merchant result page for successful transaction Others positive number – Number of seconds for the auto-redirection oriCountry Number(3) Origin Country Code Example: 344 – “HK” 840 – “US” destCountry Number(3) Destination Country Code Example: 344 – “HK” 840 – “US” secureHash Text (40) Secure hash is used to authenticate the integrity of the transaction information and the identity of the merchant. It is calculated by hashing the combination of various transaction parameters and the Secure Hash Secret. *Applies to merchants who registered this function only. For more information, please refer to section 4. print Text(2) ; (“no”) Disable the print function at payment result page. failRetry Text(2) ; (“no”) Disable the retry function when the transaction is rejected timeoutValue Number Timeout Value in second, only for OCTOPUS payment and ranged 180 and 7200 hiddenAmount Text (1) (“T”,”F”) Flag to control the display of amount. “T” for showing amount and “F” for not showing display of amount. *Enable to approved merchant only. expDateCheck Number Value to control the expiry date checking. Eg. If “1” is submitted, the card expiry date must not be expired in one month. Only integer is allowed and minimum value is “1” and maximum value is “192”. *Enable to approved merchant only. payMode Text(2) Payment Mode “EC” - Electronic Commerce (Default) “MO” - Mail Order “RC” - Recurring orderPhoneNo Text(30) Phone Number of order appUrlScheme Text iOS Universal Link or Android App Link URL for Web-2-App flow return to the merchant App from the payment App Available for the following payment method: “ALIPAYHKONL” – iOS, Android (Mobile H5 flow) “BoCPay” – iOS, Android (Mobile H5 flow) “GrabPay” – iOS, Android (Mobile H5 flow) “JKOPay” – iOS, Android (Mobile H5 flow) “LINEPAY” – iOS, Android (Mobile H5 flow) “OCTOPUS” – iOS (Mobile flow) “PayMe” – iOS, Android (Mobile H5 flow) “WECHATONL” – iOS, Android (Mobile H5 flow) deeplink Text(1) Flag for the Web-2-App flow “0”: (Default) Redirect to Payment Service Host directly “1”: Call Payment Service token with Mobile H5 directly “2”: Display summary page with button of Mobile H5 “3”: Display summary page with button of Mobile H5 and Redirect Login Available for “ALIPAYHKONL” oaflag Text (1) (“T”,”F”) To enable to use JSAPI (Payment Service In-App Webview Payment) Available for “WECHATONL” orderItems Text Order Detail Information Format: Item 1 ID ^ Item 1 Description ^ Item 1 Quantity ^ Sub Total 1 | Item N ID ^ Item N Description ^ Item N Quantity ^ Sub Total N … ( “^” used for separate item information, “|” used for separate different order items) Example: ITEM_01^Mobile Phone^1^6999|ITEM_02^USB Charger^2^350|CHARGE_01^Service Charge^^150 • [Shipping Address](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/shipping-address.md): Optional Parameter for Shipping address (required to be eligible for PayPal Seller Protection) Title Description Title Parameters Data Type Descriptions shippingAddress1 Text (240) The first line of the shipping address. Must contain the full address shippingAddress2 Text (240) The second line of the shipping address. eg.suite or apartment number shippingCity Text (100) The city of the shipping address shippingState Text (100) The state of the shipping address shippingPostalCode Text (50) The postal code of shipping address which is the zip code or equivalent shippingCountryCode Text (2) The country code that identified the country or region • [Customer details](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/customer-details.md): Optional Parameter for customer details (required to be eligible for PayPal Seller Protection) Title Description Title Parameters Data Type Descriptions customer_firstName Text (50) Customer’s first name customer_lastName Text (50) Customer’s last name customer_email Text (100) Customer’s email address customer_account_id Text (100) Unique identifier of the customer customer_phone Text (100) Customer’s phone number customer_country_code Text (2) Customer’s country code that identified the country or region eg.US customer_create_date Text (14) Date after which no further payment shall be performed. Format: yyyyMMDDHHmmss e.g. “20200401122630” • [Schedule Payment](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/schedule-payment.md): Title Description Title Parameters Data Type Descriptions appId Text Application Id - “SP” schType Text Schedule Type e.g. Day / Month /Year schStatus Text Schedule Status e.g. Active / Suspended nSch Number Number of schedule sMonth Number Schedule start month sDay Number Schedule start day sYear Number Schedule start year eMonth Number Schedule end month eDay Number Schedule end day eYear Number Schedule end year • [Protect Pay](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/integration-parameters/optional-parameters/protect-pay.md): Title Description Title Parameters Data Type Descriptions customer_firstName Text First name of the customer. customer_lastName Text Last name (surname) of the customer. protect_enable Text (1) (“T”,”F”,"0") Indicates if refund protection is applied. numberOfTickets Text Number of tickets purchased in the transaction. eventTravelDateTime Text (dd/mm/yyyy) Date of the event for which the tickets are being purchased. ticketType Text Type of ticket (e.g., Standard, VIP, test). salesTax Text Applicable sales tax amount. • [3DS 2.0](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0.md): The following are the parameters especially for 3DS 2.0. Merchant shall fulfill the parameters requirement to start using 3DS 2.0. The parameters are case sensitive and should be in UTF-8 encoding. • [Basic Parameters](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/basic-parameters.md): Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSTransType Text (2) No Transaction type. Select the most suitable one. “01” – Goods/ Service Purchase *Default value if threeDSTransType not provided. “03” – Check Acceptance “10” – Account Funding “11” – Quasi-Cash Transaction “28” – Prepaid Activation and Load threeDSCustomerEmail Text (254) Yes The customer’s email address *Strongly suggest to provide if available. Shall meet requirements of Section 3.4 of IETF RFC 5322 threeDSMobilePhoneCountryCode Text (3) Yes Customer’s mobile phone number country code. Provide if available. If “threeDSMobilePhoneCountryCode” is provided, “threeDSMobilePhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSMobilePhoneNumber Text (15) Yes Customer’s mobile phone number. Provide if available. If “threeDSMobilePhoneNumber” is provided, “threeDSMobilePhoneCountryCode” should also be provided. threeDSHomePhoneCountryCode Text (3) No Customer’s home phone number country code. Provide if available. If “threeDSHomePhoneCountryCode” is provided, “threeDSHomePhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSHomePhoneNumber Text (15) No Customer’s home phone number. Provide if available. If “threeDSHomePhoneNumber” is provided, “threeDSHomePhoneCountryCode” should also be provided. threeDSWorkPhoneCountryCode Text (3) No Customer’s work phone number country code. Provide if available. If “threeDSWorkPhoneCountryCode” is provided, “threeDSWorkPhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSWorkPhoneNumber Text (15) No Customer’s work phone number. Provide if available. If “threeDSWorkPhoneNumber” is provided, “threeDSWorkPhoneCountryCode” should also be provided. threeDSIsFirstTimeItemOrder Text (1) No Flag to show if the customer is re-ordering the item / product. i.e. purchasing the same item / product Provide only if the payment related to purchase item / product. “T” – It is the first time the customer purchases this item / product. “F” – It is the NOT the first time the customer purchases the item / product, it is re-ordering. threeDSChallengePreference Text(2) No Indicates whether a challenge is requested for this transaction. “01” – No preference *Default value if threeDSChallengePreference not provided. “02” – No challenge requested * “03” – Challenge requested (Merchant preference) “04” – Challenge requested (Mandate) “05” – No challenge requested (transactional risk analysis is already performed) * “06” – No challenge requested (Data share only)* “07” – No challenge requested (strong consumer authentication is already performed) * “08” – No challenge requested (utilise whitelist exemption if no challenge required) * “09” – Challenge requested (whitelist prompt requested if challenge required) ** If “No challenge requested” options are selected, the chargeback liability shift to merchant. • [Recurring / Installment](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/recurring-installment.md): Provide only if it is a recurring / installment payment Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSRecurringFrequency Text (4) Yes (Only for recurring / installment payment) Minimum number of days between payment. e.g. “30” – 30 days between payments. threeDSRecurringExpiry Text (8) Yes (Only for recurring / installment payment) Date after which no further payment shall be performed. Format: YYYYMMDD e.g. “20190401” • [Billing Address](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/billing-address.md): Provide only if billing address is available Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSBillingCountryCode Text (3) No Payment cardholder billing country. Shall be the ISO 3166-1 numeric three-digit country code. e.g. “344” – Hong Kong, “840” – US Note: Required if "threeDSBillingState" is present threeDSBillingState Text (3) No Payment cardholder billing state Should be the country subdivision code defined in ISO 3166-2. Provide if available, as some countries do not have subdivision code. e.g. “PE” – Prince Edward Island of California threeDSBillingCity Text (50) No Payment cardholder billing city e.g. “Hong Kong” threeDSBillingLine1 Text (50) No Payment cardholder billing address line 1 threeDSBillingLine2 Text (50) No Payment cardholder billing address line 2 Provide if available threeDSBillingLine3 Text (50) No Payment cardholder billing address line 3 Provide if available threeDSBillingPostalCode Text (16) No Payment cardholder billing postal code Provide if available • [Shipping / Delivery](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/shipping-delivery.md): Provide only if the payment requires shipping / delivery Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSDeliveryTime Text (2) Yes The delivering time for this purchase. “01” – Electronic Delivery “02” – Same day shipping “03” – Overnight shipping “04” – Two-day or more shipping threeDSDeliveryEmail Text (254) No The email recipient of the purchased product. Provide only if the purchased product is using electronic delivery. threeDSShippingDetails Text (2) No Shipping details / type. Select the most suitable one. “01” – Ship to cardholder’s billing address “02” – Ship to another verified address stored in merchant “03” – Ship to address that is different than the cardholder’s billing address “04” – Ship to Store / Pick-up at local store (Store address shall be populated in shipping address fields) “05” – Digital goods (includes online services, electronic gift cards and redemption codes) “06” – Travel and Event tickets, not shipped “07” – Other (for example, Gaming, digital services not shipped, e-media subscriptions, etc.) threeDSShippingCountryCode Text (3) No Shipping / delivery country. Shall be the ISO 3166-1 numeric three-digit country code. e.g. “344” – Hong Kong, “840” – US Note: Required if "threeDSShippingState" is present threeDSShippingState Text (3) No Shipping / delivery state Should be the country subdivision code defined in ISO 3166-2 e.g. “PE” – Prince Edward Island of California threeDSShippingCity Text (50) No Shipping / delivery city. e.g. “Hong Kong” threeDSShippingLine1 Text (50) No Shipping / delivery address line 1 threeDSShippingLine2 Text (50) No Shipping / delivery address line 2 Provide (if available). threeDSShippingLine3 Text (50) No Shipping / delivery address line 3 Provide (if available). threeDSShippingPostalCode Text (16) No Shipping / delivery postal code Provide (if available). threeDSIsAddrMatch Text (1) No Flag for comparing the billing address and shipping address. Provide (if available). “T” – Shipping address matches billing address “F” – Shipping address NOT match billing address • [Gift Card / Prepaid Card](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/gift-card-prepaid-card.md): Provide only if the purchase related to gift card / prepaid card Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSGiftCardAmount Text (15) No Gift card / prepaid card purchase amount. threeDSGiftCardCurr Text (3) No Gift card / prepaid card purchase currency. ISO 4217 three-digit currency code. e.g. “344” – HKD threeDSGiftCardCount Text (2) No Number of gift card / prepaid card purchasing. e.g. “12” – Purchasing 12 gift cards • [Pre-Order Purchase](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/pre-order-purchase.md): Provide only if the payment is related to Pre-Order Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSPreOrderReason Text (2) No The pre-order reasons. “01” – The pre-order is due to merchant availability, i.e. the purchasing product is not available due to the insufficient stock in the merchant. “02” – The pre-order is for future release product, i.e. the purchasing product is going to be released on future date. threeDSPreOrderReadyDate Text (8) No The expected ready date of the pre-order. Format: YYYYMMDD e.g. “20190401” • [Account Info](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/account-info.md): Provide only if there is user account in merchant Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSAcctCreateDate Text(8) No Date that the cardholder opened the account. Format: YYYYMMDD e.g. “20190401” threeDSAcctAgeInd Text(2) No Length of time that the cardholder has had the account. • 01 = No account (guest check-out) • 02 = Created during this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctLastChangeDate Text(8) No Date that the cardholder’s account was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: YYYYMMDD e.g. “20190401” threeDSAcctLastChangeInd Text(2) No Length of time since the cardholder’s account information was last changed, including Billing or Shipping address, new payment account, or new user(s) added. • 01 = Changed during this transaction • 02 = Less than 30 days • 03 = 30−60 days • 04 = More than 60 days threeDSAcctPwChangeDate Text(8) No Date that cardholder’s account had a password change or account reset. Format: YYYYMMDD e.g. “20190401” threeDSAcctPwChangeInd Text(2) No Indicates the length of time since the cardholder’s account had a password change or account reset. • 01 = No change • 02 = Changed during this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctPurchaseCount Text(4) No Number of purchases with this cardholder account during the previous six months. e.g. “13” – Purchased 13 times during the previous six months threeDSAcctCardProvisionAttempt Text(3) No Number of Add Card attempts in the last 24 hours. e.g. “2” – Tried add card 2 times threeDSAcctNumTransDay Text(3) No Number of transactions (successful and abandoned) for this cardholder account across all payment accounts in the previous 24 hours. e.g. “2” – Processed 2 transactions threeDSAcctNumTransYear Text(3) No Number of transactions (successful and abandoned) for this cardholder account across all payment accounts in the previous year. e.g. “10” – Processed 10 transactions threeDSAcctPaymentAcctDate Text(8) No Date that the payment account was enrolled in the cardholder’s account. Format: YYYYMMDD e.g. “20190401” threeDSAcctPaymentAcctInd Text(2) No Indicates the length of time that the payment account was enrolled in the cardholder’s account. • 01 = No account (guest check-out) • 02 = During this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctShippingAddrLastChangeDate Text(8) No Date when the shipping address used for this transaction was first used. Format: YYYYMMDD e.g. “20190401” threeDSAcctShippingAddrLastChangeInd Text(2) No Indicates when the shipping address used for this transaction was first used • 01 = This transaction • 02 = Less than 30 days • 03 = 30−60 days • 04 = More than 60 days threeDSAcctIsShippingAcctNameSame Text(1) No Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. “T” – Account name identical to shipping name “F” – Account name different than shipping name threeDSAcctIsSuspiciousAcct Text(1) No Indicates whether has experienced suspicious activity (including previous fraud) on the cardholder account. “T” – Suspicious activity has been observed “F” – No suspicious activity has been observed • [Account Authentication Info](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/account-authentication-info.md): Provide only if there is user account in merchant Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSAcctAuthMethod Text(2) No Mechanism used by the Cardholder to authenticate. • 01 = No authentication occurred (i.e. cardholder “logged in” as guest) • 02 = Login to the cardholder account at the merchant system using merchant‘s own credentials • 03 = Login to the cardholder account at the merchant system using federated ID • 04 = Login to the cardholder account at the merchant system using issuer credentials • 05 = Login to the cardholder account at the merchant system using third-party authentication • 06 = Login to the cardholder account at the merchant system using FIDO Authenticator threeDSAcctAuthTimestamp Text(8) No Date and time in UTC of the cardholder authentication. Format: YYYYMMDD e.g. “20190401” • [Pay Token](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/pay-token.md): Provide only if the card info is de-tokenized from pay token Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSPayTokenInd Text(1) No Indicates that the transaction was de-tokenized. *Only provide when de-tokenized happened “T” – The card info is de-tokenized from pay token • [Redirect URL](https://developer.asiapay.com/integration-guide/web-integration/client-post-through-browser/3ds-2-0/redirect-url.md): successUrl, failUrl and cancelUrl Output Title Description Title Parameters Data Type Descriptions Ref Text Merchant’s Order Reference Number (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) • [Direct Client Side Connection](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection.md): Introduction This connection method is tailored for merchants utilizing an Online Shopping Cart System. It relies on HTML and JavaScript, ensuring wide applicability across various online shopping cart software and architectures. While the intricate technical specifications and variations of these systems are beyond the scope of this document, this integration method guarantees a seamless experience. Compatibility with Shopping Cart Software For detailed compatibility with specific shopping cart software, we recommend referring to our comprehensive documentation available on our platform. This resource provides extensive information to facilitate a smooth integration process with your preferred shopping cart system. 3-D Secure Verification Process In cases where the customer's credit card is enrolled in 3-D Secure, an additional layer of security is implemented. The customer will be prompted to provide either a static or one-time password to verify their identity. This 3-D Secure protocol, implemented by major credit card brands such as VISA ("Verified By VISA"), MasterCard ("MasterCard SecureCode"), JCB ("J/Secure"), and AMEX ("AMEX SafeKey"), significantly reduces fraudulent online transactions. Integration with Verified By VISA (3-D Secure) This document uses Verified By VISA as an illustrative example to demonstrate the verification process in detail, emphasizing its standardized approach across all major brand types. SSL Certificate Requirement For merchants opting for this connection method, a 128-bit SSL server certificate must be installed to ensure data encryption. The system strictly requires encrypted data for processing. Our payment gateway system employs an Extended Validation (EV) SSL Certificate to enhance security. To ensure seamless functionality, it's crucial to verify if your certificate store recognizes the VeriSign intermediate CA certificate - Secure SitePro / Managed PKI for SSL Premium with EV Certificates. If not, please install the VeriSign intermediate CA certificate in your certificate store. To download the primary and secondary VeriSign EV SSL Intermediate CA certificates, please visit this link . Ensure you select the option "Issued After May 17th, 2009" for the appropriate certificates. • [Sample Code](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/sample-code.md): Kick Off After the integration has been completed, it is ready to launch your e-commerce web to serve your customers. Please copy the following TESTING URL for client post method: Title Description Payment Gateway Testing URL PayDollar https://test.paydollar.com/b2cDemo/eng/dPayment/payComp.jsp SiamPay https://test.siampay.com/b2cDemo/eng/dPayment/payComp.jsp PesoPay https://test.pesopay.com/b2cDemo/eng/dPayment/payComp.jsp Base URL Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/dPayment SiamPay https://test.siampay.com/b2cDemo/eng/dPayment PesoPay https://test.pesopay.com/b2cDemo/eng/dPayment As different type of programming language have different syntax. Therefore, the sample code below, is written in HTML code, the requirement is to form post all the required parameters to our secure API. Please change the action URL to integrate with your preferred gateway Plain text * All the source code in this document are the property of AsiaPay (HK) Limited. Any use, modification and adaptation to the code should be reported to and approved by AsiaPay (HK) Limited. AsiaPay (HK) Limited do not have any liability in any lose to the party using the source code. • [Integration Parameters](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters.md): In the targeted page of integration, in which sum of purchase has been generated, the following fields (hidden or text) should be added. To connect to our system, you need to post the required parameters to our payment page URL and then get back the result by using data feed. • [Required Parameters](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/required-parameters.md): Required Parameter ( with UTF-8 Encoding ) for connect to our payment page Title Description Title Parameters Data Type Descriptions orderRef Text (35) Merchant‘s Order Reference Number amount Number (12,2) The total amount you want to charge the customer (up to 2 decimal place) Remark: mpsMode = MCP, the amount should be calculated in base currency. currCode Text (3) The currency of the payment: “344” – HKD “840” – USD “702” – SGD “156” – CNY (RMB) “392” – JPY “901” – TWD “036” – AUD “978” – EUR “826” – GBP “124” – CAD “446” – MOP “608” – PHP “764” – THB “458” – MYR “360” – IDR “410” – KRW “682” – SAR “554” – NZD “784” – AED “096” – BND “704” – VND “356” – INR Remark : mpsMode = MCP, the currCode value should be in base currency. lang Text (1) The language of the payment page : “E” – English “C” – Traditional Chinese “X” – Simplified Chinese “J” – Japanese “T” – Thai “F” – French “G” – German “R” – Russian “S” – Spanish “V” – Vietnamese merchantId Number The merchant ID we provide to you pMethod Text The payment type (“VISA”, “Master”, ”Diners”, ”JCB”, “AMEX”, PPS", "PAYPAL", "CHINAPAY", "ALIPAY", "TENPAY", "99BILL", "MEPS", "OCTOPUS", "NOVAPAY", "ENETS", "MYCLEAR", "POLI", “UPOP”, “UPOP-GNETE” ,"UPOP-DNA", "FUIOU", "SCB", "KRUNGSRIONLINE", "KTB", "UOB", "TMB", "IBANKING", "BPM", "GCash", "BancNet", "SMARTMONEY, “M2U”, “CIMBCLICK”, “WECHAT”, “ONEPAY”, “VCO”, “WELEND”) epMonth Number(2) Credit card expiry month (mandatory for card payment) epYear Number(4) Credit card expiry year (mandatory for card payment) cardNo Text (16) Credit card number (mandatory for card payment) securityCode Text (4) Credit Card Verification Code (mandatory for card payment) VISA: CVV2 (3-digit) MasterCard: CVC2 (3-digit) JCB: CAV2 (3-digit) American Express: 4DBC (4-digit) cardHolder Text (20) Credit card holder name (mandatory for card payment) failUrl Text (300) A Web page address you want us to redirect upon the transaction being rejected by us (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) successUrl Text (300) A Web page address you want us to redirect upon the transaction being accepted by us (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) errorUrl Text (300) A Web page address you want us to redirect when unexpected error occur (e.g. parameter incorrect) (For display purpose only. DO NOT use this URL to update your system. Please use DataFeed for this purpose.) payType Text (1) (“N”,”H”) The payment type: “N” – Normal Payment (Sales) “H” – Hold Payment (Authorize only) For merchants who use authorize mode, please be reminded to perform the CAPTURE action as soon as the transaction is confirmed as valid. Once captured, the customer's credit card will be debited in coming bank settlement processing. If the merchant does not capture/reverse the authorized transaction over 14 days, the credit limit will be released to the cardholder after a time period which is subjected to card issuing bank Merchant may capture/reverse the authorized transaction in the merchant administration site > Operation > Transaction Detail. Remark: Hold Payment is not available for PPS, PAYPAL, CHINAPAY, ALIPAY, TENPAY, 99BILL, MEPS, OCTOPUS, NOVAPAY, ENETS, MYCLEAR, POLI, UPOP, UPOP-GNETE, UPOP-DNA, FUIOU, SCB, KRUNGSRIONLINE, KTB, UOB, TMB, IBANKING, BPM, GCash, BancNet, SMARTMONEY, M2U, CIMBCLICK, WECHAT • [Installment](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/installment.md): Optional Parameter for installment Title Description Title Parameters Data Type Descriptions installment_service Text (1) (“T”,”F”) Installment service indicator installment_period Text (20) In number of months *Multiple period with separator “|” only for payment method “WELEND“ • [Airline data](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/airline-data.md): Optional parameter for airline data Title Description Title Parameters Data Type Descriptions airline_service Text (1) (“T”,”F”) Airline service indicator airline_ticketNumber Text (13) Air ticket number • [Billing information](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/billing-information.md): Optional Parameter for billing information Title Description Title Parameters Data Type Descriptions billingFirstName Text(60) First name of customer billingLastName Text(60) Last name of customer billingStreet1 Text(40) Address of customer billingStreet2 Text(40) Address of customer ,only mandatory if address exceed 40 billingCity Text(50) City billingState Text(2) Mandatory if customer’s country is USA or Canada billingPostalCode Text(10) Mandatory if customer’s country is USA or Canada billingCountry Text(2) Eg.HK billingEmail Text(255) Email address custIPAddress Text(15) 192.168.180.100 • [Connect to payment page](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/connect-to-payment-page.md): Optional Parameter for connect to our payment page Title Description Title Parameters Data Type Descriptions remark Text (50) An additional remark field that will appear in the confirmation email and transaction detail report to help you to refer the order oriCountry Number(3) Origin Country Code Example: 344 – “HK” 840 – “US” destCountry Number(3) Destination Country Code Example: 344 – “HK” 840 – “US” secureHash Text (40) Secure hash is used to authenticate the integrity of the transaction information and the identity of the merchant. It is calculated by hashing the combination of various transaction parameters and the Secure Hash Secret. *Applies to merchants who registered this function only. For more information, please refer to section 4. timeoutValue Number Timeout Value in second, only for OCTOPUS payment and ranged 180 and 7200 payMode Text(2) Payment Mode “EC” - Electronic Commerce (Default) “MO” - Mail Order “RC” - Recurring orderPhoneNo Text(30) Phone Number of order • [Multi Currency Pricing (MCP)](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/multi-currency-pricing-mcp.md): Optional Parameter for Multi Currency Pricing (MCP) Title Description Title Parameters Data Type Descriptions mpsMode Text(3) The Multi-Currency Processing Service (MPS) Mode: “MCP” – Enable MPS with ‘Multi Currency Pricing’ For merchant who applied MPS function multiRateID Text (12) Unique Rate ID *Returned from API function “MCPMultiRateEnquiry” mpsExRate Number (10,4) Exchange rate between the merchant’s base currency and the foreign currency. *Returned from API function “MCPMultiRateEnquiry” foreignCurrCode Text (3) Foreign currency code foreignAmount Number (12,2) Calculated foreign amount *The foreign amount should be converted from a base amount with minimum value HKD10 / MOP10 to avoid tolerance check failure. • [Third party EWallet](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/third-party-ewallet.md): Optional Parameter for using third party EWallet Title Description Title Parameters Data Type Descriptions eWalletService Text (“T”,”F”) EWallet service indicator eWalletBrand Text (10) The value of the “eWalletBrand”: “MP” – MasterPass “VCO” – VISA Checkout “ECO” – AMEX ExpressCheckout eWalletInd Text Only Text(3) for MasterPass EWallet, The Wallet Indicator is returned by the wallet platform and must be passed to the payment processor/acquirer in the financial authorization transaction. vcoCallid Text Value of “callid” returned from VISA Checkout *Only for “VISA Checkout Direct Integration” • [Card Data Encryption](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/integration-parameters/optional-parameters/card-data-encryption.md): Optional Parameters for Card Data Encryption Title Description Title Parameters Data Type Descriptions encryptMode Text Encryption Mode: “WEB” – For online transaction encryptAlgo Text Encrypted Algorithm:-“AES/CBC/PKCS5Padding” For “WEB” encryptedData Text Other customized encrypted data (For partner only) For encrytedMode is "WEB", please follow this format cardNo|expDate|cardHolder|securityCode before encryption • [3DS 2.0](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0.md): The following are the parameters especially for 3DS 2.0. Merchant shall fulfill the parameters requirement to start using 3DS 2.0. The parameters are case sensitive and should be in UTF-8 encoding Subject: Updates to Visa requires additional data fields for authentication of payment transactions – Reduced Mandated data fields and Effective Date Extended The effective date of the VISA mandate to include additional data fields in the authentication request (AReq) messages has been revised to 12 August 2024 . Further, the number of the mandatory data fields have also been reduced from twelve (12) to Seven (7). Nevertheless, Visa recommends merchants to provide all the twelve (12) data fields as more data supports issuers’ authentication decision-making. Browser IP Address — Mandatory (Browser) Browser Screen Height — Mandatory (Browser) Browser Screen Width — Mandatory (Browser) Cardholder Billing Address City — Recommended Cardholder Billing Address Country — Recommended Cardholder Billing Address Line 1 — Recommended Cardholder Billing Address Postal Code — Recommended Cardholder Billing Address State — Recommended Cardholder Email Address — Mandatory (Browser / In-App) Cardholder Name — Mandatory (Browser / In-App) Cardholder Phone Number (Work / Home / Mobile) — Mandatory (Browser / In-App) Common Device Identification Parameters (Device IP Address) — Mandatory (In-App) It is also important to note that For those merchants using the web integration “Client Post Through Browser”, the payment page will be modified to allow the input of the additional data fields. In case, Merchant has already had the required information and does not want their customer to reinput again. Please kindly contact our technical support for the necessary arrangement. For those merchants using the web integration “Direct Client Side Connection”, additional parameters are required. For those merchants using the web integration “Server Side Direct Connection”, NO change is required for the connection. However, please contact the acquirer on this 3DS authentication matter. Any 3-D authentication request without the above additional data fields will be rejected by Visa from 12 August 2024 onwards. Please review and plan according in advance to ensure the service continuity. The testing environment will be ready for the related testing in the middle of March, 2024. All the mandatory data fields must be included in the authentication request on or before 12 August 2024. • [Basic Parameters](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/basic-parameters.md): Title Description Title Description Title Parameters Data Type Mandatory Descriptions threeDSTransType Text (2) No Transaction type. Select the most suitable one. “01” – Goods/ Service Purchase *Default value if threeDSTransType not provided. “03” – Check Acceptance “10” – Account Funding “11” – Quasi-Cash Transaction “28” – Prepaid Activation and Load threeDSCustomerEmail Text (254) Yes The customer’s email address *Strongly suggest to provide if available. Shall meet requirements of Section 3.4 of IETF RFC 5322. threeDSMobilePhoneCountryCode Text (3) Yes Customer’s mobile phone number country code. Provide if available. If “threeDSMobilePhoneCountryCode” is provided, “threeDSMobilePhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSMobilePhoneNumber Text (15) Yes Customer’s mobile phone number. Provide if available. If “threeDSMobilePhoneNumber” is provided, “threeDSMobilePhoneCountryCode” should also be provided. threeDSHomePhoneCountryCode Text (3) No Customer’s home phone number country code. Provide if available. If “threeDSHomePhoneCountryCode” is provided, “threeDSHomePhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSHomePhoneNumber Text (15) No Customer’s home phone number. Provide if available. If “threeDSHomePhoneNumber” is provided, “threeDSHomePhoneCountryCode” should also be provided. threeDSWorkPhoneCountryCode Text (3) No Customer’s work phone number country code. Provide if available. If “threeDSWorkPhoneCountryCode” is provided, “threeDSWorkPhoneNumber” should also be provided. e.g. “852” – Hong Kong threeDSWorkPhoneNumber Text (15) No Customer’s work phone number. Provide if available. If “threeDSWorkPhoneNumber” is provided, “threeDSWorkPhoneCountryCode” should also be provided. threeDSIsFirstTimeItemOrder Text (1) No Flag to show if the customer is re-ordering the item / product. i.e. purchasing the same item / product Provide only if the payment related to purchase item / product. “T” – It is the first time the customer purchases this item / product. “F” – It is the NOT the first time the customer purchases the item / product, it is re-ordering. threeDSChallengePreference Text(2) No Indicates whether a challenge is requested for this transaction. “01” – No preference *Default value if threeDSChallengePreference not provided. “02” – No challenge requested * “03” – Challenge requested (Merchant preference) “04” – Challenge requested (Mandate) “05” – No challenge requested (transactional risk analysis is already performed) * “06” – No challenge requested (Data share only)* “07” – No challenge requested (strong consumer authentication is already performed) * “08” – No challenge requested (utilise whitelist exemption if no challenge required) * “09” – Challenge requested (whitelist prompt requested if challenge required) ** If “No challenge requested” options are selected, the chargeback liability shift to merchant. • [Recurring / Installment Payment Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/recurring-installment-payment-related.md): Provide only if it is a recurring / installment payment Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSRecurringFrequency Text (4) Yes (Only for recurring / installment payment) Minimum number of days between payment. e.g. “30” – 30 days between payments. threeDSRecurringExpiry Text (8) Yes (Only for recurring / installment payment) Date after which no further payment shall be performed. Format: YYYYMMDD e.g. “20190401” • [Billing Address Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/billing-address-related.md): Provide only if billing address is available Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSBillingCountryCode Text (3) No Payment cardholder billing country. Shall be the ISO 3166-1 numeric three-digit country code. e.g. “344” – Hong Kong Note: Required if "threeDSBillingState" is present threeDSBillingState Text (3) No Payment cardholder billing state Should be the country subdivision code defined in ISO 3166-2. Provide if available, as some countries do not have subdivision code. e.g. “PE” – Prince Edward Island of California threeDSBillingCity Text (50) No Payment cardholder billing city e.g. “Hong Kong” threeDSBillingLine1 Text (50) No Payment cardholder billing address line 1 threeDSBillingLine2 Text (50) No Payment cardholder billing address line 2 Provide if available threeDSBillingLine3 Text (50) No Payment cardholder billing address line 3 Provide if available threeDSBillingPostalCode Text (16) No Payment cardholder billing postal code Provide if available • [Shipping / Delivery Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/shipping-delivery-related.md): Provide only if the payment requires shipping / delivery Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSDeliveryTime Text (2) No The delivering time for this purchase. “01” – Electronic Delivery “02” – Same day shipping “03” – Overnight shipping “04” – Two-day or more shipping threeDSDeliveryEmail Text (254) No The email recipient of the purchased product. Provide only if the purchased product is using electronic delivery. threeDSShippingDetails Text (2) No Shipping details / type. Select the most suitable one. “01” – Ship to cardholder’s billing address “02” – Ship to another verified address stored in merchant “03” – Ship to address that is different than the cardholder’s billing address “04” – Ship to Store / Pick-up at local store (Store address shall be populated in shipping address fields) “05” – Digital goods (includes online services, electronic gift cards and redemption codes) “06” – Travel and Event tickets, not shipped “07” – Other (for example, Gaming, digital services not shipped, e-media subscriptions, etc.) threeDSShippingCountryCode Text (3) No Shipping / delivery country. Shall be the ISO 3166-1 numeric three-digit country code. e.g. “344” – Hong Kong, “840” – US Note: Required if "threeDSShippingState" is present threeDSShippingState Text (3) No Shipping / delivery state Should be the country subdivision code defined in ISO 3166-2 e.g. “PE” – Prince Edward Island of California threeDSShippingCity Text (50) No Shipping / delivery city. e.g. “Hong Kong” threeDSShippingLine1 Text (50) No Shipping / delivery address line 1 threeDSShippingLine2 Text (50) No Shipping / delivery address line 2 Provide (if available). threeDSShippingLine3 Text (50) No Shipping / delivery address line 3 Provide (if available). threeDSShippingPostalCode Text (16) No Shipping / delivery postal code Provide (if available). threeDSIsAddrMatch Text (1) No Flag for comparing the billing address and shipping address. Provide (if available). “T” – Shipping address matches billing address “F” – Shipping address NOT match billing address • [Gift Card / Prepaid Card Purchase Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/gift-card-prepaid-card-purchase-related.md): Provide only if the purchase related to gift card / prepaid card Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSGiftCardAmount Text (15) No Gift card / prepaid card purchase amount. threeDSGiftCardCurr Text (3) No Gift card / prepaid card purchase currency. ISO 4217 three-digit currency code. e.g. “344” – HKD threeDSGiftCardCount Text (2) No Number of gift card / prepaid card purchasing. e.g. “12” – Purchasing 12 gift cards • [Pre-Order Purchase Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/pre-order-purchase-related.md): Provide only if the payment is related to Pre-Order Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSPreOrderReason Text (2) No The pre-order reasons. “01” – The pre-order is due to merchant availability, i.e. the purchasing product is not available due to the insufficient stock in the merchant. “02” – The pre-order is for future release product, i.e. the purchasing product is going to be released on future date. threeDSPreOrderReadyDate Text (8) No The expected ready date of the pre-order. Format: YYYYMMDD e.g. “20190401” • [Account Info Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/account-info-related.md): Provide only if there is user account in merchant Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSAcctCreateDate Text(8) No Date that the cardholder opened the account. Format: YYYYMMDD e.g. “20190401” threeDSAcctAgeInd Text(2) No Length of time that the cardholder has had the account. • 01 = No account (guest check-out) • 02 = Created during this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctLastChangeDate Text(8) No Date that the cardholder’s account was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: YYYYMMDD e.g. “20190401” threeDSAcctLastChangeInd Text(2) No Length of time since the cardholder’s account information was last changed, including Billing or Shipping address, new payment account, or new user(s) added. • 01 = Changed during this transaction • 02 = Less than 30 days • 03 = 30−60 days • 04 = More than 60 days threeDSAcctPwChangeDate Text(8) No Date that cardholder’s account had a password change or account reset. Format: YYYYMMDD e.g. “20190401” threeDSAcctPwChangeInd Text(2) No Indicates the length of time since the cardholder’s account had a password change or account reset. • 01 = No change • 02 = Changed during this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctPurchaseCount Text(4) No Number of purchases with this cardholder account during the previous six months. e.g. “13” – Purchased 13 times during the previous six months threeDSAcctCardProvisionAttempt Text(3) No Number of Add Card attempts in the last 24 hours. e.g. “2” – Tried add card 2 times threeDSAcctNumTransDay Text(3) No Number of transactions (successful and abandoned) for this cardholder account across all payment accounts in the previous 24 hours. e.g. “2” – Processed 2 transactions threeDSAcctPaymentAcctDate Text(8) No Date that the payment account was enrolled in the cardholder’s account. Format: YYYYMMDD e.g. “20190401” threeDSAcctPaymentAcctInd Text(2) No Indicates the length of time that the payment account was enrolled in the cardholder’s account. • 01 = No account (guest check-out) • 02 = During this transaction • 03 = Less than 30 days • 04 = 30−60 days • 05 = More than 60 days threeDSAcctShippingAddrLastChangeDate Text(8) No Date when the shipping address used for this transaction was first used. Format: YYYYMMDD e.g. “20190401” threeDSAcctShippingAddrLastChangeInd Text(2) No Indicates when the shipping address used for this transaction was first used • 01 = This transaction • 02 = Less than 30 days • 03 = 30−60 days • 04 = More than 60 days threeDSAcctIsShippingAcctNameSame Text(1) No Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. “T” – Account name identical to shipping name “F” – Account name different than shipping name threeDSAcctIsSuspiciousAcct Text(1) No Indicates whether has experienced suspicious activity (including previous fraud) on the cardholder account. “T” – Suspicious activity has been observed “F” – No suspicious activity has been observed • [Account Authentication Info Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/account-authentication-info-related.md): Provide only if there is user account in merchant Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSAcctAuthMethod Text(2) No Mechanism used by the Cardholder to authenticate. • 01 = No authentication occurred (i.e. cardholder “logged in” as guest) • 02 = Login to the cardholder account at the merchant system using merchant‘s own credentials • 03 = Login to the cardholder account at the merchant system using federated ID • 04 = Login to the cardholder account at the merchant system using issuer credentials • 05 = Login to the cardholder account at the merchant system using third-party authentication • 06 = Login to the cardholder account at the merchant system using FIDO Authenticator threeDSAcctAuthTimestamp Text(8) No Date and time in UTC of the cardholder authentication. Format: YYYYMMDD e.g. “20190401” • [Pay Token Related](https://developer.asiapay.com/integration-guide/web-integration/direct-client-side-connection/3ds-2-0/pay-token-related.md): Provide only if the card info is de-tokenized from pay token Title Description Title Description Parameters Data Type Mandatory Descriptions threeDSPayTokenInd Text(1) No Indicates that the transaction was de-tokenized. *Only provide when de-tokenized happened “T” – The card info is de-tokenized from pay token • [Server Side Direct Connection](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection.md): Introduction This connection method is for merchant to request payment authorization from bank directly through our payment gateway system and subject to approval of acquiring bank. For example, merchant’s IVR system or mobile application can directly integrate to us. And in this connection, merchants need to build their own payment information collection page to collect payment information, such as credit card number, expire data, holder’s name and etc. Then, payment information has to be sent to a defined URL provided by the acquiring bank. Customer of the merchant, therefore, will not see any bank’s payment page. For merchant who chooses this method of connection, 128-bit SSL cert must be installed for data encryption. The system does not accept non-encrypted data. Our payment gateway system uses Extended Validation (EV) SSL Certificate. To ensure your system function properly, please check your certificate store can recognize VeriSign intermediate CA certificate - Secure Site Pro/Managed PKI for SSL Premium with EV Certificates. If not, you are required to install the VeriSign intermediate CA certificate in your certificate store. Please download the primary and secondary VeriSign EV SSL Intermediate CA certificates from the following link then import the 2 certificates into the keystore of your environment. http://www.verisign.com/support/verisign-intermediate-ca/extended-validation-pro/index.html (Please be reminded that you should choose the option “Issued After May 17th, 2009”) We use Server Side Direct Connection for App 2 App integration and wallet payment direct integration. For the detail, please reference with "Integration Guide (Wallet Direct Connection)” • [Sample Code](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/sample-code.md): Kick Off After the integration has been completed, it is ready to launch your e-commerce web to serve your customers. Please copy the following TESTING URL for Direct Connect Server Post method: Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/directPay/payComp.jsp SiamPay https://test.siampay.com/b2cDemo/eng/directPay/payComp.jsp PesoPay https://test.pesopay.com/b2cDemo/eng/directPay/payComp.jsp Base URL Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/directPay SiamPay https://test.siampay.com/b2cDemo/eng/directPay PesoPay https://test.pesopay.com/b2cDemo/eng/directPay As different type of programming language have different syntax, so we just propose the method to connect to our payment page. To connect, we suggest you to use server side posting: Sample code for server post by using java: Plain text // Set up the post data String postData = "merchantId=1&orderRef=test&amount=1&currCode=344&pMethod=VISA&epMonth=01&epYear=2002&cardNo=4123412341234123&cardholder=Edward&remark=test”; // Post to payment page strResult = ServerPost.post(postData, https://test.paydollar.com/b2cDemo/eng/directPay/payComp.jsp ); // Extract the payment status from strResult ... // Finish ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** public class ServerPost { static public String post(String ip_postData, String ip_pageUrl) { try { String strResult = ""; URL url = new URL(ip_pageUrl); URLConnection con = url.openConnection(); //from secure site if (con instanceof com.sun.net.ssl.HttpsURLConnection) { ((com.sun.net.ssl.HttpsURLConnection) con).setSSLSocketFactory (SSLSocketFactory) SSLSocketFactory.getDefault()); } con.setDoOutput(true); con.setDoInput(true); // Set request headers for content type and length con.setRequestProperty( "Content-type", "application/x-www-form-urlencoded"); con.setRequestProperty( "Content-length", String.valueOf(ip_postData.length())); // Issue the POST request OutputStream outStream = con.getOutputStream(); outStream.write(ip_postData.getBytes()); outStream.flush(); // Read the response InputStream inStream = con.getInputStream(); while (true) { int c = inStream.read(); if (c == -1) break; strResult = strResult + String.valueOf((char) c); } inStream.close(); outStream.close(); return strResult; } catch (Exception e) { System.out.print(e.toString()); return null; } } } * All the source code in this document are the property of AsiaPay (HK) Limited. Any use, modification and adaptation to the code should be reported to and approved by AsiaPay (HK) Limited. AsiaPay (HK) Limited do not have any liability in any lose to the party using the source code. • [Integration Parameters](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters.md): The following are the parameters for integration. Our payment gateway system is case sensitive. Make sure the typeface is correct. When a transaction is finish, the system will return customer a payment message on the page created by merchant. • [Required Parameter](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/required-parameter.md): Required Parameter ( with UTF-8 Encoding ) for connect to our payment interface Title Description Title Parameters Data Type Descriptions orderRef Text (35) Merchant‘s Order Reference Number amount Number (12,2) Total amount your want to charge the customer [ Up to 2 decimal place ] Remark: mpsMode = MCP, the amount should be calculated in base currency. currCode Text (3) The currency of the payment: “344” – HKD “840” – USD “702” – SGD “156” – CNY (RMB) “392” – JPY “901” – TWD “036” – AUD “978” – EUR “826” – GBP “124” – CAD “446” – MOP “608” – PHP “764” – THB “458” – MYR “360” – IDR “410” – KRW “682” – SAR “554” – NZD “784” – AED “096” – BND “704” – VND “356” – INR Remark: mpsMode = MCP, the currCode value should be in base currency. lang Text (1) The language of the payment page : “E” - English merchantId Number The merchant ID we provide to you pMethod Text The payment card type “VCO” – VISA Checkout Card Payment: (“VISA”, “Master”, ”Diners”, ”JCB”, ”AMEX”) eWallet Payment: “ALIPAYAPP” – Alipay Global App “ALIPAYCNAPP” – Alipay China App “ALIPAYHKAPP” – Alipay HK App “WECHATAPP” – WeChat Pay App “WECHATONL” – WeChat Pay QR “FPS” – FPS App 2 App “OCTOPUS” – Octopus App 2 App / QR “PayMe” – PayMe App 2 App / QR “BoCPayAPP” – BocPay App 2 App epMonth Number(2) Credit card expiry month epYear Number(4) Credit card expiry year cardNo Text (16) Credit card number cardHolder Text (20) Credit card holder name securityCode Text (4) Credit Card Verification Code VISA: CVV2 (3-digit) MasterCard: CVC2 (3-digit) JCB: CAV2 (3-digit) American Express: 4DBC (4-digit) payType Text (1) (“N”,”H”) The payment type: “N” – Normal Payment (Sales) “H” – Hold Payment (Authorize only) For merchants who use authorize mode, please be reminded to perform the CAPTURE action as soon as the transaction is confirmed as valid. Once captured, the customer's credit card will be debited in coming bank settlement processing. If the merchant does not capture/reverse the authorized transaction over 14 days, the credit limit will be released to the cardholder after a time period which is subjected to card issuing bank Merchant may capture/reverse the authorized transaction in the merchant administration site > Operation > Transaction Detail. Remark: Hold Payment is not available for PPS, PAYPAL, CHINAPAY, ALIPAY, TENPAY, 99BILL, MEPS, OCTOPUS, NOVAPAY, ENETS, MYCLEAR, POLI, UPOP, UPOP-GNETE, UPOP-DNA, FUIOU, SCB, KRUNGSRIONLINE, KTB, UOB, TMB, IBANKING, BPM, GCash, BancNet, SMARTMONEY, M2U, CIMBCLICK, WECHAT, ONEPAY • [Optional Parameters](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters.md) • [Installment](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/installment.md): Optional Parameter for installment Title Description Title Parameters Data Type Descriptions installment_service Text (1) (“T”,”F”) Installment service indicator installment_period Number In number of months • [Airline Data](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/airline-data.md): Optional Parameter for Airline Data Title Description Title Parameters Data Type Descriptions airline_service Text (1) (“T”,”F”) Airline service indicator airline_ticketNumber Text (13) Air ticket number • [Billing Information](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/billing-information.md): Optional Parameter for Billing Information Title Description Title Parameters Data Type Descriptions billingFirstName Text(60) First name of customer billingLastName Text(60) Last name of customer billingStreet1 Text(40) Address of customer billingStreet2 Text(40) Address of customer ,only mandatory if address exceed 40 billingCity Text(50) City billingState Text(2) Mandatory if customer’s country is USA or Canada billingPostalCode Text(10) Mandatory if customer’s country is USA or Canada billingCountry Text(2) Eg.HK billingEmail Text(255) Email address custIPAddress Text(15) 192.168.180.100 • [Connect to our payment interface](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/connect-to-our-payment-interface.md): Optional Parameter for connecting to our payment interface Title Description Title Parameters Data Type Descriptions remark Text (50) An additional remark field that will appear in the confirmation email and transaction detail report to help you to refer the order secureHash Text (40) Secure hash is used to authenticate the integrity of the transaction information and the identity of the merchant. It is calculated by hashing the combination of various transaction parameters and the Secure Hash Secret. *Applies to merchants who registered this function only. For more information, please refer to section 4. payMode Text(2) Payment Mode “EC” - Electronic Commerce (Default) “MO” - Mail Order “RC” - Recurring “RT” - Retail orderPhoneNo Text(30) Phone Number of order • [Multi Currency Pricing (MCP)](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/multi-currency-pricing-mcp.md): Optional Parameter for Multi Currency Pricing (MCP) Title Description Title Parameters Data Type Descriptions mpsMode Text(3) The Multi-Currency Processing Service (MPS) Mode: “MCP” – Enable MPS with ‘Multi Currency Pricing’ For merchant who applied MPS function multiRateID Text (12) Unique Rate ID *Returned from API function “MCPMultiRateEnquiry” mpsExRate Number (10,4) Exchange rate between the merchant’s base currency and the foreign currency. *Returned from API function “MCPMultiRateEnquiry” foreignCurrCode Text (3) Foreign currency code foreignAmount Number (12,2) Calculated foreign amount *The foreign amount should be converted from a base amount with minimum value HKD10 / MOP10 to avoid tolerance check failure. • [Third Party EWallet](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/third-party-ewallet.md): Optional Parameter for using third party EWallet Title Description Title Parameters Data Type Descriptions eWalletService Text (“T”,”F”) EWallet service indicator eWalletBrand Text (10) The value of the “eWalletBrand”: “MP” – MasterPass “VCO” – VISA Checkout “APPLEPAY” – Apple Pay “ECO” – AMEX ExpressCheckout “SAMSUNG” – Samsung Pay “GOOGLE” – Google Pay™ eWalletPaymentData Text Retrieved EWallet data with Base64 Format *Used for Samsung Pay eWalletInd Text Only Text(3) for MasterPass EWallet, The Wallet Indicator is returned by the wallet platform and must be passed to the payment processor/acquirer in the financial authorization transaction. vcoCallid Text Value of “callid” returned from VISA Checkout *Only for “VISA Checkout Direct Integration” • [Card Data Encryption](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/card-data-encryption.md): Optional Parameters for Card Data Encryption Parameters Data Type Descriptions encryptMode Text Encryption Mode: “WEB” – For online transaction “POS” – For POS card present transaction encryptAlgo Text Encrypted Algorithm: -“DEsede/CBC/PKCS5Padding” For “POS” -“AES/CBC/PKCS5Padding” For “WEB” encryptedTrack1Data Text Encrypted card track 1 data Format: Initialization vector IV(16) + Encrypted Track 1 Data Note: The maximum record length for Track1 Data is 79 alphanumeric characters. Sample Track1 Data before encryption in plain text: “%B4111111111111111^MR TEST C ABCDE 18091019681143300001 840 ?;” encryptedTrack2Data Text Encrypted card track 2 data Format: Initialization vector IV(16) + Encrypted Track 2 Data Note: The maximum record length for Track2 Data is 40 alphanumeric characters. Sample Track2 Data before encryption in plain text:“; 4111111111111111=18091019681143384001?” encryptedEmvData Text Encrypted card EMV data read through a chip on the EMV card Format: Initialization vector IV(16) + Encrypted EMV Data encryptedData Text Other customized encrypted data (For partner only) For encrytedMode is "WEB", please follow this format cardNo|expDate|cardHolder|securityCode before encryption • [COF and MIT](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/optional-parameters/cof-and-mit.md): Optional Parameter for COF and MIT Parameters Data Type Descriptions appId Text (5) Application Type Id for the transaction “MIT” – Initial Merchant Initiated Transaction “MITS” – Sub Sequence Merchant Initiated Transaction “COF” – Initial Card On File Transaction “COFS” – Sub Sequence Card On File Transaction “REC” – Initial Recurring Transaction “RECS” – Sub Sequence Recurring Transaction appRef Text (30) Application Reference for the transaction based on the Application Type Master Agreement Id for the Transaction • [3D Transaction](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/integration-parameters/3d-transaction.md): Parameter For 3D Transaction (Need to install MPI Server Software at Merchants’ site) Parameters Data Type Descriptions vbvTransaction Text (“T”,”F”) 3D Transaction (i.e. Verified By VISA, MasterCard SecureCode, J/Secure, AMEX SafeKey) “T” – True: The transaction has been gone through the VE/PA process OR performed 3DS 2.0 Authentication. “F” – False: Non-3D transaction without go through the VE/PA process [ No need to send other 3D parameters except vbvTransECI ] *Note: Bank’s approval is required for non-3D transactions, please contact us for further details. vbvCHReturnCode Number Verify Enrollment Return Code Set to “0” if the enrolled value obtained in MPI VE Response Message is “Y” Set to “1001” if the enrolled value obtained in MPI VE Response Message is “N” Set to “-1” if the enrolled value is not available in MPI VE Response Message Keep empty / null if using 3DS 2.0. vbvPAReturnCode Number Payer Authentication Return Code Set to “0” if the status value obtained in MPI VE Response Message is “Y” Set to “1000” if the status value obtained in MPI VE Response Message is “A” Set to “1003” if the status value obtained in MPI VE Response Message is “N” Otherwise set to “-1” Keep empty / null if using 3DS 2.0. vbvTransTime Text in format (YYYYMMDD HH:MM:SS) Transaction Time, time, MPI PA Response Message. If using 3DS 2.0, the receiving time of Authentication Response / Result Request. vbvTransAuth Text (28) Cardholder Authentication Verification Value, CAVV, value in MPI PA Response Message [ Must be in Base64-Encoded format ] If using 3DS 2.0, the Authentication Value in Authentication Response / Result Request. vbvTransECI Text (2) Electronic Commerce Indicator, ECI, value in MPI PA Response Message For VISA & JCB card payment: For Enrolled 3D VISA card [ enrolled = Y ] Set it to the value of ECI obtained from MPI PA Response Message Set it to “07” if ECI value is not available in MPI PA Response Message For Not an Enrolled 3D VISA card [ enrolled = N ] Set it to “06” Otherwise, set it to “07” For MasterCard payment: For Enrolled 3D MasterCard [ enrolled = Y ] Set it to the value of ECI obtained from MPI PA Response Message Set it to “00” if ECI value is not available in MPI PA Response Message For Not an Enrolled 3D MasterCard [ enrolled = N ] Set it to “01” Otherwise, set it to “00 For Other credit card payment, set it to “07” If using 3DS 2.0, the ECI Value in Authentication Response / Result Request. vbvCAVVAlgo Text CAVV Algorithm, cavvAlgorithm, in MPI PA Response Message Keep empty / null if using 3DS 2.0. vbvXID Text(20) Transaction Identifier, xid, in MPI PA Response Message [ Must contain 20 characters ] Keep empty / null if using 3DS 2.0. vbvMerchantID Text Acquirer-defined Merchant Identifier, merID, in MPI PA Response Message If using 3DS 2.0, the “Acquirer Merchant ID” of Authentication Request. vbvAcquirerBin Text Acquirer BIN, acqBIN, in MPI PA Response Message If using 3DS 2.0, the “Acquirer BIN” of Authentication Request. vbvTransStatus Text(1) Transaction Status, status, in MPI PA Response Message Set it to the value of status obtained from MPI PA Response Message Set it to “U” if the status value is not available in the MPI PA Response Message If using 3DS 2.0, set it to the “Transaction Status” returned in Authentication Response / “Transaction Status” returned in Result Response. • [3DS 2.0](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/3ds-2-0.md): The following are the parameters especially for 3DS 2.0. Merchant shall fulfill the parameters requirement to start using 3DS 2.0. The parameters are case sensitive and should be in UTF-8 encoding. • [Basic Parameters](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/3ds-2-0/basic-parameters.md): Parameters Data Type Mandatory Descriptions threeDSVersion Text (10) No Indicate the 3DS Version if 3D-Secure is processed in this payment. *Should be provided if “vbvTransaction” is “T”. “1.0” – Using 3DS 1.0 “2.1.0” / “2.2.0” – Using 3DS 2.0 (depends on the actual message version used in 3DS 2.0 message) threeDSCustomerIP Text (45) No The customer incoming IP in IPv4 / IPv6 standard. *Suggest to provide for all transactions, if available. e.g. “1.12.123.255” / “2011:0db8:85a3:0101:0101:8a2e:0370:7334” threeDSAresTransStatus Text (1) No The “transStatus” returned in Authentication Response threeDSDsTransId Text (36) No (Mandatory if using 3DS 2.0) If using 3DS 2.0, provide the DS Transaction ID, if available. threeDSServerTransId Text (36) No If using 3DS 2.0, provide the 3DS Server Transaction ID, if available. threeDSAcsTransId Text (36) No If using 3DS 2.0, provide the ACS Transaction ID, if available. threeDSSdkTransId Text (36) No If using 3DS 2.0, provide the SDK Transaction ID, if available. • [Return Parameter](https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection/3ds-2-0/return-parameter.md): All the return parameters will be concatenated as in html request format by separate with &. Sample return string: Parameters Data Type Descriptions src Text Return bank host status code prc Text Return bank host status code Ord Text Bank Reference Number Holder Text The Holder Name of the Payment Account successcode Number Transaction Status: 0 – Transaction succeeded 1 – Transaction Failure 2 – Transaction Waiting to Confirm Ref Text Merchant‘s Order Reference Number PayRef Number PayDollar/SiamPay/PesoPay Payment Reference Number Amt Number (12,2) Transaction Amount Cur Number (3) Transaction Currency i.e. “344” - HKD AuthId Text Approval Code TxTime Text (YYYY-MM-DD HH:MI:SS.0) Transaction Time errMsg Text Error Message encryptedEmvResponse Text EMV Data Response for EMV transaction only. Initialization vector IV(16) + Encrypted EMV Response Data Select... successcode=0&Ref=Test&PayRef=4780&Amt=1.0&Cur=344&prc=0&src=0&Ord=6697090& Holder=edward&AuthId=123456&TxTime=2003-10-07 17:48:02.0&errMsg=Transaction completed • [PaySDK Android Mobile SDK](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk.md): This section explains integration of PaySDK Android SDK in merchant android mobile application. • [SDK Integration Steps](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/sdk-integration-steps.md): SDK Requirement JAVA SDK Version: 1.8 Android SDK Version: 19 (Minimum), 28 (Target) SDK Configuration Copy PaySDK-2.7.66.aar to libs folder. Add below line to project’s gradle file: Plain text repositories { flatDir { dirs 'libs' } } Add below lines in the dependencies to project’s gradle file: Plain text implementation(name: 'PaySDK-2.7.69', ext: 'aar') Add following libraries Plain text implementation(name: 'alipaySdk-15.6.2-20190416165036', ext: 'aar') implementation 'com.squareup.retrofit2:converter-gson:2.2.0' implementation 'com.google.code.gson:gson:2.3.1' implementation 'org.bouncycastle:bcprov-jdk15on:1.60' implementation 'com.android.volley:volley:1.1.1' implementation 'org.greenrobot:eventbus:3.0.0' implementation 'com.google.android.material:material:1.2.0-alpha04' implementation 'com.google.android.material:material:1.0.0-beta01' implementation 'com.google.android.gms:play-services-ads:17.2.1' implementation 'com.google.android.gms:play-services-location:16.0.0' implementation 'com.google.android.gms:play-services-wallet:16.0.1' implementation 'com.tencent.mm.opensdk:wechat-sdk-android:+' SDK Initialization: Create the paysdk.properties file in the assets folder with the following attributes RSA Public Key(SDK) :- Here you need to specify RSA Public Key value by removing Header and footer of public key. The value will be provided when the merchant apply the SDK service. Plain text e.g. sdk_rsa_publickey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3hOz7Ekyf9YLDJ RzUxJSeFfAxjIW/8Kd8v+tKK/Tc+3KyOHADlV7NYtlGDyoH5dCApUGHrxaYbzV6VzhC+kgQIaL7m jzMXX2uK03QT8Gmcef4C20fUMpy3hrIRH5MR32THNI3IiQG7upkuKhwQSwvEz0PxTeIznCBvSY/7 wgCC6CUhHt+INZYaYpNRiozy39+yHXvgJu4N+I7VQpXJ6b4QjARk6nq6dBlUge4HokZgQzfKL86P JfzOjIDDKABkbZcZ96AL48E1jvgXlqV0ZA2k81IEVQzJxEiuERcPpSTXzB9H3f8+sx8DWxUO/CDI iNI+XOt54sBMelPEFQgEjkCQIDAQAB Note: Naming of property file and its attributes must be same. Declare Object of SDK Plain text PaySDK paySDK; 2. Initialize SDK in a background task, other than main UI thread. For this create an asyn task. For 3D Secure 2.0 transaction, there can be scenario where ACS can ask for more details to authenticate the user. Hence as per the data received from ACS, SDK launch a screen to process challenge User Interface to user. Merchant can customise this UI by putting UI related info like text – font size, font name etc. in UiCustomisation object. Plain text private class initaliseSDK extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) { Factory factory = new com.asiapay.sdk.integration.xecure3ds.Factory(); paySDK = new PaySDK(getApplicationContext()); return ""; } @Override protected void onPostExecute(String result) { //Cancel ProgressDialog if displayed before initializing sdk } @Override protected void onPreExecute() { //show progress dialog if want } @Override protected void onProgressUpdate(Void... values) { } } 3. Call the above async task: Plain text new initaliseSDK().execute(""); • [Webview Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/sdk-integration-steps/webview-payment-call.md): 1) Setup paySDK Configurations: This is to setup PaySDK Configurations using below method. Method Name Plain text paySDK.setPayConfig() Description This method is used to setup the payment configurations like merchantId, environmentType and paymentGateway. Code Sample Plain text paySDK.setPayConfig(Activity activity, PayData payData, String merchantId, EnvBase.EnvType EnvType, EnvBase.PayGate PayGate); Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description activity Yes Activity currentActivity This Parameter is used to setup payData activity for further uses. payData Yes PayData Class payData This Parameter is used to setup payData POJO data. merchantId Yes String 35001282 This Parameter is used to pass merchant id for the payment configuration. EnvType Yes EnvBase.EnvType EnvBase.EnvType.SANDBOX This Parameter is used to setup the environment type. i.e (SANDBOX, PRODUCTION) PayGate Yes EnvBase.PayGate EnvBase.PayGate.PAYDOLLAR This Parameter is used to setup payment Gateway type. i.e (PAYDOLLAR, SIAMPAY, PESOPAY) 2) Setup Payment Data: This is to setup Payment Data using below method. Method Name: Plain text paySDK.setPayData() Description: This method is used to setup the payment basic information like Amount,currency,orderRef,payMethod etc. Code Sample: Plain text paySDK.setPayData(String Amount,EnvBase.Currency currency,EnvBase.PayType payType,String orderRef, String payMethod,EnvBase.PayChannel payChannel,EnvBase.Language language,String remark); Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description Amount Yes String 20.00 This Parameter is used to setup transaction amount. currency Yes EnvBase.Currency EnvBase.Currency.HKD This Parameter is used to setup currency for the transaction. payType Yes EnvBase.PayType EnvBase.PayType.NORMAL_PAYMENT This Parameter is used setup the payment type for the transaction. i.e (NORMAL_PAYMENT, HOLD_PAYMENT) orderRef Yes String 156487515598 This Parameter is used to setup the order reference number for the transaction. payMethod Yes String VISA This Parameter is used to setup payment method for the transaction. payChannel Yes EnvBase.PayChannel EnvBase.PayChannel.WEBVIEW This Parameter is used to setup payment channel for the transaction. i.e (WEBVIEW, DIRECT) language Yes EnvBase.Language EnvBase.Language.ENGLISH This Parameter is used to setup payment language for the transaction. remark No String remark This Parameter is used to setup payment remark for the transaction. 3) Prepare Payment Call : Initialize the PayData object and prepare the payment detail for the transaction. Plain text payData = new PayData(); paySDK.setPayConfig(AuthActivity.this,payData,initConfigManager.getMid("HostedCall"),EnvBase.EnvType.SANDBOX,EnvBase.PayGate.PAYDOLLAR); paySDK.setPayData("1",EnvBase.Currency.HKD,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),"ALL",EnvBase.PayChannel.WEBVIEW, EnvBase.Language.ENGLISH,""); paySDK.setRequestData(payData); 4) Prepare Response Handler : Initialize a payment event handler to capture the payment response and result. Plain text paySDK.responseHandler(new PaymentResponse() { @Override public void getResponse(PayResult payResult) { } @Override public void onError(data: Data) { } }); 5) Trigger the Payment: Call the SDK to trigger the payment process. For WebView flow, it will display a In-App Webview for the payment. Plain text paySDK.process(); WebView Sample : Avoid memory leak :- Here all unused objects will be set to null and clean up the payData and payResult object. Plain text paySDK.cleanMemory(); 6) Setup extra data for specific Payment Services. i.e (Schedule Pay, Promo Pay, Installment Pay, Member Pay) Note: Call follow the same process of (1 to 2) & add the below extra Parameters for specific Payment Services. Payment Services: Title Description Title Payment services name Description Reference Code Installment Pay Installment Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Schedule Pay Schedule Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Member Pay Member Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Promo Pay Promo Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link EVoucher EVoucher is a value added service which can be used by setting extra parameters, please refer the sample code link. Link 7) Optional UIUX components: Below setter methods are payData class members used to set the UIUX component option for webview. Setter Method Title Description Title Description Method Name Data Type Sample Data Description setShowCloseButton() Boolean true If not specified, then by default this value is set to false. setShowToolbar() Boolean false Hide toolbar from Payment Page WebView. If not specified, then by default this value is set to true. setWebViewClosePrompt() String Do you really want to close this page? Use below attribute to customise prompt message which user will see when they decide to close Payment Page setResultPage() String T This Parameter is used to setup the ResultPage. Code Sample: Plain text payData.setShowCloseButton(true); payData.setShowToolbar(true); payData.setWebViewClosePrompt("Do you really want to close this page ?"); payData.setResultPage("T"); 8) Look & Feel Feature: To customize look & feel of toolbar add customization object to paydata before calling process() method. UI Customization Plain text Factory factory = new com.asiapay.sdk.integration.xecure3ds.Factory(); ConfigParameters configParameters = factory.newConfigParameters(); UiCustomization uiCustomization = factory.newUiCustomization(); ToolbarCustomization toolbarCustomization = factory.newToolbarCustomization(); if (toolbarCustomization != null) { toolbarCustomization.setHeaderText("Payment Page"); toolbarCustomization.setBackgroundColor("#ff8000"); toolbarCustomization.setTextColor("#ffffff"); toolbarCustomization.setButtonText("Cancel"); toolbarCustomization.setTextFontName("pacifico.ttf"); uiCustomization.setToolbarCustomization(toolbarCustomization); } payData.setConfigParameters(configParameters); payData.setUiCustomization(uiCustomization); payData.setActivity(AuthActivity.this); paySDK.setRequestData(payData); • [Direct Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/sdk-integration-steps/direct-payment-call.md): 1) Setup paySDK Configuration This is to setup PaySDK Configurations using below method. Method Name Select... paySDK.setPayConfig() Description This method is used to setup the payment configurations like merchantId, environmentType and paymentGateway. Code Sample Select... paySDK.setPayConfig(Activity activity, PayData payData, String merchantId, EnvBase.EnvType EnvType, EnvBase.PayGate PayGate); Parameters Name Mandatory Data Type Sample Data Description activity Yes Activity currentActivity This Parameter is used to setup payData activity for further uses. payData Yes PayData Class payData This Parameter is used to setup payData POJO data. merchantId Yes String 35001282 This Parameter is used to pass merchant id for the payment configuration. EnvType Yes EnvBase.EnvType EnvBase.EnvType.SANDBOX This Parameter is used to setup the environment type. i.e (SANDBOX, PRODUCTION) PayGate Yes EnvBase.PayGate EnvBase.PayGate.PAYDOLLAR This Parameter is used to setup payment Gateway type. i.e (PAYDOLLAR, SIAMPAY, PESOPAY) 2) Setup Payment Data This is to setup Payment Data using below method. Method Name: Select... paySDK.setPayData() Description: This method is used to setup the payment basic information like Amount,currency,orderRef,payMethod etc. Code Sample: Select... paySDK.setPayData(String Amount,EnvBase.Currency currency,EnvBase.PayType payType,String orderRef, String payMethod,EnvBase.PayChannel payChannel,EnvBase.Language language,String remark); Parameters Name Mandatory Data Type Sample Data Description Amount Yes String 20.00 This Parameter is used to setup transaction amount. currency Yes EnvBase.Currency EnvBase.Currency.HKD This Parameter is used to setup currency for the transaction. payType Yes EnvBase.PayType EnvBase.PayType.NORMAL_PAYMENT This Parameter is used setup the payment type for the transaction. i.e (NORMAL_PAYMENT, HOLD_PAYMENT) orderRef Yes String 156487515598 This Parameter is used to setup the order reference number for the transaction. payMethod Yes String VISA This Parameter is used to setup payment method for the transaction. payChannel Yes EnvBase.PayChannel EnvBase.PayChannel.DIRECT This Parameter is used to setup payment channel for the transaction. i.e (WEBVIEW, DIRECT) language Yes EnvBase.Language EnvBase.Language.ENGLISH This Parameter is used to setup payment language for the transaction. remark No String remark This Parameter is used to setup payment remark for the transaction. 3) Prepare Payment Call: Initialize the PayData class and prepare the payment detail for the transaction. Select... payData = new PayData(); paySDK.setPayConfig(AuthActivity.this,payData,initConfigManager.getMid("DirectCall"),EnvBase.EnvType.SANDBOX,EnvBase.PayGate.PAYDOLLAR); paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString(PayMethodKey.VISA),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); CardDetails cardDetails=new CardDetails(); cardDetails.setCardNo("4548890133258926"); cardDetails.setEpMonth("08"); cardDetails.setEpYear("2020"); cardDetails.setSecurityCode("123"); cardDetails.setCardHolder("test Card"); payData.setCardDetails(cardDetails); paySDK.setRequestData(payData); Below setter methods are CardDetails class members used to set the card related values. Setter methods: Method Name Data Typ e Sample Data Description setCardNo() String 1234567890123456 Use to set the card number. setEpMonth() String 07 Use to set card expiry month. setEpYear() String 2023 Use to set card expiry year. setSecurityCode() String 123 This method is used to set credit card verification code. setCardHolder() String test Use to set the card holder name. 4) Prepare Response Handler : Initialize a payment event handler to capture the payment response and result. Select... paySDK.responseHandler(new PaymentResponse() { @Override public void getResponse(PayResult payResult) { } @Override public void onError(data: Data) { } }); 5) Trigger the Payment: Call the SDK to trigger the payment process. Select... paySDK.process(); • [Value Added Services](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services.md) • [Promo Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services/promo-pay.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Promo pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Promo Pay Direct Payment Integration Note: In Step 3 add the below extra data code Plain text Map<String, String> extraData = new HashMap<String, String>(); extraData.put("promotion","T"); extraData.put("promotionCode","TEST1"); extraData.put("promotionRuleCode","TESTR25"); extraData.put("promotionOriginalAmt",""); payData.setExtraData(extraData); • [Member Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services/member-pay.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Member Pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Member Pay Direct Payment Integration For New Member: For Member Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. Add parameter addNewMember. If merchant making payment for first time then value should be true Select... Map<String, String> extraData = new HashMap<String, String>(); extraData.put("memberPay_service","T"); extraData.put("memberPay_memberId","member03"); extraData.put("addNewMember","True"); Note : In Step 3 add the below extra data code For Old Member: Member Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. Add parameter addNewMember. If merchant making payment not for first time then value should be false and below will be extra parameters. Select... Map<String, String> extraData = new HashMap<String, String>(); extraData.put("memberPay_service","T"); extraData.put("memberPay_memberId","member03"); extraData.put("addNewMember","False"); extraData.put("memberPay_token","7ff6c7cc1f03fd9889b000843a77e8f43e4467578926"); payData.setExtraData(extraData); • [Schedule Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services/schedule-pay.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Schedule Pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Schedule Pay Direct Payment Integration Note : In Step 3 add the below extra data code Select... payData = new PayData(); paySDK.setPayConfig(AuthActivity.this,payData,initConfigManager.getMid("SchedulePay"),envType,EnvBase.PayGate.PAYDOLLAR); paySDK.setPayData(textAmount.getEditText().getText().toString(),EnvBase.Currency.HKD,EnvBase.PayType.NORMAL_PAYMENT,textOrderRef.getEditText().getText().toString(),PaySdkEnum.toEnumString(PayMethodKey.VISA),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); Map<String, String> extraData = new HashMap<String, String>(); extraData.put("schType","Day"); // Value could be Day/Month/Year extraData.put("schStatus","Active"); // Value could be Active/Suspend extraData.put("nSch","1"); extraData.put("sMonth","4"); extraData.put("sDay","26"); extraData.put("sYear","2019"); extraData.put("eMonth",""); extraData.put("eDay",""); extraData.put("eYear",""); extraData.put("name","Name"); extraData.put("email","kit@igears.com.hk"); extraData.put("appId","SP"); extraData.put("appRef","2018102409220001"); //appRef should be used only once payData.setExtraData(extraData); • [Installment Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services/installment-payment-call.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Installment WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Installment Direct Payment Integration Note: In Step 3 add the below extra data code Select... Map<String, String> extraData = new HashMap<String, String>(); extraData.put("installment_service","T"); extraData.put("installment_period","6"); extraData.put("installOnly","T"); payData.setExtraData(extraData); • [EVoucher](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/value-added-services/evoucher.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for EVoucher WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for EVoucher Direct Payment Integration Note: In Step 3 add the below extra data code Select... Map<String, String> extraData = new HashMap<String, String>(); extraData.put("eVoucher", "T"); extraData.put("eVClassCode", data.getStringExtra("eVClassCode")); payData.setExtraData(extraData); • [Alipay HK](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/alipay-hk.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Alipay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Alipay Direct Payment Integration Note: In Step 3 Replace the payment Method with the below sample code. Select... paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString(PayMethodKey.ALIPAYHK),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); • [Alipay Global](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/alipay-global.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Alipay Global WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Alipay Global Direct Payment Integration Note: In Step 3 Replace the payment Method with the below sample code. Plain text paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString(PayMethodKey.ALIPAY),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); • [Alipay China](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/alipay-china.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Alipay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Alipay Direct Payment Integration Note: In Step 3 Replace the payment Method with the below sample code. Plain text paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString(PayMethodKey.ALIPAYCN),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); • [WeChat Pay Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/wechat-pay-payment-call.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for WeChat WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for WeChat Direct Payment Integration Note: In Step 3 Replace the payment Method with the below sample code. Plain text paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString( PayMethodKey.WECHAT ),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); • [3DS 2.0 Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/3ds-2-0-payment-call.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for 3DS WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for 3DS Direct Payment Integration Note: In Step 3 Replace the payment Method with the below sample code. Plain text paySDK.setPayData(textAmount.getEditText().getText().toString(),selectedCurrency,EnvBase.PayType.NORMAL_PAYMENT,getOrderRef(),PaySdkEnum.toEnumString(PayMethodKey.THREE_DS_SDK),EnvBase.PayChannel.DIRECT, EnvBase.Language.ENGLISH,""); 3DS Parameters Plain text threeDSParams = new ThreeDSParams(); threeDSParams.setCustomerEmail("example@example.com"); threeDSParams.setMobilePhoneCountryCode("852"); threeDSParams.setMobilePhoneNumber("9000000000"); threeDSParams.setHomePhoneCountryCode("852"); threeDSParams.setHomePhoneNumber("8000000000"); threeDSParams.setWorkPhoneCountryCode("852"); threeDSParams.setWorkPhoneNumber("7000000000"); threeDSParams.setDeliveryEmail("example@example.com"); threeDSParams.setBillingCountryCode("344"); threeDSParams.setBillingState(""); threeDSParams.setBillingCity("Hong Kong"); threeDSParams.setBillingLine1("BillingLine1"); threeDSParams.setBillingLine2("BillingLine2"); threeDSParams.setBillingLine3("BillingLine3"); threeDSParams.setBillingPostalCode("121245"); threeDSParams.setShippingDetails("01"); threeDSParams.setShippingCountryCode("344"); threeDSParams.setShippingState(""); threeDSParams.setShippingCity("Hong Kong"); threeDSParams.setShippingLine1("ShippingLine1"); threeDSParams.setShippingLine2("ShippingLine2"); threeDSParams.setShippingLine3("ShippingLine3"); threeDSParams.setAcctCreateDate("20190401"); threeDSParams.setAcctAgeInd("01"); threeDSParams.setAcctCreateDate("20190401"); threeDSParams.setAcctAgeInd("01"); threeDSParams.setAcctLastChangeDate("20190401"); threeDSParams.setAcctLastChangeInd("01"); threeDSParams.setAcctPwChangeDate("20190401"); threeDSParams.setAcctPwChangeInd("01"); threeDSParams.setAcctPurchaseCount("10"); threeDSParams.setAcctCardProvisionAttempt("0"); threeDSParams.setAcctNumTransDay("0"); threeDSParams.setAcctNumTransYear("1"); threeDSParams.setAcctPaymentAcctDate("20190401"); threeDSParams.setAcctPaymentAcctInd("01"); threeDSParams.setAcctShippingAddrLastChangeDate("20190401"); threeDSParams.setAcctShippingAddrLastChangeInd("01"); threeDSParams.setAcctIsShippingAcctNameSame("T"); threeDSParams.setAcctIsSuspiciousAcct("F"); threeDSParams.setAcctAuthMethod("01"); threeDSParams.setAcctAuthTimestamp("20190401"); threeDSParams.setDeliveryTime("04"); threeDSParams.setPreOrderReason("01"); threeDSParams.setPreOrderReadyDate("20190401"); threeDSParams.setGiftCardAmount("1"); threeDSParams.setGiftCardCurr(EnvBase.Currency.HKD); threeDSParams.setGiftCardCount("1"); List of Parameters merchant can set Title Description apiUsername threeDSAcctCreateDate apiPassword threeDSAcctAgeInd threeDSCustomerEmail threeDSAcctLastChangeDate threeDSDeliveryEmail threeDSAcctLastChangeInd threeDSMobilePhoneCountryCode threeDSAcctPwChangeDate threeDSMobilePhoneNumber threeDSAcctPwChangeInd threeDSHomePhoneCountryCode threeDSAcctPurchaseCount threeDSHomePhoneNumber threeDSAcctCardProvisionAttempt threeDSWorkPhoneCountryCode threeDSAcctNumTransDay threeDSWorkPhoneNumber threeDSAcctNumTransYear threeDSBillingCountryCode threeDSAcctPaymentAcctDate threeDSBillingState threeDSAcctPaymentAcctInd threeDSBillingCity threeDSAcctShippingAddrLastChangeDate threeDSBillingLine1 threeDSAcctShippingAddrLastChangeInd threeDSBillingLine2 threeDSAcctIsShippingAcctNameSame threeDSBillingLine3 threeDSAcctIsSuspiciousAcct threeDSBillingPostalCode threeDSAcctAuthMethod threeDSShippingDetails threeDSAcctAuthTimestamp threeDSShippingCountryCode threeDSDeliveryTime threeDSShippingState threeDSPreOrderReason threeDSShippingCity threeDSPreOrderReadyDate threeDSShippingLine1 threeDSGiftCardAmount threeDSShippingLine2 threeDSGiftCardCurr threeDSShippingLine3 threeDSGiftCardCount Type of Challenge for Payment via 3DS 2.0 Challenge Information TextBox Single and Multi-select Fields Out of Band HTML UI - Customization for Challenge View for Merchant UI-Customization for paySDK Merchant can set the UiCustomization at the paySDK initialization process. Plain text private class initaliseSDK extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) { Factory factory = new com.asiapay.sdk.integration.xecure3ds.Factory(); ConfigParameters configParameters = factory.newConfigParameters(); UiCustomization uiCustomization = factory.newUiCustomization(); paySDK = new PaySDK(AuthActivity.this, configParameters, uiCustomization); return ""; } } • [Pay Method](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/pay-method.md): Setup paySDK Configuration This method is used to setup the payment configurations like merchantId, environmentType and paymentGateway. Code Sample Plain text paySDK.setPayConfig(Activity activity, PayData payData, String merchantId, EnvBase.EnvType EnvType, EnvBase.PayGate PayGate); Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description activity Yes Activity currentActivity This Parameter is used to setup payData activity for further uses. payData Yes PayData Class payData This Parameter is used to setup payData POJO data. merchantId Yes String 35001282 This Parameter is used to pass merchant id for the payment configuration. EnvType Yes EnvBase.EnvType EnvBase.EnvType.SANDBOX This Parameter is used to setup the environment type. i.e (SANDBOX, PRODUCTION) PayGate Yes EnvBase.PayGate EnvBase.PayGate.PAYDOLLAR This Parameter is used to setup payment Gateway type. i.e (PAYDOLLAR, SIAMPAY, PESOPAY) Payment Call Example: Initialize the PayData class and prepare the payment detail for the transaction. Plain text PayData payData = new PayData(); paySDK.setPayConfig(PaymentActivity.this,payData,"35001282",EnvBase.EnvType.SANDBOX,EnvBase.PayGate.PAYDOLLAR); payData.setRemark(" "); paySDK.setRequestData(payData); paySDK.query(EnvBase.Action.PAY_METHOD); Collect Payment Response : Initialize a payment event handler to capture the payment response and result. Plain text //NOTE : For allowed Pay Method Response will come in below format paySDK.payMethodResponseHandler(new PayMethodResponse() { @Override public void getResponse(PayMethodResult payMethodResult) { cancelProgressDialog(); showAlert(payMethodResult.getMethods()); } @Override public void onError(Data data) { cancelProgressDialog(); showAlert(data.getMessage()); } }); Sample Response Plain text { "methods": { "card": [ { "bnk": "CITIBANK", "mth": "AMEX" }, { "bnk": "CITIBANK", "mth": "JCB" }, { "bnk": "CITIBANK", "mth": "Master" }, { "bnk": "SBM", "mth": "UPOP" }, { "bnk": "CITIBANK", "mth": "VISA" } ], "other": [ { "bnk": "ALIPAY", "mth": "ALIPAY" }, { "bnk": "ALIPAY", "mth": "ALIPAYAPP" }, { "bnk": "ALIPAY", "mth": "ALIPAYHKAPP" }, { "bnk": "ALIPAYHK", "mth": "ALIPAYHKONL" }, { "bnk": "UPSRC-BOCHK", "mth": "CUP" }, { "bnk": "HSBC", "mth": "FPS" }, { "bnk": "GRABPAY", "mth": "GRABPAY" }, { "bnk": "GRABPAY", "mth": "GRABPAYOFFL" }, { "bnk": "OCTOPUS", "mth": "OCTOPUS" }, { "bnk": "PAYPAL", "mth": "PAYPAL" }, { "bnk": "HSBC", "mth": "PayMe" }, { "bnk": "TENPAY", "mth": "WECHATAPP" }, { "bnk": "TENPAY", "mth": "WECHATONL" } ] } } • [Transaction Query](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/transaction-query.md): Setup paySDK Configuration This method is used to setup the payment configurations like merchantId, environmentType and paymentGateway. Code Sample Plain text paySDK.setPayConfig(Activity activity, PayData payData, String merchantId, EnvBase.EnvType EnvType, EnvBase.PayGate PayGate); Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description activity Yes Activity currentActivity This Parameter is used to setup payData activity for further uses. payData Yes PayData Class payData This Parameter is used to setup payData POJO data. merchantId Yes String 35001282 This Parameter is used to pass merchant id for the payment configuration. EnvType Yes EnvBase.EnvType EnvBase.EnvType.SANDBOX This Parameter is used to setup the environment type. i.e (SANDBOX, PRODUCTION) PayGate Yes EnvBase.PayGate EnvBase.PayGate.PAYDOLLAR This Parameter is used to setup payment Gateway type. i.e (PAYDOLLAR, SIAMPAY, PESOPAY) Setup Payment Data This method is used to setup the query basic information. Plain text PayData payData = new PayData(); paySDK.setPayConfig(PaymentActivity.this,payData,"35001282",EnvBase.EnvType.SANDBOX,EnvBase.PayGate.PAYDOLLAR); payData.setOrderRef("15786068"); payData.setPayRef("11793068"); payData.setRemark(" "); paySDK.setRequestData(payData); paySDK.query(EnvBase.Action.TX_QUERY); Collect Payment Response : Initialize a payment event handler to capture the payment response and result. Plain text //NOTE : For Trans Query Response will come in below format paySDK.queryResponseHandler(new QueryResponse() { @Override public void getResponse(TransactionStatus transactionStatus) { try { cancelProgressDialog(); showAlert(transactionStatus.getResultCode()); } catch (Exception e) { } } @Override public void onError(Data data) { try { cancelProgressDialog(); showAlert(data.getMessage()); } catch (Exception e) { } } }); Sample Response Plain text { "detail": [ { "alertCode": "null", "amt": "10", "authId": "895033", "cardIssuingCountry": "RU*", "channelType": "DPS", "cur": "344", "eci": "07", "errMsg": "Query Successfully", "holder": "test user", "ipCountry": "IN", "MerchantId": "88146271", "ord": "12345678", "orderStatus": "Accepted", "panFirst4": "4012", "panLast4": "0006", "payMethod": "VISA", "payRef": "5895033", "payerAuth": "U", "prc": "0", "ref": "2018102409220001", "remark": "", "sourceIp": "202.189.254.46", "src": "0", "successcode": "0", "txTime": "2019-09-09 15:29:16.0" } ], "resultCode": "0" } • [Appendix](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/appendix.md) • [PayData properties details](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/appendix/paydata-properties-details.md): Title Description Input Parameters Expected Value and Description setChannel Channel Type (EnvBase.PayChannel) – WebView, Direct setPayGate Name of payment gateway i.e. Paydollar or Pesopay or Siampay setEnvType Production or Sandbox setMerchantID ID received after registration on Asiapay merchant portal setPayType Payment Type (Normal / Hold) setOrderRef Reference number that merchant wants to attach to transaction setPayMethod Payment Method ID - please reference to Integration Guide for detail values setLang Language of Payment Page setCurrency Transaction currency, e.g. HKD, INR etc. setAmount Transaction amount setAddNewMember If merchant making payment for first time then value should be true else false setActivity Reference of the Activity class which is calling Alipay. setRemark More details about transaction to tag it. This is optional. setExtraData Extra Parameter For Installment Pay installment_service – Installment service indicator i.e T/F installment_period - In number of months installOnly - Control the mandatory of installment payment i.e. T / F For Member Pay memberPay_service – MemberPay service indicator I.e T/F memberPay_memberId – Member ID addNewMember – True / False For Promo Pay promotion – Promotion service indicator I.e T/F promotionCode – The promotion campaign code promotionRuleCode – The promotion rule code (Optional) promotionOriginalAmt – The promotion original amount (Optional) For Schedule Pay appId - Application Id appRef - appref is the reference for the whole schedule pay which will be used only one time schType - Schedule Type could be Day/Month/Year schStatus - Schedule Status could be Active/Suspend nSch - Number of schedule sMonth - Schedule start month sDay - Schedule start day sYear - Schedule start year eMonth - Schedule end month eDay - Schedule end day eYear - Schedule end year • [PayResult properties details](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/appendix/payresult-properties-details.md): Title Description PayResult Output Property Parameter Description getSuccesscode Status of transaction. getChannel Channel Type (EnvBase.PayChannel) – WebView, Direct getResultCode Transaction status code. getResultMsg Message to describe more about transaction status. Message may come blank if the transaction status is Success. getOrderID Order ID generated by AsiaPay System getOrderRef Order Reference number set before initializing payment call in PayData object. getBankRef Bank Order Reference number getPrc Primary response code Refer to Integration Guide Appendix A (PRC) getSrc Secondary response code Refer to Integration Guide Appendix A (SRC) getTxTime Transaction Time getAmount Transaction amount getCurrency Transaction currency, e.g. HKD, INR etc. getExtraData Extra Response data getOutTradeNo Transaction number of Alipay for reference. • [EnvBase values details](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-android-mobile-sdk/appendix/class-envbase-values-details.md): Title Description EnvBase Parameter Value and Details PayChannel SDK payment channel WEBVIEW: WebView redirect payment DIRECT: Direct server payment PayGate SDK supported payment gateway PAYDOLLAR: PayDollar SIAMPAY: SiamPay PESOPAY: PesoPay EnvType SDK environment configuration PRODUCTION: Production environment SANDBOX: Sandbox testing environment PayType SDK payment type NORMAL_PAYMENT: Sales payment HOLD_PAYMENT: Authorize payment Currency SDK supported currency list HKD, USD, SGD, RMB, JPY, TWD, AUD, EUR, GBP, CAD, MOP, PHP, THB, MYR, IDR, KRW, BND, NZD, SAR, AED, BRL, INR, TRY, ZAR, VND, DKK, ILS, NOK, RUB, SEK, CHF, ARS, CLP, COP, CZK, EGP, HUF, KZT, LBP, MXN, NGN, PKR, PEN, PLN, QAR, RON, UAH, VEF, LKR, KWD • [PaySDK iOS Mobile SDK](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk.md): This section explains integration of PaySDK iOS SDK in merchant iOS mobile application. Merchant have to provide iOS App bundle ID and android application id to AsiaPay to apple PaySDK service. PaySDK will be sharing unique RSA Public key related to merchant. • [SDK Integration Steps](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/sdk-integration-steps.md): SDK requirement Swift Version: 4.0 and above iOS Version: 11.0 and above SDK Configuration Add AP_PaySDK.framework file into your project by adding the dependencies in Build Phases / Link Binary With Libraries: add the “ AP_PaySDK ” framework OR CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate PaySDK into your Xcode project using CocoaPods, specify it in your Podfile: pod ‘AP_PaySDK’ SDK Initialization Create the paysdk.plist file in the app with the following attributes RSA Public Key( SDK_RSA_Publickey ) :- Here you need to specify the RSA Public Key without header and footer. The value will be provided when the merchant apply the SDK service. e.g NOTE: Naming of property file and its attributes must be same. 2. Import sdk into the class import AP_PaySDK Note - Due to the limitation of App Transport Security(ATS) on http in iOS9.0, we need to add exception for paydollar.com, xecure3d.com, pesopay.com, siampay.com, alipay.com, alipayobjects.com in info.list XML NSAppTransportSecurity NSExceptionDomains paydollar.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy xecure3d.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy pesopay.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy siampay.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy alipay.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy alipayobjects.com NSIncludesSubdomains NSTemporaryExceptionAllowsInsecureHTTPLoads NSTemporaryExceptionMinimumTLSVersion TLSv1.0 NSTemporaryExceptionRequiresForwardSecrecy OR merchant can disable ATS by XML NSAppTransportSecurity NSAllowsArbitraryLoads 3. Add implementation of PaySDK protocol – PaySDKDelegate Swift Code Swift import AP_PaySDK class ViewController: UIViewController , PaySDKDelegate Objective C Objective-C #import <AP_PaySDK/AP_PaySDK.h> #import <AP_PaySDK/AP_PaySDK-Swift.h> @import AP_PaySDK - (void)viewDidLoad { [super viewDidLoad]; . . . 4. Instantiate PaySDK class Swift Code Swift var paySDK = PaySDK.shared Objective C Objective-C paySDK = [PaySDK shared]; 5. Set paySDK delegate Swift paySDK.delegate = self • [WebView Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/sdk-integration-steps/webview-payment-call.md): 1) Setup paySDK Shared Object: This is to share PaySDK class object using below method. Code Sample: Swift Code Swift let paySDK = PaySDK.shared Objective C Objective-C paySDK = [PaySDK shared]; 2) Setup Payment Data: This is to Initialize the PayData class and prepare the payment detail for the transaction. Description: This method is used to setup the payment basic information like channel Type , payGate, envType, merchantId, payType, amount, currency, orderRef, payMethod etc. Code Sample: Swift Code Swift paySDK.paymentDetails = PayData(channelType: PayChannel.WEBVIEW, payGate: PayGate.PAYDOLLAR, envType: EnvType.SANDBOX, merchantId: "1", payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001", payMethod: "VISA", lang: Language.ENGLISH, currCode: Currency.HKD, amount: 10, remark: "", extraData: [:]) Objective C Objective-C paySDK.paymentDetails = [[PayData alloc] initWithChannelType: PayChannelWEBVIEW envType: EnvTypeSANDBOX amount: @"10" payGate: PayGatePAYDOLLAR currCode: CurrencyCodeHKD payType: payTypeNORMAL_PAYMENT orderRef: @"abcde12345" payMethod: @"CC" lang: LanguageENGLISH merchantId: @"1" remark: @"" payRef: @"" resultpage: @"F" showCloseButton: true showToolbar: true webViewClosePrompt: @"Do you really want to close this page?" extraData: nil, merchantCapabilitiesData:nil supportedNetworksData:nil]; Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description amount Yes String 20.00 This Parameter is used to setup transaction amount. payGate Yes enum PayGate.PESOPAY This parameter is used setup the payment gateway fortreansaction. i.e. (PAYDOLLAR, PESOPAY, SIAMPAY) envType Yes enum EnvType.SANDBOX This parameter is used to setup the environment type. i.e. (Sandbox, Production) currCode Yes enum CurrencyCode.HKD This Parameter is used to setup currency for the transaction. merchantId Yes String 1254125 payType Yes enum payType.NORMAL_PAYMENT This Parameter is used setup the payment type for the transaction. i.e (NORMAL_PAYMENT, HOLD_PAYMENT) orderRef Yes String 156487515598 This Parameter is used to setup the order reference number for the transaction. payMethod Yes String VISA This Parameter is used to setup payment method for the transaction. channelType Yes enum PayChannel.DIRECT This Parameter is used to setup payment channel for the transaction. i.e (WEBVIEW, DIRECT) lang Yes enum Language.ENGLISH This Parameter is used to setup payment language for the transaction. remark No String remark This Parameter is used to setup payment remark for the transaction. payRef No String payRef This parameter is used to setup payment reference number transaction. resultPage No Bool resultPage This parameter is used to setup result page transaction showCloseButton No Bool F If not specified, then by default this value is set to false. showToolbar No Bool F This parameter is used to Hide toolbar from Payment Page WebView. If not specified, then by default this value is set to true. webViewClosePrompt No String Do you really want to close this page ? Use below attribute to customise prompt message which user will see when they decide to close Payment Page extraData No Dictionary ["deeplink":"3", "installment_service" : "T"] This parameter is used to setup extraData for the value added service and other services. i.e. (Installment pay, promo pay, member pay, ,Alipay, Union pay) 3) Setup RootViewController: This is for giving the merchant app rootviewcontroller to present webview. It's an optional parameter. Swift Code Swift //For giving the merchant app rootviewcontroller to present webview. It's an optional parameter. paysdk.paymentDetails.presentController = PresentViewController(presentViewController:(UIApplication.shared.keyWindow?.rootViewController)!) Objective C Objective-C //For giving the merchant app rootviewcontroller to present webview. Its an optional parameter. paysdk.paymentDetails.presentController = [[PresentViewController alloc] initWithPresentViewController:[[[UIApplication sharedApplication]keyWindow]rootViewController]]; 4) Trigger the Payment: Call the SDK to trigger the payment process. For WebView flow, it will display a In-App Webview for the payment. Swift Code Swift paySDK.process() Objective C Objective-C [paySDK process]; Insert line aboveInsert line belowDelete 5) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Swift Code Swift func paymentResult(result: PayResult) { } Objective C Plain text - (void)paymentResultWithResult:(PayResult * _Nonnull)result { } WebView Sample: 6) Setup extra data for specific Payment Services. i.e (Schedule Pay, Promo Pay, Installment Pay, Member Pay) Note: Follow the same process of direct and web view payment & add the below extra Parameters for specific Payment Services. Payment Services: Title Description Title Payment services name Description Reference Co de Installment Pay Installment Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Schedule Pay Schedule Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Member Pay Member Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link Promo Pay Promo Pay is a value added service which can be initiated by setting extra parameters, please refer the sample code link. Link EVoucher EVoucher is a value added service which can be used by setting extra parameters, please refer the sample code link. Link • [Direct Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/sdk-integration-steps/direct-payment-call.md): 1) Setup paySDK Shared Object: This is to share PaySDK class object using below method. Code Sample: Swift Code Swift let paySDK = PaySDK.shared Objective C Objective-C paySDK = [PaySDK shared]; 2) Setup Payment Data: Initialise the PayData class and card details then prepare the payment detail for the transaction. Swift Code Swift paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount : “10”, payGate: PayGate.PAYDOLLAR, currCode: currencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001”, payMethod: "VISA", lang: Language.ENGLISH, merchantId: "1", remark: "", extraData :[:]) Objective C Objective-C paySDK.paymentDetails = [[PayData alloc] initWithChannelType:PayChannelDIRECT envType:EnvTypeSANDBOX amount:amountText.text payGate:PayGatePAYDOLLAR currCode:CurrencyCodeHKD payType:payTypeNORMAL_PAYMENT orderRef: orderRef payMethod:@"VISA" lang:LanguageENGLISH merchantId: merchantId remark:@"" payRef:@"" resultpage:resultPage showCloseButton: false showToolbar: false webViewClosePrompt: @"", extraData: nil, merchantCapabilitiesData:nil supportedNetworksData:nil]; Parameters Title Description Title Description Title Name Mandatory Data Type Sample Data Description amount Yes String 20.00 This Parameter is used to setup transaction amount. payGate Yes enum PayGate.PESOPAY This parameter is used setup the payment gateway fortreansaction. i.e. (PAYDOLLAR, PESOPAY, SIAMPAY) envType Yes enum EnvType.SANDBOX This parameter is used to setup the environment type. i.e. (Sandbox, Production) currCode Yes enum CurrencyCode.HKD This Parameter is used to setup currency for the transaction. merchantId Yes String 1254125 payType Yes enum payType.NORMAL_PAYMENT This Parameter is used setup the payment type for the transaction. i.e (NORMAL_PAYMENT, HOLD_PAYMENT) orderRef Yes String 156487515598 This Parameter is used to setup the order reference number for the transaction. payMethod Yes String VISA This Parameter is used to setup payment method for the transaction. channelType Yes enum PayChannel.DIRECT This Parameter is used to setup payment channel for the transaction. i.e (WEBVIEW, DIRECT) lang Yes enum Language.ENGLISH This Parameter is used to setup payment language for the transaction. remark No String remark This Parameter is used to setup payment remark for the transaction. payRef No String payRef This parameter is used to setup payment reference number transaction. resultPage No Bool resultPage This parameter is used to setup result page transaction showCloseButton No Bool F If not specified, then by default this value is set to false. showToolbar No Bool F This parameter is used to Hide toolbar from Payment Page WebView. If not specified, then by default this value is set to true. webViewClosePrompt No String Do you really want to close this page ? Use below attribute to customise prompt message which user will see when they decide to close Payment Page extraData No Dictionary ["deeplink":"3", "installment_service" : "T"] This parameter is used to setup extraData for the value added service and other services. i.e. (Installment pay, promo pay, member pay, ,Alipay, Union pay) 3) Setup cardDetails: Swift Code Swift paySDK. paymentDetails.cardDetails = CardDetails(cardHolderName: “abc abc”, cardNo: "4918914107195011”, expMonth: “11”, expYear: “2011”, securityCode: “123”) Objective C Objective-C paySDK.paymentDetails.cardDetails = [[CardDetails alloc] initWithCardHolderName:@"Test Card" cardNo:@"4918914107195011", expMonth:@"11", expYear:@"2011", securityCode:@"123"]; Card Details Parameters Title Description Title Description Parameter Name Data Typ e Sample Data Description cardNo String 1234567890123456 Use to set the card number. expMonth String 07 Use to set card expiry month. expYear String 2023 Use to set card expiry year. securityCode String 123 This method is used to set credit card verification code. cardHolderName String test Use to set the card holder name. 4) Trigger the Payment: Call the SDK to trigger the payment process. For WebView flow, it will display a In-App Webview for the payment. Swift paySDK.process() Objective C Objective-C [paySDK process]; 5) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Swift Code Swift func paymentResult(result: PayResult) { } Objective C Objective-C Objective-C- (void)paymentResultWithResult:(PayResult * _Nonnull)result { } • [UI Customization](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/sdk-integration-steps/ui-customization.md): UiCustomization class is used for customization of the UI according to the app. This class is inherited class of PaySDKUiCustomization. You can customize the ToolbarCustomization , LabelCustomization , TextBoxCustomization , ButtonCustomization ToolbarCustomization ToolbarCustomization class is used for customization of the toolbar according to the app toolbar. This class is inherited class of Customization, PaySDKToolbarCustomization. You can customize the text font name, text color, text font size, backgroundtColor, header Text and rightBarButtonText. LabelCustomization LabelCustomization class is used for customization of the label according to the app label. This class is inherited class of Customization, PaySDKLabelCustomization. You can customize the text font name, text color, text font size, headingTextColor, headingTextFontName and headingTextFontSize. TextBoxCustomization TextBoxCustomization class is used for customization of the textbox according to the app. This class is inherited class of Customization, PaySDKTextBoxCustomization. You can customize the text properties of text box like textFontName, textColor, textFontSize and textbox properties like borderWidth, borderColor, cornerRadius . ButtonCustomization ButtonCustomization class is used for customization of the button according to the app. This class is inherited class of Customization, PaySDKButtonCustomization. You can customize the text properties of button like textFontName, textColor, textFontSize and button properties like backgroundColor, cornerRadius. Code Sample Swift Code Swift let customization = UiCustomization() let submitButtonCustomization = ButtonCustomization("Courier", "#FF0000", 15, "#d3d3d3", 4) let resendButtonCustomization = ButtonCustomization("Courier", "#FF0000", 15, "#d3d3d3", 4) let cancelButtonCustomization = ButtonCustomization("Courier", "#FF0000", 15, "#d3d3d3", 4) let nextButtonCustomization = ButtonCustomization("Courier", "#FF0000", 15, "#d3d3d3", 4) let continueButtonCustomization = ButtonCustomization("Courier", "#FF0000", 15, "#d3d3d3", 4) let labelCustomization = LabelCustomization("Courier", "FF0000", 14, "FF0000", "Courier", 20) let textboxCustomization = TextBoxCustomization("Courier", "#FF0000", 14, 5, "#d3d3d3", 4) let toolBarCustomization = ToolbarCustomization("Courier", "#FFFFFF", 20, "#000000", "Header Text", "Close Button Text") try! customization.setButtonCustomization(submitButtonCustomization, .SUBMIT) try! customization.setButtonCustomization(resendButtonCustomization, .RESEND) try! customization.setButtonCustomization(cancelButtonCustomization, .CANCEL) try! customization.setButtonCustomization(nextButtonCustomization, .NEXT) try! customization.setButtonCustomization(continueButtonCustomization, .CONTINUE) try! customization.setLabelCustomization(labelCustomization) try! customization.setTextBoxCustomization(textboxCustomization) try! customization.setToolbarCustomization(toolBarCustomization) paySDK.uiCustomization = customization Objective C Objective-C UiCustomization *customization = [[UiCustomization alloc] init]; ButtonCustomization *submitButtonCustomization = [[ButtonCustomization alloc] init:@"Courier" :@"#FF0000" :15 :@"#d3d3d3" :4]; ButtonCustomization *resendButtonCustomization = [[ButtonCustomization alloc] init:@"Courier" :@"#FF0000" :15 :@"#d3d3d3" :4]; ButtonCustomization *cancelButtonCustomization = [[ButtonCustomization alloc] init:@"Courier" :@"#FF0000" :15 :@"#d3d3d3" :4]; ButtonCustomization *nextButtonCustomization = [[ButtonCustomization alloc] init:@"Courier" :@"#FF0000" :15 :@"#d3d3d3" :4]; ButtonCustomization *continueButtonCustomization = [[ButtonCustomization alloc] init:@"Courier" :@"#FF0000" :15 :@"#d3d3d3" :4]; LabelCustomization *labelCustomization = [[LabelCustomization alloc] init:@"Courier" :@"#FF0000" :14 :@"#FF0000":@"Courier" :20]; TextBoxCustomization *textBoxCustomization = [[TextBoxCustomization alloc] init:@"Courier" :@"FF0000" :14 :4 :@"FF0000" :4]; // ToolbarCustomization *toolbarCustomization = [[ToolbarCustomization alloc] init:@"Courier" :@"#FFFFFF" :20 :@"#000000" :@"Payment Page"]; NSError *err; [customization setLabelCustomization:labelCustomization error:&err]; [customization setButtonCustomization:submitButtonCustomization : PaySDKButtonTypeSUBMIT error:&err]; [customization setButtonCustomization:resendButtonCustomization : PaySDKButtonTypeRESEND error:&err]; [customization setButtonCustomization:cancelButtonCustomization : PaySDKButtonTypeCANCEL error:&err]; [customization setButtonCustomization:nextButtonCustomization : PaySDKButtonTypeNEXT error:&err]; [customization setButtonCustomization:continueButtonCustomization : PaySDKButtonTypeCONTINUE error:&err]; [customization setLabelCustomization:labelCustomization error:&err]; [customization setTextBoxCustomization:textBoxCustomization error:&err]; //[customization setToolbarCustomization:toolbarCustomization error:&err]; [paySDK setUiCustomization:customization]; • [Promo Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/value-added-services/promo-pay.md): For Promo Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Promo Pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Promo Pay Direct Payment Integration. Note: In Step 2 Replace the payment Method with the below sample code. Swift Code Swift extraData: ["promotion": "T", "promotionCode": "TEST1", "promotionRuleCode" : "TESTR25", "promotionOriginalAmt":""] Objective C Objective-C extraData: @{@"promotion": @"T", @"promotionCode": @"TEST1", @"promotionRuleCode" : @"TESTR25",//"TESTR50" @"promotionOriginalAmt": @"5"} • [Member Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/value-added-services/member-pay.md): For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Member Pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Member Pay Direct Payment Integration For New Member: For Member Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. Add parameter addNewMember. If merchant making payment for first time then value should be true Swift Code Swift extraData: ["addNewMember": true "memberPay_service": "T", "memberPay_memberId": "MPTEST_1", "memberId":"MPTEST_1”] Objective C Objective-C extraData: @{@"addNewMember": true, @"memberPay_service": @"T", @"memberPay_memberId": @"MPTEST_1", @"memberId": "MPTEST_1"} For Old Member: For Member Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. Add parameter addNewMember. If merchant making payment not for first time then value should be false and below will be extra parameters. Swift Code Swift extraData: ["addNewMember": false, "memberPay_service": "T", "memberPay_memberId": "MPTEST_1", "memberId":"MPTEST_1", "token":"8de18f7b17fabe5bb682e792e319c0e411b528f58926"] Objective C Objective-C extraData: @{@"addNewMember": false, @"memberPay_service": @"T", @"memberPay_memberId": @"MPTEST_1", @"memberId": @"MPTEST_1", @"token": @"8de18f7b17fabe5bb682e792e319c0e411b528f58926"} • [Schedule Pay](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/value-added-services/schedule-pay.md): For Schedule Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Schedule Pay WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Schedule Pay Direct Payment Integration Note: In Step 2 Replace the payment Method with the below sample code. Swift Code Swift extraData: ["appId" : "SP", "appRef" : "2018102409220001", "schType" : "Day", "schStatus" : "Active", "nSch" : "1", "sMonth" : "4", "sDay" : "26", "sYear" : "2019", "eMonth" : "", "eDay" : "", "eYear" : "", "name" : "Name", "email" : "kit@igears.com.hk"] Objective C Objective-C extraData: @{@"appId" : @"SP", @"appRef" : @"txtOrderRef.text!", @"schType" : @"Day", @"schStatus" : @"Active", @"nSch" : @"1", @"sMonth" : @"4", @"sDay" : @"26", @"sYear" : @"2019", @"eMonth" : @"", @"eDay" : @"", @"eYear" : @"", @"name" : @"Name", @"email" : @"name@abc.com"} • [Installment Payment](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/value-added-services/installment-payment.md): For Installment Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call. For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for Installment Payment Integration. For Direct Payment Call Integration Steps Direct Payment Call : Use Direct Payment Call Step 1 to 5 for Installment Payment Integration Note: In Step 2 Replace the payment Method with the below sample code. Swift Code Swift SwiftextraData: ["installment_service " : "T", "installment_period": 3, "installOnly": "T"] Objective C Objective-C extraData: @{@"installment_service" : @"T", @"installment_period" : @6, @"installOnly": @"T"} • [EVoucher](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/value-added-services/evoucher.md): For Promo Pay Payment, initialize the PayData class and prepare the payment detail for the transaction same as in with Webview and Direct Payment Call and add below parameters. For WebView Integration Steps: WebView Payment Call : Call WebView Step 1 to 5 for EVoucher WebView Payment Integration. For Direct Payment Call Integration Steps: Direct Payment Call : Use Direct Payment Call Step 1 to 5 for EVoucher Direct Payment Integration. Note: In Step 2 Replace the payment Method with the below sample code. Swift Code Swift extraData = ["eVoucher": "T", "eVClassCode": "0001"] Objective C Objective-C extraData: @{@"eVoucher": @"T", @"eVClassCode": @"0001"}; • [Alipay Global Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/alipay-global-payment-call.md): 1)Initialization Step: a) Add URL Type in info .plist file b) In AppDelegate file add Swift var paySDK = PaySDKClass.shared AND Swift func application(_ app: UIApplication, open url: URL, options:[UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { paySDK.processOrder(url: url) return true; } 2) Prepare Payment Call: Initialize the PayData class and prepare the payment detail for the transaction. Swift paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount: 0.1, payGate: PayGate.PAYDOLLAR, currCode: currencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001", payMethod: "ALIPAYAPP", lang: Language.ENGLISH, merchantId: "1", remark: "test", extraData : [:]) 3) Trigger the Payment: Call the SDK to trigger the payment process. Plain text paySDK.process() If app is installed on device then get response in AppDelegate openurl function Plain text func application(_ app: UIApplication, open url: URL, options:[UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { paySDK.processOrder(url: url) return true; } 4) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Plain text func paymentResult(result: PayResult) { } • [Alipay HK Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/alipay-hk-payment-call.md): 1)Initialization Step: Add URL Type in info .plist file 2. In AppDelegate file add Swift var paySDK = PaySDKClass.shared AND Swift func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { paySDK.processOrder(url: url) return true; } 2) Prepare Payment Call: Call the SDK to trigger the payment process. Plain text paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount: 0.1, payGate: PayGate.PAYDOLLAR, currCode: currencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001", payMethod: "ALIPAYHKAPP", lang: Language.ENGLISH, merchantId: "1", remark: "test", extraData : [:]) 3) Trigger the Payment: Call the SDK to trigger the payment process. Plain text paySDK.process() If app is installed on device then get reponse in AppDelegate openurl function Plain text func application(_ app: UIApplication, open url: URL, options:[UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { paySDK.processOrder(url: url) return true; } 4) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Plain text func paymentResult(result: PayResult) { } This method returns object of PayResult class. • [Alipay China Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/alipay-china-payment-call.md): 1)Initialization Step: 1. Add URL Type in info .plist file 2. In AppDelegate file add Plain text var paySDK = PaySDKClass.shared And Plain text func application(_ app: UIApplication, open url: URL, options:[UIApplication.OpenURLOptionsKey : Any ] = [:]) -> Bool { paySDK.processOrder(url: url) return true } 2) Prepare Payment Call: Initialize the PayData class and prepare the payment detail for the transaction. Plain text paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount: 0.1, payGate: PayGate.PAYDOLLAR, currCode: currencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001", payMethod: "ALIPAYCNAPP", lang: Language.ENGLISH, merchantId: "1", remark: "test", extraData : [:]) 3) Trigger the Payment: Call the SDK to trigger the payment process. Plain text paySDK.process() If app is installed on device then get reponse in AppDelegate openurl function Plain text func application(_ app: UIApplication, open url: URL, options:[UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { paySDK.processOrder(url: url) return true; } 4) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Plain text func paymentResult(result: PayResult) { } • [WeChat Pay Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/wechat-pay-payment-call.md): Merchant must provide application bundle id and universal link of app (optional) to PayDollar/SiamPay/PesoPay. PayDollar/SiamPay/PesoPay will provide app key for WeChat Pay services. 1)Initialization Step Add URL Type in info .plist file XML LSApplicationQueriesSchemes weixinULAPI weixin CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName weixin CFBundleURLSchemes WECHAT-APP-ID In AppDelegate file add Swift var paySDK = PaySDKClass.shared func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool{ paySDK.processOrder(url: url) return true; } 2) Prepare Payment Call: Initialize the PayData class and prepare the payment detail for the transaction. Swift Code Plain text paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount: 0.1, payGate: PayGate.PAYDOLLAR, currCode: CurrencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001", payMethod: "WECHATAPP", lang: Language.ENGLISH, merchantId: "1", remark: "test", payRef: "", resultpage: @"F", showCloseButton: false, showToolbar: true, webViewClosePrompt: "", extraData: ["weChatUniversalLink":"https://<domain-name>.com"]) paySDK.process() Objective C Objective-C NSDictionary *dic = @{@"wechatUniversalLink": @"https://<domain-name>.com"}; extraData = [[NSMutableDictionary alloc] initWithDictionary: dic]; paySDK.paymentDetails = [[PayData alloc] initWithChannelType: PayChannelDIRECT envType: EnvTypeSANDBOX amount: @"1.0" payGate: PayGatePAYDOLLAR currCode: CurrencyCodeHKD payType: payTypeNORMAL_PAYMENT orderRef: @"2018102409220001" payMethod: @"WECHATAPP" lang: LanguageENGLISH merchantId: @"1" remark: @"" payRef: @"" resultpage: @"F" showCloseButton: false showToolbar: true webViewClosePrompt: @"" extraData: extraData]; [paySDK process]; 3)Trigger the Payment: Call the SDK to trigger the payment process. Plain text paySDK.process() 4) Prepare Response Handler: Initialize a payment event handler to capture the payment response and result. Swift func paymentResult(result: PayResult) {} • [3DS 2.0 Payment Call](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/3ds-2-0-payment-call.md): 1)Prepare Payment Call: Initialize the PayData class and card details then prepare the payment detail for the transaction. Swift paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount : “10”, payGate: PayGate.PAYDOLLAR, currCode: CurrencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001”, payMethod: "THREEDS2", lang: Language.ENGLISH, merchantId: "1", remark: "", payRef: "", resultpage: "F", showCloseButton: false, showToolbar: true, webViewClosePrompt: "", extraData: [:]) paySDK.paymentDetails.cardDetails = CardDetails(cardHolderName: “abcabc”, cardNo: "4918914107195011”, expMonth: “11”, expYear: “2011”, securityCode: “123”) var threeDSParams = ThreeDSParams() threeDSParams.threeDSCustomerEmail = "example@example.com" . . . threeDSParams.threeDSDeliveryEmail = "example1@example.com" paySDK.paymentDetails.threeDSParams = threeDSParams paySDK.process() Objective C Objective-C ThreeDSParams *threeDSParams = [[ThreeDSParams alloc] init]; threeDSParams.threeDSCustomerEmail = @"example@example.com"; . . . threeDSParams.threeDSDeliveryEmail = @"example@example.com"; paySDK.paymentDetails.threeDSParams = threeDSParams; paySDK.paymentDetails = [[PayData alloc] initWithChannelType: PayChannelWEBVIEW envType: EnvTypeSANDBOX amount: @"1" payGate: PayGatePAYDOLLAR currCode: CurrencyCodeHKD payType: payTypeNORMAL_PAYMENT orderRef: orderRef payMethod: @"THREEDS2" lang: LanguageENGLISH merchantId: @"1234" remark: @"123" payRef: @"" resultpage: @"F" showCloseButton: false showToolbar: true webViewClosePrompt: @"Do you really want to close this page?" extraData: nil]; //For giving the merchant app rootviewcontroller to present webview. Its an optional parameter. paysdk.paymentDetails.presentController = [[PresentViewController alloc] initWithPresentViewController:[[[UIApplication sharedApplication]keyWindow]rootViewController]]; [paySDK process]; List of Parameters merchant can set Title Description apiUsername threeDSAcctCreateDate apiPassword threeDSAcctAgeInd threeDSCustomerEmail threeDSAcctLastChangeDate threeDSDeliveryEmail threeDSAcctLastChangeInd threeDSMobilePhoneCountryCode threeDSAcctPwChangeDate threeDSMobilePhoneNumber threeDSAcctPwChangeInd threeDSHomePhoneCountryCode threeDSAcctPurchaseCount threeDSHomePhoneNumber threeDSAcctCardProvisionAttempt threeDSWorkPhoneCountryCode threeDSAcctNumTransDay threeDSWorkPhoneNumber threeDSAcctNumTransYear threeDSBillingCountryCode threeDSAcctPaymentAcctDate threeDSBillingState threeDSAcctPaymentAcctInd threeDSBillingCity threeDSAcctShippingAddrLastChangeDate threeDSBillingLine1 threeDSAcctShippingAddrLastChangeInd threeDSBillingLine2 threeDSAcctIsShippingAcctNameSame threeDSBillingLine3 threeDSAcctIsSuspiciousAcct threeDSBillingPostalCode threeDSAcctAuthMethod threeDSShippingDetails threeDSAcctAuthTimestamp threeDSShippingCountryCode threeDSDeliveryTime threeDSShippingState threeDSPreOrderReason threeDSShippingCity threeDSPreOrderReadyDate threeDSShippingLine1 threeDSGiftCardAmount threeDSShippingLine2 threeDSGiftCardCurr threeDSShippingLine3 threeDSGiftCardCount Type of Challenge for Payment via 3DS 2.0 Challenge Information TextBox Single and Multi-select Fields Out of Band HTML UI - Customization for Challenge View for Merchant • [Pay Method](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/pay-method.md): Swift Code This method is used to setup the payment configurations like merchantId, environmentType and paymentGateway. Swift paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount :“1”, payGate: PayGate.PAYDOLLAR, currCode: CurrencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001”, payMethod: "VISA", lang: Language.ENGLISH, merchantId: "88146271", remark: "", payRef: "", resultpage: "F", showCloseButton: false, showToolbar: true, webViewClosePrompt: "", extraData : []) paySDK.query(action: "PAYMENT_METHOD") //NOTE : For allowed Pay Method Response will come in below format func payMethodOptions(method: PaymentOptionsDetail) { //process the method } } Objective C Code Objective-C paySDK.paymentDetails = [[PayData alloc] initWithChannelType: PayChannelNONE envType: EnvTypeSANDBOX amount: @"1" payGate: PayGatePAYDOLLAR currCode: CurrencyCodeHKD payType: payTypeNORMAL_PAYMENT orderRef: "2018102409220001”, payMethod: @"ALL" lang: LanguageENGLISH merchantId: @"1" remark: @"123" payRef: @"" resultpage: resultPage showCloseButton: false showToolbar: true webViewClosePrompt: @"" extraData: nil]; [paySDK queryWithAction:@"PAYMENT_METHOD"]; //NOTE : For allowed Pay Method Response will come in below format (void)payMethodOptionsWithMethod:(PaymentOptionsDetail * _Nonnull)method { //process the method } Sample Response Plain text { "methods": { "card": [ { "bnk": "CITIBANK", "mth": "AMEX" }, { "bnk": "CITIBANK", "mth": "JCB" }, { "bnk": "CITIBANK", "mth": "Master" }, { "bnk": "SBM", "mth": "UPOP" }, { "bnk": "CITIBANK", "mth": "VISA" } ], "other": [ { "bnk": "ALIPAY", "mth": "ALIPAY" }, { "bnk": "ALIPAY", "mth": "ALIPAYAPP" }, { "bnk": "ALIPAY", "mth": "ALIPAYHKAPP" }, { "bnk": "ALIPAYHK", "mth": "ALIPAYHKONL" }, { "bnk": "UPSRC-BOCHK", "mth": "CUP" }, { "bnk": "HSBC", "mth": "FPS" }, { "bnk": "GRABPAY", "mth": "GRABPAY" }, { "bnk": "GRABPAY", "mth": "GRABPAYOFFL" }, { "bnk": "OCTOPUS", "mth": "OCTOPUS" }, { "bnk": "PAYPAL", "mth": "PAYPAL" }, { "bnk": "HSBC", "mth": "PayMe" }, { "bnk": "TENPAY", "mth": "WECHATAPP" }, { "bnk": "TENPAY", "mth": "WECHATONL" } ] } } • [Transaction Query](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/transaction-query.md): Swift Code Swift paySDK.paymentDetails = PayData(channelType: PayChannel.DIRECT, envType: EnvType.SANDBOX, amount :“1”, payGate: PayGate.PAYDOLLAR, currCode: CurrencyCode.HKD, payType: payType.NORMAL_PAYMENT, orderRef: "2018102409220001”, payMethod: "VISA", lang: Language.ENGLISH, merchantId: "88146271", remark: "", payRef: "", resultPage: "F" showCloseButton: false, showToolbar: true, webViewClosePrompt: "", extraData : [:]) paySDK.query(action:"TX_QUERY") //NOTE : For Trans Query Response will come in below format func transQueryResults(result: TransQueryResults) { //PROCESS RESPONSE } Objective C Code Objective-C paySDK.paymentDetails = [[PayData alloc] initWithChannelType: PayChannelDIRECT envType: EnvTypeSANDBOX amount: @"1" payGate: PayGatePAYDOLLAR currCode: CurrencyCodeHKD payType: payTypeNORMAL_PAYMENT orderRef: @"2018102409220001" payMethod: @"ALL" lang: LanguageENGLISH merchantId: merchantId remark: @"123" payRef: @"" resultpage: @"F" showCloseButton: false showToolbar: true webViewClosePrompt: @"" extraData: nil]; [paySDK queryWithAction:@"TX_QUERY"]; //NOTE : For Trans Query Response will come in below format - (void)transQueryResultsWithResult:(TransQueryResults * _Nonnull)result { //PROCESS RESPONSE } Sample Response Plain text { "detail": [ { "alertCode": "null", "amt": "10", "authId": "895033", "cardIssuingCountry": "RU*", "channelType": "DPS", "cur": "344", "eci": "07", "errMsg": "Query Successfully", "holder": "test user", "ipCountry": "IN", "MerchantId": "88146271", "ord": "12345678", "orderStatus": "Accepted", "panFirst4": "4012", "panLast4": "0006", "payMethod": "VISA", "payRef": "5895033", "payerAuth": "U", "prc": "0", "ref": "2018102409220001", "remark": "", "sourceIp": "202.189.254.46", "src": "0", "successcode": "0", "txTime": "2019-09-09 15:29:16.0" } ], "resultCode": "0" } • [PayResult properties details](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/appendix/payresult-properties-details.md): Title Description Input Parameters Expected Value and Description channelType Channel Type (PayChannel) – WebView payGate Name of payment gateway i.e. Paydollar or Pesopay or Siampay envType Production or Sandbox merchantId ID received after registration on Asiapay merchant portal payType Payment Type (Normal / Hold) orderRef Reference number that merchant wants to attach to transaction payMethod Payment Method ID - please reference to Integration Guide for detail values lang Language of Payment Page currency Transaction currency, e.g. HKD, INR etc. amount Transaction amount remark More details about transaction to tag it. This is optional. extraData Extra Parameter For Installment Pay installment_service – installment service indicator i.e. T / F installment_period – In number of months installOnly – Control the mandatory of installment payment i.e. T / F For Schedule Pay appId - Application Id appRef - appref is the reference for the whole schedule pay which will be used only one timecardHolder - Name available on card schType - Schedule Type e.g. Day / Month /Year schStatus - Schedule Status e.g. Active / Suspended nSch - Number of schedule sMonth - Schedule start month sDay - Schedule start day sYear - Schedule start year eMonth - Schedule end month eDay - Schedule end day eYear - Schedule end year For Member Pay addNewMember – false or true memberPay_ service - T or F memberPay_memberId - Member Id actionType - Generate Token memberId - Member Id memberPay_Token – Static Token For Promo Pay promotion – Promotion service indicator i.e T/F promotionCode – The promotion campaign code promotionRuleCode – The promotion rule code (Optional) promotionOriginalAmt – The promotion original amount (Optional) • [EnvBase values details](https://developer.asiapay.com/integration-guide/mobile-integration/paysdk-ios-mobile-sdk/appendix/envbase-values-details.md): Title Description EnvBase Parameter Value and Details PayChannel SDK payment channel WEBVIEW: WebView redirect payment DIRECT: Direct server payment PayGate SDK supported payment gateway PAYDOLLAR: PayDollar SIAMPAY: SiamPay PESOPAY: PesoPay EnvType SDK environment configuration PRODUCTION: Production environment SANDBOX: Sandbox testing environment PayType SDK payment type NORMAL_PAYMENT: Sales payment HOLD_PAYMENT: Authorize payment Currency SDK supported currency list HKD, USD, SGD, RMB, JPY, TWD, AUD, EUR, GBP, CAD, MOP, PHP, THB, MYR, IDR, KRW, BND, NZD, SAR, AED, BRL, INR, TRY, ZAR, VND, DKK, ILS, NOK, RUB, SEK, CHF, ARS, CLP, COP, CZK, EGP, HUF, KZT, LBP, MXN, NGN, PKR, PEN, PLN, QAR, RON, UAH, VEF, LKR, KWD • [Server Side Direct Connection](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection.md): Please click the below link for Server Side Direct Connection information. https://developer.asiapay.com/integration-guide/web-integration/server-side-direct-connection • [Integration Parameters](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters.md): The following are the parameters for integration. Our payment gateway system is case sensitive. Make sure the typeface is correct. When a transaction is finish, the system will return customer a payment message on the page created by merchant. • [Required Parameter](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters/required-parameter.md): Required Parameter ( with UTF-8 Encoding ) for connect to our payment interface Title Description Title Parameters Data Type Descriptions orderRef Text (35) Merchant‘s Order Reference Number amount Number (12,2) Total amount your want to charge the customer [ Up to 2 decimal place ] Remark: mpsMode = MCP, the amount should be calculated in base currency. currCode Text (3) The currency of the payment: “344” – HKD “840” – USD “702” – SGD “156” – CNY (RMB) “392” – JPY “901” – TWD “036” – AUD “978” – EUR “826” – GBP “124” – CAD “446” – MOP “608” – PHP “764” – THB “458” – MYR “360” – IDR “410” – KRW “682” – SAR “554” – NZD “784” – AED “096” – BND “704” – VND “356” – INR Remark: mpsMode = MCP, the currCode value should be in base currency. lang Text (1) The language of the payment page : “E” - English merchantId Number The merchant ID we provide to you payType Text (1) (“N”,”H”) The payment type: “N” – Normal Payment (Sales) “H” – Hold Payment (Authorize only) For merchants who use authorize mode, please be reminded to perform the CAPTURE action as soon as the transaction is confirmed as valid. Once captured, the customer's credit card will be debited in coming bank settlement processing. If the merchant does not capture/reverse the authorized transaction over 14 days, the credit limit will be released to the cardholder after a time period which is subjected to card issuing bank Merchant may capture/reverse the authorized transaction in the merchant administration site > Operation > Transaction Detail. pMethod Text The payment method type “ALIPAYAPP” – Alipay Global App “ALIPAYCNAPP” – Alipay China App “ALIPAYHKAPP” – Alipay HK App “WECHATAPP” – WeChat Pay App “WECHATONL” – WeChat Pay QR “WECHATMP” – WeChat Pay with MiniProgram “FPS” – FPS App 2 App or FPS QR “OCTOPUS” – Octopus App 2 App • [Billing Information](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters/optional-parameters/billing-information.md): Optional Parameter for Billing Information Title Description Title Parameters Data Type Descriptions billingFirstName Text(60) First name of customer billingLastName Text(60) Last name of customer billingStreet1 Text(40) Address of customer billingStreet2 Text(40) Address of customer ,only mandatory if address exceed 40 billingCity Text(50) City billingState Text(2) Mandatory if customer’s country is USA or Canada billingPostalCode Text(10) Mandatory if customer’s country is USA or Canada billingCountry Text(2) Eg.HK billingEmail Text(255) Email address custIPAddress Text(15) 192.168.180.100 • [Connect to our payment interface](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters/optional-parameters/connect-to-our-payment-interface.md): Optional Parameter for connecting to our payment interface Title Description Title Parameters Data Type Descriptions remark Text (50) An additional remark field that will appear in the confirmation email and transaction detail report to help you to refer the order secureHash Text (40) Secure hash is used to authenticate the integrity of the transaction information and the identity of the merchant. It is calculated by hashing the combination of various transaction parameters and the Secure Hash Secret. *Applies to merchants who registered this function only. For more information, please refer to section 4. payMode Text(2) Payment Mode “EC” - Electronic Commerce (Default) “MO” - Mail Order “RC” - Recurring “RT” - Retail orderPhoneNo Text(30) Phone Number of order • [Device Wallet](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters/optional-parameters/device-wallet.md): Optional Parameter for using Device Wallet Title Description Title Parameters Data Type Descriptions eWalletService Text (“T”,”F”) eWallet service indicator “T” for device wallet payment “F” for other payment eWalletBrand Text (10) The value of the device wallet type: “APPLEPAY” – Apple Pay “SAMSUNG” – Samsung Pay “GOOGLE” – Google Pay™ eWalletPaymentData Text Retrieved device wallet payment data from related SDK with Base64 Format • [WeChat MiniProgram](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/integration-parameters/optional-parameters/wechat-miniprogram.md): Title Description Title Parameters Data Type Descriptions oAuth Text WeChat client Open ID retrieve from merchant MiniProgram • [Return Parameters](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/return-parameters.md): All the return parameters will be concatenated as in html request format by separate with &. Sample return string: Title Description Title Parameters Data Type Descriptions src Number Return bank host status code prc Number Return bank host status code Ord Number Bank Reference Number Holder Text The Holder Name of the Payment Account successcode Number Transaction Status: 0 – Transaction succeeded 1 – Transaction Failure 2 – Transaction Pending (for App–2–App integration) Ref Text Merchant‘s Order Reference Number PayRef Number PayDollar/SiamPay/PesoPay Payment Reference Number Amt Number (12,2) Transaction Amount Cur Number (3) Transaction Currency i.e. “360” - IDR AuthId Text Approval Code TxTime Text (YYYY-MM-DD HH:MI:SS.0) Transaction Time errMsg Text Return Message or Data from payment method Plain text successcode=0&Ref=Test&PayRef=4780&Amt=1.0&Cur=344&prc=0&src=0&Ord=6697090& Holder=edward&AuthId=123456&TxTime=2003-10-07 17:48:02.0&errMsg=Transaction completed • [Kick Off](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/server-side-direct-connection/kick-off.md): After the integration has been completed, it is ready to launch your e-commerce web to serve your customers. Please copy the following TESTING URL for Direct Connect Server Post method: Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/directPay/payComp.jsp SiamPay https://test.siampay.com/b2cDemo/eng/directPay/payComp.jsp PesoPay https://test.pesopay.com/b2cDemo/eng/directPay/payComp.jsp Base URL Title Description Payment Gateway SandBox PayDollar https://test.paydollar.com/b2cDemo/eng/directPay SiamPay https://test.siampay.com/b2cDemo/eng/directPay PesoPay https://test.pesopay.com/b2cDemo/eng/directPay As different type of programming language have different syntax, so we just propose the method to connect to our payment page. To connect, we suggest you to use server side posting: Sample code for server post by using java: Plain text // Set up the post data String postData = "merchantId=1&orderRef=test&amount=1&currCode=344&pMethod=VISA&epMonth=01&epYear=2002&cardNo=4123412341234123&cardholder=Edward&remark=test”; // Post to payment page strResult = ServerPost.post(postData, https://test.paydollar.com/b2cDemo/eng/directPay/payComp.jsp ); // Extract the payment status from strResult ... // Finish ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** public class ServerPost { static public String post(String ip_postData, String ip_pageUrl) { try { String strResult = ""; URL url = new URL(ip_pageUrl); URLConnection con = url.openConnection(); //from secure site if (con instanceof com.sun.net.ssl.HttpsURLConnection) { ((com.sun.net.ssl.HttpsURLConnection) con).setSSLSocketFactory (SSLSocketFactory) SSLSocketFactory.getDefault()); } con.setDoOutput(true); con.setDoInput(true); // Set request headers for content type and length con.setRequestProperty( "Content-type", "application/x-www-form-urlencoded"); con.setRequestProperty( "Content-length", String.valueOf(ip_postData.length())); // Issue the POST request OutputStream outStream = con.getOutputStream(); outStream.write(ip_postData.getBytes()); outStream.flush(); // Read the response InputStream inStream = con.getInputStream(); while (true) { int c = inStream.read(); if (c == -1) break; strResult = strResult + String.valueOf((char) c); } inStream.close(); outStream.close(); return strResult; } catch (Exception e) { System.out.print(e.toString()); return null; } } } * All the source code in this document are the property of AsiaPay (HK) Limited. Any use, modification and adaptation to the code should be reported to and approved by AsiaPay (HK) Limited. AsiaPay (HK) Limited do not have any liability in any lose to the party using the source code. • [Alipay](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/alipay.md): Alipay Global App Alipay China App Alipay HK App 1. Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection. 2. PayDollar/SiamPay/PesoPay will return related transaction information at parameter “errMsg”. 3. Set the content at “errMsg” to the Alipay SDK “order information” string. Call Payment API Payment API needs to be called in a new thread. (Reference alipay_demo) It is required to call the payment API in a new thread. (Reference alipay_demo) Get PayTask payment object to pay (pay or authorize activity needs to be executed in non-ui thread), code demo: Plain text final String orderInfo = info; // order information 4. Initialize Alipay SDK and handle the response. 5. PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Related SDK document: Alipay Global: https://global.alipay.com/docs/ac/app/sdk_integration Alipay HK: https://global.alipay.com/docs/ac/app_hk/sdkintegration Alipay China: https://opendocs.alipay.com/open/204/105296 • [WeChat Pay App](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/wechat-pay-app.md): 1. Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection. 2. PayDollar/SiamPay/PesoPay will return related transaction information at parameter “ errMsg ”. successful “ errMsg ” format: Plain text appId|nonceStr|package|partnerId|prepayId|timeStamp|sign|end 3. Split the “ errMsg ” with using “|” and put the data to WeChat SDK with the corresponding variable. Plain text PayReq *request = [[PayReq alloc] init] autorelease]; request.partnerId = @"10000100"; request.prepayId = @"110100000140415649af9fc314aa427"; request.package = @"Sign=WXPay"; request.nonceStr = @"462b76e7436e98e0ed6e13c64b4fd1c"; request.timeStamp = @"1397527777"; request.sign = @"582282d72dd2b03ad892830965f428cb16e7a256"; [WXApi safeSendReq:request]; Please note that it's essential to be cautious with any sensitive or real payment data. Always 4. Submit the SDK request. 5. PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Related SDK document • [WeChat Pay QR](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/wechat-pay-qr.md): Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection with using parameter pMethod with value “ WECHATONL ” PayDollar/SiamPay/PesoPay will return the WeChat Pay QR payment token at parameter “ errMsg ” with base64 format. Merchant decode the “ errMsg ” with base64 and convert the payment token to QR image. Merchant display the QR and allow client to send to complete the payment. Merchant can listen the payment result with using Order API Query function or wait the datafeed response at the merchant backend server After payment complete, PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Related SDK document • [WeChat Pay with MiniProgram](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/wechat-pay-with-miniprogram.md): 1. Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection with using parameter pMethod with value “ WECHATMP ” and oAuth with the value of WeChat MiniProgram Client Open ID retrieved from Merchant MiniProgram App 2. PayDollar/SiamPay/PesoPay return the WeChat Pay MiniProgram payment required value at parameter "errMsg" and pack the value with "|" and end with word " end " Plain text // For Acquirers except Allinpay in China Format: {appid}|{noncestr}|{package}|{partnerId}|{prepayid}|{timestamp}|{sign}|end Example: wxf0a8469573f4f917|1513064644|prepay_id=wx2017033010242291fcfe0db70013231072|1380530002|wx2017033010242291fcfe0db70013231072|1560841986|7725BD8CAC7838EEE7AACBE3CCA311F2|end // For Allinpay in China only Format: {appid}|{noncestr}|{package}|{empty}|{prepayid}|{timestamp}|{signType}|{sign}|end Example: wxf0a8469573f4f917|1513064644|prepay_id=wx2017033010242291fcfe0db70013231072||wx2017033010242291fcfe0db70013231072|1560841986|RSA|7725BD8CAC7838EEE7AACBE3CCA311F2|end // For Acquirers except Allinpay in China Format: {appid}|{noncestr}|{package}|{partnerId}|{prepayid}|{timestamp}|{sign}|end Example: wxf0a8469573f4f917|1513064644|prepay_id=wx2017033010242291fcfe0db70013231072|1380530002|wx2017033010242291fcfe0db70013231072|1560841986|7725BD8CAC7838EEE7AACBE3CCA311F2|end // For Allinpay in China only Format: {appid}|{noncestr}|{package}|{empty}|{prepayid}|{timestamp}|{signType}|{sign}|end Example: wxf0a8469573f4f917|1513064644|prepay_id=wx2017033010242291fcfe0db70013231072||wx2017033010242291fcfe0db70013231072|1560841986|RSA|7725BD8CAC7838EEE7AACBE3CCA311F2|end 3. Merchant decode the “ errMsg ” and set the WeChat Pay parameters to MiniProgram function "wx.requestPayment" 4. WeChat response the result to the MiniProgram and send backend response to PayDollar/SiamPay/PesoPay server. 5. After payment complete, PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. WeChat Mini Program Sample Call: Plain text // For Acquirers except Allinpay in China wx.requestPayment( { 'timeStamp': '1560841986', 'nonceStr': '1513064644', 'package': 'prepay_id=wx2017033010242291fcfe0db70013231072', 'signType': 'MD5', 'paySign': '7725BD8CAC7838EEE7AACBE3CCA311F2', 'success':function(res){}, 'fail':function(res){}, 'complete':function(res){} }) // For Allinpay in China only wx.requestPayment( { 'timeStamp': '1560841986', 'nonceStr': '1513064644', 'package': 'prepay_id=wx2017033010242291fcfe0db70013231072', 'signType': 'RSA', 'paySign': 'k9WTnD6mZFUQNA/sr9MBt3PEhnLkULOCVIEsY60JZAEJgRRZVPrGmWEOgSdUaV6SQPYQqa6u2pu8tDzGw938TE+J9DNesSDvS+WjZp+KRwL/zTLEqOeu44fnrcBJ9w5dwpOxEBlfYzGIYmjB2EXVTz86N68RIJmA83INI/Z7gCO42BLZwU97qaXI9M+EBpDHImGcC1xggloRHgJ1rpeN/00JA35PLj9NXakMGxOt6myoGiSEZxgXwJbuVt4npiOcUKr23g1IuFusuRBmFJI+p3sLAtwFs09psi4rZnTLaQ3Ofp3cKKTWJIR/CoQ9cg1PHQirRJmCvVO7nIbrbxsKfA==', 'success':function(res){}, 'fail':function(res){}, Related SDK Document • [Google Pay™](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/google-pay-tm.md): By using PayDollar Google Pay™ service, please use the below configuration at the Google Pay™ SDK configuration. " gateway ": "asiapay" " gatewayMerchantId ": "PayDollar/SiamPay/PesoPay Merchant Id" For the below configuration, please contact the PayDollar/SiamPay/PesoPay support team about it. It is related to the acquirer bank and your account supported. Android : getAllowedCardNetworks getAllowedCardAuthMethods Web: allowedAuthMethods allowedCardNetworks For the detail, please reference to the following URL: https://developers.google.com/pay/api/android/reference/request-objects#PaymentMethod Steps: 1. Follow the Google Pay™ SDK integration guide with using PayDollar/SiamPay/PesoPay provided configuration values 2. Implement Google Pay™ and prepare the payment token a. Android: At the Google Pay™ SDK function handlePaymentSuccess Plain text /** PaymentData response object contains the payment information, as well as any additionalrequested information, such as billing and shipping address.@param paymentData A response object returned by Google after a payer approves payment.@see PaymentData */ private void handlePaymentSuccess(PaymentData paymentData) {// Token will be null if PaymentDataRequest was not constructed using fromJson(String). final String paymentInfo = paymentData.toJson(); if (paymentInfo == null) { return; } } Encode the paymentInfo with Base64 format Plain text byte[] byteString=paymentInfo.getBytes("UTF-8"); String base64encodedString= android.util.Base64.encodeToString(byteString, Base64.NO_WRAP); b. Web: Follow the Google Pay™ JavaScript integration guide and retrieve the paymentToken at processPayment function. Plain text /** * Process payment data returned by the Google Pay API * * @param {object} paymentData response from Google Pay API after user approves payment * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData} */ function processPayment(paymentData) { // show returned data in developer console for debugging console.log(paymentData); // @todo pass payment token to your gateway to process payment paymentToken = paymentData.paymentMethodData.tokenizationData.token; }</script> <script async src="https://pay.google.com/gp/p/js/pay.js" onload="onGooglePayLoaded()"></script> Send the paymentToken to the merchant server and encode it with Base64 format Plain text byte[] byteString=paymentToken.getBytes("UTF-8"); String base64encodedString= java.util.Base64.getEncoder().encodeToString(byteString); 3. Submit the payment request to PayDollar Server Side Direct Connection with the following parameter: eWalletPaymentData : Encoded Base64 payment token String eWalletService : T eWalletBrand : GOOGLE 4. PayDollar will send the data feed to merchant server for the final transaction result. Please read and accept the following policy for Google Pay ™ Google Pay™ API Acceptable Use Policy Google Pay™ API Terms of Service Related SDK document: Android Web • [Apple Pay](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/apple-pay.md): 1. Follow the Apple account configuration step to create Apple merchant ID and upload the acquiring bank certificate to the account. 2. Follow the Apple Pay SDK integration step and get the Apple Pay token data ( PKPayment ) The actions on your server vary depending on whether you process your own payments or work with a payment platform. In both cases, your server handles the order and sends a status back to the device, which your delegate passes to its completion handler, as described in Processing Payments. Plain text (void) paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment completion:(void (^)(PKPaymentAuthorizationStatus))completion { NSError *error; ABMultiValueRef addressMultiValue = ABRecordCopyValue(payment.billingAddress, kABPersonAddressProperty); NSDictionary *addressDictionary = (__bridge_transfer NSDictionary *) ABMultiValueCopyValueAtIndex(addressMultiValue, 0); NSData *json = [NSJSONSerialization dataWithJSONObject:addressDictionary options:NSJSONWritingPrettyPrinted error:&error]; // ... Send payment token, shipping and billing address, and order information to your server ...PKPaymentAuthorizationStatus status; // From your server completion(status); } 3. Convert the PKPayment object to JSON format and encode it with Base64 format Example JSON for PKPayment: Plain text { "token":{ "paymentMethod":{ "displayName":"Visa 1234", "network":"Visa", "type":"1" }, "transactionIdentifier":"xxxxxxxxxxxx", "paymentData":{ "header":{ "publicKeyHash":"xxxxxxxxxxxx", "ephemeralPublicKey":"xxxxxxxxxxxxxxxxxxxxx", "transactionId":"xxxxxxxxxxxxxx" }, "signature":"xxxxxxx", "version":"EC_v1", "data":"xxxxxxxxxxx" } } } 4. Submit the payment request to PayDollar Server Side Direct Connection with the following parameter: eWalletPaymentData : Encoded Base64 PKPayment eWalletService : T eWalletBrand : APPLEPAY 5. PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Related SDK documents: https://developer.apple.com/documentation/passkit/ https://developer.apple.com/library/archive/ApplePay_Guide/index.html#//apple_ref/doc/uid/TP40014764-CH1-SW1 • [FPS QR](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/fps-qr.md): Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection with using parameter pMethod with value “ FPS ” PayDollar/SiamPay/PesoPay will return the FPS QR payment token at parameter “ errMsg ” with base64 format. Merchant decode the “ errMsg ” with base64 and convert the payment token to QR image. Merchant display the QR and allow client to send to complete the payment. Merchant can listen the payment result with using Order API Query function or wait the datafeed response at the merchant backend server After payment complete, PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. • [FPS APP 2 APP](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/fps-app-2-app.md): 1. Merchant APP request FPS transaction and send request to Merchant Server 2. Merchant Server send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection. 3. PayDollar will return the FPS payment token at parameter “ errMsg ” with base64 format. 4. Merchant Generate an URL to allow the payment Application to retrieve the token. Merchant Server can decode base64 and store the FPS payment token or use API to retrieve the token from PayDollar. URL must be in HTTPS and with sub-domain “fps.”, for example: https://fps.xxxxxx.xxx Sub-domain must be applied HKPost e-Cert and main domain name must be matched Merchant name at HKPost e-Cert must be TOTALLY matched with the Merchant FPS account name HKPost e-Cert must not be expired Example URL: https://fps.merchant.com/order/123456 Response: Plain text 000201010212304701156490328544319410210111031831303101110318313520470115303 76454032.05802TH5908SCB Test6007BANGKOK6277011011103183130315518176489697698052320200714032241394 0000000713OON111031831363048814 5. Merchant Server return the URL to the Merchant APP and call payment request to the “hk.com.hkicl” with the above URL. 6. Supported Bank / Payment APP will be triggered and Client complete the payment. 7. PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Merchant App Flow Android iOS • [Octopus](https://developer.asiapay.com/integration-guide/mobile-integration/ewallet-direct-connection/sdk-integration-step/octopus.md): 1. Send the related order information to PayDollar/SiamPay/PesoPay Server Side Direct Connection. 2. PayDollar/SiamPay/PesoPay will return related transaction URI with Base64 format at parameter “ errMsg ”. successful “ errMsg ” format: Plain text Base64(octopus payment URI) Example: data = octopus://payment?token=ysadsxs errMsg = b2N0b3B1czovL3BheW1lbnQ/dG9rZW49eXNhZHN4cw== 3. Decode the errMsg with Base64 to retrieve the Octopus payment URI. 4. Pass the Octopus payment URI to the application to trigger the payment. 5. PayDollar/SiamPay/PesoPay will send the data feed to merchant server for the final transaction result. Sample Code Android : Plain text public final static int OCTOPUS_APP_REQUEST_CODE = 10000; // This CODE is subject to change by SI List<PackageInfo> packs = getPackageManager().getInstalledPackages(0); boolean hasOctopusApp = false; for (int i = 0; i < packs.size(); i++) { PackageInfo p = packs.get(i); if (p.packageName.contains("com.octopuscards.nfc_reader")) { hasOctopusApp = true; } } if (hasOctopusApp) { // Make payment request to OOS // ...... // method to get the URI in response data. String octopusuri = getOctopusURI(.....) // if installed package is OctopusApp Intent intent = new Intent(Intent.ACTION_VIEW, Uri .parse(octopusuri)); startActivityForResult(intent, OCTOPUS_APP_REQUEST_CODE); } else { // don't have any octopus app. prompt to Google Play for download // ...... } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode OCTOPUS_APP_REQUEST_CODE && resultCode.RESULT_OK) { } } iOS: Plain text // decode octopus payment token from the PayDollar response let decodedData = Data(base64Encoded: str, options: .ignoreUnknownCharacters) // sample decoded value : octopus://payment?token=1234567 let octopusPaymentUrl = String(data: decodedData!, encoding: .utf8)! // build the return deeplink let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as! String let appReturnUrl = appName + "://octopus/return" // build the octopus payment url let cURL = URL(string: octopusPaymentUrl! + "&return=" + appReturnUrl)! // check octopus app installed or not var canOpen : Bool = UIApplication.shared.canOpenURL(cURL) if canOpen == true { UIApplication.shared.open(cURL, options: [:]) { (res) in print("Octopus app open response: (res)") } } else { // display app not installed or redirect client to App Store } • [Data Feed Handling](https://developer.asiapay.com/integration-guide/data-feed-handling.md): To use data feed function, merchant has to create a data feed page and inform payment gateway system about the location of your page (e.g. http://www.yourdomain.com/datafeed.jsp ). Merchant can enable or disable this function in the merchant administration site. • [Data Feed Output](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/data-feed-output.md): Title Description Title Parameters Data Type Descriptions src Text Return bank host status code (secondary). Please refer to Appendix A for detail. prc Text Return bank host status code (primary). Please refer to Appendix A for detail. Ord Text (40) Bank Reference Number Holder Text The Holder Name of the Payment Account successcode Number 0- succeeded, 1- failure, 2-pending, Others - error Ref Text Merchant‘s Order Reference Number PayRef Number PayDollar/SiamPay/PesoPay Payment Reference Number Amt Number (12,2) Transaction Amount Cur Text (3) Transaction Currency i.e. “344” – HKD “840” – USD “702” – SGD “156” – CNY (RMB) “392” – JPY “901” – TWD “036” – AUD “978” – EUR “826” – GBP “124” – CAD “446” – MOP “608” – PHP “764” – THB “458” – MYR “360” – IDR “410” – KRW “682” – SAR “554” – NZD “784” – AED “096” – BND “704” – VND “356” – INR remark Text (200) A remark field for you to store additional data that will not show on the transaction web page AuthId Text Approval Code eci Text (2) ECI value (for 3D enabled Merchants) VISA / JCB / AMEX ECI Value Definition 05 Both cardholder and card issuing bank are 3D enabled. 3D card authentication is successful 06 Either cardholder or card issuing bank is not 3D enrolled. 3D card authentication is unsuccessful, in sample situations as: 3D cardholder not enrolled Card issuing bank is not 3-D Secure ready 07 Authentication is unsuccessful or not attempted. The credit card is either a non-3D card or card issuing bank does not handle it as a 3D transaction MasterCard ECI Value Definition 00 Authentication is unsuccessful or not attempted. The credit card is either a non-3D card or card issuing bank does not handle it as a 3D transaction 01 Either cardholder or card issuing bank is not 3D enrolled. 3D card authentication is unsuccessful, in sample situations as: 3D Cardholder not enrolled Card issuing bank is not 3-D Secure ready 02 Both cardholder and card issuing bank are 3D enabled. 3D card authentication is successful Remark : Empty String will be sent when the transaction is rejected by PayDollar PayAlert. payerAuth Text (1) Payer Authentication Status Y - Card is 3-D secure enrolled and authentication succeeds. N - Card is 3-D secure enrolled but authentication fails. P - 3-D Secure check is pending A - Card is not 3-D secure enrolled yet U - 3D-secure check is not processed. If using 3DS 2.0, it is the “Transaction Status” returned in Authentication Response or “Transaction Status” returned in Result Response. Y - Authentication/ Account Verification Successful N - Not Authenticated /Account Not Verified; Transaction denied U - Authentication/ Account Verification Could Not Be Performed A - Attempts Processing Performed C - Challenge Required R - Authentication/ Account Verification Rejected sourceIp Text (15) IP address of payer ipCountry Text (3) Country of payer ( e.g. HK) if country is on high risk country list, an asterisk will be shown (e.g. MY*) payMethod Text (20) Payment method (e.g. VISA, Master, Diners, JCB, AMEX) cardIssuingCountry Text (3) Card Issuing Country Code ( e.g. HK) if country is on high risk country list, an asterisk will be shown (e.g. MY*) if the card issuing country of credit card is undefined, “- -“ will be shown. Please refer to Appendix A “List of Country Code” for detail channelType Text (3) Channel Type: SPC – Client Post Through Browser DPC – Direct Client Side Connection DPS – Server Side Direct Connection SCH – Schedule Payment DPL – Direct Payment Link Connection MOT – Moto Connection RTL – RetailPay Connection BPP – Batch Payment Process secureHash Text (40) Secure hash is used to authenticate the integrity of the response information and the identity of PayDollar/SiamPay/PesoPay. It is calculated by hashing the combination of various response parameters and the Secure Hash Secret. *Applies to merchants who registered this function only. For more information, please refer to section 4. AlertCode Text (50) The Alert Code e.g. R14 –IP Country not match with Issuing Country R 9 - In high risk country list MerchantId Number The merchant Id of transaction airline_ticketNumber Text Air Ticket Number TxTime Text (YYYY-MM-DD HH:MI:SS.0) Transaction time Javascript // sample data prc=0&src=0&Ord=12345678&Ref=8e88729be67a4722aa34537db4d0ae99&PayRef=11868042&successcode=0&Amt=80.00&Cur=840&Holder=testing+card&AuthId=868042&AlertCode=&remark=&eci=07&payerAuth=U&sourceIp=203.184.197.67&ipCountry=HK&payMethod=VISA&TxTime=2023-11-22+09%3A23%3A14.0 • [Card Information](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/card-information.md): Additional output parameters for Card Information Title Description Title Parameters Data Type Descriptions expMonth Text (MM) Expiry month of the card *Return to approved merchant only expYear Text (YYYY) Expiry year of the card *Return to approved merchant only panFull Text Encrypted PAN with AES256 encryption *Return to approved merchant only panFirst6 Text (6) First 6 digit of card *Return to approved merchant only panFirst4 Text (4) First 4 digit of card *Return to approved merchant only panLast4 Text (4) Last 4 digit of card *Return to approved merchant only accountHash Text Hash value of card *Return to approved merchant only accountHashAlgo Text Hash function of card: SHA-1 SHA-256 *Return to approved merchant only • [MPS VAS](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/mps-vas.md): Additional output parameters for transaction processing with MPS VAS Title Description Title Parameters Data Type Descriptions mpsAmt Number (12,2) MPS Transaction Amount Remark: For MPS Enabled only. mpsCur Text (3) MPS Transaction Currency Remark: For MPS Enabled only. mpsForeignAmt Number (12,2) MPS Transaction Foreign Amount Remark: For MPS Enabled only. mpsForeignCur Text (3) MPS Transaction Foreign Currency Remark: For MPS Enabled only. mpsRate Number (12,4) MPS Exchange Rate: (Foreign / Base) e.g. USD / HKD = 7.77 Remark: For MPS Enabled only. • [SchedulePay VAS](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/schedulepay-vas.md): Additional output parameters for transaction processing with SchedulePay VAS Title Description Title Parameters Data Type Descriptions mSchPayId Number The Master Schedule Payment Id *For Schedule payment transaction only dSchPayId Number The Detail Schedule Payment Id *For Schedule payment transaction only • [MemberPay VAS](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/memberpay-vas.md): Additional output parameters for transaction processing with MemberPay VAS Title Description Title Parameters Data Type Descriptions mpMemberId Text Member Id if merchant using memberPay mpLatestStaticToken Text Encrypted static token if merchant using static token mode of memberPay • [Third Party eWallet](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/third-party-ewallet.md): Additional output parameters for transaction processing through Third Party eWallet Title Description Title Parameters Data Type Descriptions isEwallet Text(1) “T” –This is a transaction with Ewallet function eWalletBrand Text ECO - AMEX Express checkout MP – MasterPass VCO – VISA Checkout eWalletInd Text Only Text(3) for MasterPass EWallet, The Wallet Indicator is returned by the wallet platform and must be passed to the payment processor/acquirer in the financial authorization transaction. • [Promopay VAS](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/promopay-vas.md): Additional output parameters for transaction processed with Promopay VAS Title Description Title Parameters Data Type Descriptions promotionCode Text(8); The promotion campaign code of transaction *For promotion transaction only promotionRuleCode Text(8); The promotion rule code of transaction *For promotion transaction only promotionOriginalAmt Number (12,2) The original amount of promotion *For promotion transaction only • [Installment](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/installment.md): Additional output parameters for installment transaction Title Description Title Parameters Data Type Descriptions period Number The installment period (In number of months) installmentProvider Text The issuing bank or provider of the installment “HASE” – Hang Seng Bank (Hong Kong) “BOCIHK” – Bank of China (Hong Kong) “BCA” - Bank Central Asia (Indonesia) “WELEND” – WeLend (Hong Kong) firstPayAmt Number The transaction amount for first installment period *Return only if the installment bank providing this information eachPayAmt Number The transaction amount for each installment period *Return only if the installment bank providing this information lastPayAmt Number The transaction amount for last installment period *Return only if the installment bank providing this information • [Rewards Program](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/rewards-program.md): Additional output parameters for transaction processed with rewards program (e.g. Hang Seng Cash Dollar) Title Description Title Parameters Data Type Descriptions netAmtAfterRewards Number(12,2) Total Net Amount after Redeem Rewards Program rewardsRedeemTotalAmt Number(12,2) Total Rewards Redeem Amount rewardsRedeemType Text Rewards Redeem Type “HASE” – Hang Seng Cash Dollar rewardsRedeemProgram Number Number of redeem programs Return value is 1,2, or 3 rewardsRedeemCode1 Text First Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemLabel1 Text First Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemAmt1 Number(12,2) First Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsBalance1 Text First Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemCode2 Text Second Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemLabel2 Text Second Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemAmt2 Text Second Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsBalance2 Text Second Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemCode3 Text Third Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 3 rewardsRedeemLabel3 Text Third Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 3 rewardsRedeemAmt3 Number(12,2) Third Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 3 rewardsBalance3 Text Third Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 3 • [3DS 2.0](https://developer.asiapay.com/integration-guide/data-feed-handling/output-parameters/3ds-2-0.md): Additional output parameters for 3DS 2.0 Title Description Title Parameters Data Type Descriptions threeDSVersion Text (10) Indicate the 3DS Version if 3D-Secure is processed in this payment. “” – Non 3D “1.0” – Using 3DS 1.0 “2.1.0” / “2.2.0” – Using 3DS 2.0 (depends on the actual message version used in 3DS 2.0 message) The data feed page must meet the following requirement: Print ‘OK’ in HTML when data captured (ACK message) Make Sure to Print ‘OK’ for acknowledge to our system first then do the rest of your system process, if something wrong with your system process (i.e. download photo, ring tone problem) you can send a void request to our system, for more details please refer to our API guide and contact our technical staff. Please note that the system only supports either port 80 (HTTP) or 443 (HTTPS) for the data feed page location. And make sure the data feed page location is externally accessible, so that our server can call the data feed page. * Since the system will read from the data feed page for the word ‘OK’ to determine whether the (data feed) message is delivered or not, if this word does not return successfully, the system will assume the data feed is lost • [Data Feed Setup](https://developer.asiapay.com/integration-guide/data-feed-handling/data-feed-setup.md): Merchant can enable or disable the data feed function in the merchant administration site > Profile > Payment Options. • [Sample Data Feed Page](https://developer.asiapay.com/integration-guide/data-feed-handling/sample-data-feed-page.md): The following is a sample data feed page in JSP. Java <%@ page language="java" %> <% String successCode = request.getParameter("successcode"); String payRef = request.getParameter("PayRef"); String Ref = request.getParameter("Ref"); // Print out 'OK' to notify us you have received the payment result out.print("OK"); if ( successCode.equals("0") ) { // Transaction Accepted // *** Add the Security Control here, to check the currency, amount with the // *** merchant’s order reference from your database, if the order exist then // *** accepted otherwise rejected the transaction. // Update your database for Transaction Accepted and send email or notify your // customer. .... // In case if your database or your system got problem, you can send a void transaction request. See API guide for more details } else { // Transaction Rejected // Update your database for Transaction Rejected ..... } %> The following is a sample data feed page in ASP Plain text <%@ Language = "VBScript" %> <% Dim successCode Dim payRef Dim Ref successCode = Request.Form("successcode") payRef = Request.Form("PayRef") Ref = Request.Form("Ref") ' Print out 'OK' to notify us you have received the payment result Response.write("OK") If successCode = "0" Then ' Transaction Accepted ' *** Add the Security Control here, to check the merchantId, currency, amount with the ' *** merchant’s order reference from your database, if the order exist then ' *** accepted otherwise rejected the transaction. ' Update your database for Transaction Accepted and send email or notify your ' customer. ..... ' In case if your database or your system got problem, you can send a void ' transaction request. See API guide for more details Else ' Transaction Rejected ' Update your database for Transaction Rejected ..... End If <%@ Language = "VBScript" %> <% Dim successCode Dim payRef Dim Ref successCode = Request.Form("successcode") payRef = Request.Form("PayRef") Ref = Request.Form("Ref") ' Print out 'OK' to notify us you have received the payment result Response.write("OK") If successCode = "0" Then ' Transaction Accepted ' *** Add the Security Control here, to check the merchantId, currency, amount with the ' *** merchant’s order reference from your database, if the order exist then ' *** accepted otherwise rejected the transaction. ' Update your database for Transaction Accepted and send email or notify your ' customer. ..... ' In case if your database or your system got problem, you can send a void ' transaction request. See API guide for more details Else ' Transaction Rejected ' Update your database for Transaction Rejected ..... End If • [Data Feed Validation](https://developer.asiapay.com/integration-guide/data-feed-handling/data-feed-validation.md): When a Data Feed response is received, merchants must validate the transaction details before updating the order status or fulfilling the order . The following information should be verified: Description Parameter Validation Merchant ID Verify the Merchant ID matches your assigned Merchant ID. Merchant Reference (`Ref`) Verify the order exists and matches the original transaction. Amount Verify the payment amount matches the original order amount. Currency Verify the payment currency matches the original transaction. Important Do not mark an order as successful based solely on successCode = "0" . The transaction should only be accepted after all validation checks have been completed successfully. • [Introduction](https://developer.asiapay.com/integration-guide/transaction-security-by-secure-hash/introduction.md): The purpose of Secure Hash is to enhance the transaction message communication security between merchant site and our payment gateway system. By employing this technology, the integrity of the information and the identity of the signatory can be authenticated with industry standard. For all transaction request send from merchant site to our payment gateway, secure hash should be calculated and added to the transaction request to authenticate the integrity of the transaction information and the identity of the merchant. The secure hash is calculated by hashing the following parameters using SHA-1 or SHA-256, a cryptographic hash function of industry standard. Merchant ID Merchant Reference Number Currency Code Amount Payment Type Secure Hash Secret – Assigned by our payment gateway system to merchant When the transaction request is received, our payment gateway verifies the transaction by comparing the secure hash submitted by merchant and the secure hash re-calculated by other input parameters. If both values are the same, existing payment flow will follows. Or else, the payment request will be dropped. Our payment gateway system will send out an email to notify the merchant through the operation contact. After the transaction is completed, our payment gateway will send out datafeed to merchant site. A secure hash will also be calculated by hashing the following parameters using SHA-1 or SHA-256, Src Prc Success Code Merchant Reference Number Payment Gateway Reference Number Currency Code Amount Payer Authentication Status Secure Hash Secret After receiving the datafeed, merchant is suggested to verify the information by comparing the secure hash posted by our payment gateway and the secure hash re-calculated by other response parameters. If the values doesn’t matched, the datafeed may have been tampered within the redirection process and you are suggested to do further investigation before confirmation the order. • [Client Library](https://developer.asiapay.com/integration-guide/transaction-security-by-secure-hash/client-library.md): Client library is provided by our payment gateway system to facilitate the secure hash generation and verification process. It supports common programming language including Java, PHP, ASP, ASP.NET. The following function calls are supported. Title Description Title Functions Parameters Descriptions generateSecureHash Input Merchant ID Merchant Reference Number Currency Code Amount Payment Type Secure Hash Secret Output Secure Hash String Create a secure hash using the input parameters and Secure Hash Secret. (The result secure hash should be included in the payment parameter send to our payment gateway.) verifyDatafeed Input Src Prc Success Code Merchant Reference Number Payment Gateway Reference Number Currency Code Amount Payer Authentication Status Secure Hash Secret Output True/False Verify the parameters passed from our payment gateway using input parameters and Secure Hash Secret. (If the result of the output is true, it is verified that the result is sent from our payment gateway system and it is safe to trust the result.) *Please login to our payment gateway Merchant Administration Tools and download client library with sample code under Support Developer Corner. • [Manual Secure Hashing](https://developer.asiapay.com/integration-guide/transaction-security-by-secure-hash/manual-secure-hashing.md): Merchant may also generate and verify secure hash manually, without using the client library provided by our payment gateway. The following diagrams list out the exact algorithm. Plain text Generate Secure Hash Create the signing data string. Signing data string = Merchant ID + “|” + Merchant Reference + “|” + Currency Code + “|” + Amount + “|” + Payment Type + “|” + Secure Hash Secret Secure Hash = SHA-1 or SHA-256 (Signing data string) *SHA-1 is the original 160-bit hash function (default). Example of Secure Hash Secret gMAVIEGVpqHvxoNEqbrZRuBDFT1B0icW Example of Signing data string 56100908|1280204670187|344|10|N|gMAVIEGVpqHvxoNEqbrZRuBDFT1B0icW Example of Secure Hash 13068c0ef09139ea711d36bde16785a2d30b9a30 Plain text Verifying Secure Hash from payme nt gateway datafeed Create the verify data string. Verify data string = Src + “|” + Prc + “|” + Success Code + “|” + Merchant Reference Number + “|” + Payment Gateway Reference Number + “|” + Currency Code + “|” + Amount + “|” + Payer Authentication Status + “|” + Secure Hash Secret Verify Secure Hash = SHA-1 / SHA-256 (Verify data string) Extract the secure hash from Payment Gateway datafeed. Compare the output from step 2 and step 3. If they are equals, return True, else return False. *SHA-1 is the original 160-bit hash function. (default) • [Enable Secure Hash](https://developer.asiapay.com/integration-guide/transaction-security-by-secure-hash/enable-secure-hash.md): Enable Secure Hash function of your merchant account Please contact our payment gateway service department (service@paydollar.com) to enable the Secure Hash function of your merchant account. You may retrieve the Secure Hash Secret of the merchant account by accessing to the Merchant Administration Interface, “Profile” “Payment Information”. The Secure Hash Secret must be kept safely for the function to be effective. The Secure Hash Secret will be changed every 2 years to enhance the level of security. Once this function is enabled, a valid Secure Hash should be included in all transaction requests. All transaction without valid Secure Hash will be dropped by our payment gateway system. You may download client library with sample code under, Payment Gateway Merchant Administration Tools Support Developer Corner. • [Introduction](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/introduction.md): Our payment gateway Multi-Currency Processing Service (MPS) is an integrated e-payment transaction processing service that allows your online business of any size to securely accept real-time credit card payments from overseas cardholders and offer them the choice to pay for their goods and services in their billing currency, whilst merchants continue to be settled for transactions in their base currency. Multi-Currency Processing Service (MPS) provides three different modes as below: Simple Currency Conversion (SCP) Multi-Currency Pricing (MCP) Dynamic Currency Conversion (DCC) Multi-Currency Processing Service (MPS) facilitates merchant to connect to our network with great flexibility. Merchant can choose the following integration method. Client Post through Browser (e.g. Shopping Cart) Definition : “Foreign Currency” means those non-based currency for which the Program is available to merchant from time to time supported and advised by AsiaPay. “Base Currency” means the currency in which the merchant is settled for payment transactions by its acquirer. “Conversion Rate” means the foreign currency exchange rate derived by a recognized supplier. • [Simple Currency Conversion (SCP)](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/simple-currency-conversion.md): Simple Currency Conversion (SCP) is a value added e-payment processing service that allows your online business to securely accept real-time credit card payments from overseas customers with foreign currencies in pricing while offering them to pay for goods and services in your preferred currency. And, your business can continue to collect settlement in base currency as usual. Simple Currency Conversion (SCP) will convert the foreign currency that posted by merchant to the base currency of merchant according to the conversion rate obtained from our exchange rate provider. After that, the foreign amount, base amount and the exchange rate will be shown on the payment gateway payment input page Transaction Flow • [SCP Sample](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/simple-currency-conversion/scp-sample.md): SCP Sample Transaction Screen Payment Amount Conversion and Account Input Page: Payment Result Page: • [Multi Currency Pricing](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/multi-currency-pricing.md): Multi-Currency Pricing (MCP) is a value added e-payment processing service that allows your online business to securely accept real-time credit card payments from overseas customers while offering them the choice to pay for goods and services in merchant base currency or other worldwide currencies (e.g. USD). And, your business can continue to collect settlement in local currency as usual. Multi-Currency Pricing (MCP) will translate the base currency that posted by merchant to the worldwide currency according to the conversion rate. After that, customer can select one of the currencies for payment. MCP Calculation PayDollar/SiamPay/PesoPay will provide an API to merchant to integrate with their web server. This MPS Exchange Rate Enquiry API is used for enquiry exchange rate and calculation of MCP foreign amount. The calculation of the MCP amounts will be based on the stored rates at PayDollar; the correct minor unit for that currency will provided. Rounding Rate response messages contain a margined foreign exchange rate with four decimal places. Merchant will use this rate to calculate the MCP amounts. Merchant will take account of the correct minor unit per currency when calculating the MCP amount. Round half up will be used for rounding. Example: Two minor unit currencies For exchange rate 1HKD=0.0960EUR HKD 376 = EUR 36.10 (Before Rounding, EUR 36.096) For exchange rate 1HKD=0.1394CAD HKD 345 = CAD 48.09 (Before Rounding, CAD 48.093) Example: Zero Minor unit currency For exchange rate 1HKD=132.3400KRW HKD 100 = KRW 13234 Rates Expiry Rate response messages contain an expiry time. Rates are only valid prior to this expiry time. The transaction will be rejected by PayDollar/SiamPay/PesoPay if the MCP rates have expired. Therefore, merchant should make the rate enquiry every time in each new customer browsing session instead of storing the rate locally. Tolerance Check PayDollar/SiamPay/PesoPay has a rate tolerance check on every MCP transaction to make sure that all the MCP transaction only will be processed within an agreed tolerance level with bank of the latest margined exchange rates.The transaction will be rejected by PayDollar if the tolerance check fails. • [MCP Sample](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/multi-currency-pricing/mcp-sample.md): Multi Currency Pricing (MCP) Sample Transaction Screen Payment Method Selection Page: Payment Account Input Page: Payment Result Page: • [Dynamic Currency Conversion (DCC)](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/dynamic-currency-conversion-dcc.md): Dynamic Currency Conversion (DCC) is a value added e-payment processing service that allows your online business to securely accept real-time credit card payments from overseas customers while offering them the choice to pay for goods and services in the merchant base currency or cardholder’s home currency. This payment process allows the merchant to show the value of the transaction in the cardholder’s home currency. Dynamic Currency Conversion (DCC) will translate the base currency that posted by merchant to the cardholder’s home currency according to the conversion rate. After that, customer can select one of the currencies for payment. Transaction Flow • [DCC Sample](https://developer.asiapay.com/integration-guide/multi-currency-processing-service/dynamic-currency-conversion-dcc/dcc-sample.md): Dynamic Currency Conversion (DCC) Sample Transaction Screen DCC Selection Page Payment Result Page • [Introduction](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/introduction.md): There are totally four API functions provided: Capture Authorized Payment Void Accepted Payment Request Refund Accepted Payment Query Payment Status To connect to our system, you need to post the required parameters by HTML form posting to our merchant API web page and then get back the processing result from that page. You can implement it by server-side html post. URL of Testing Platform: Title Description Payment Gateway Testing URL PayDollar https://test.paydollar.com/b2cDemo/eng/merchant/api/orderApi.jsp SiamPay https://test.siampay.com/b2cDemo/eng/merchant/api/orderApi.jsp PesoPay https://test.pesopay.com/b2cDemo/eng/merchant/api/orderApi.jsp Beside, a set of API login ID and password will be assigned to your merchant account for accessing this API function. And it can be obtained from us by sending a request email or directly contact us. • [Capture Authorized Payment](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/capture-authorized-payment.md): The aim of this function is to capture the authorized payment. • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/capture-authorized-payment/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide loginId Text (30) The loginId of merchant API password Text (15) The password of merchant API actionType “Capture” The action type payRef Text (35) Payment Reference Number amount Number (12,2) The amount you want to capture (must be less than or equal to the original amount) Return resultCode Number {“0”,”-1”} 0 - Request Successfully -1 – Request Failed orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND errMsg Text Error Message Additional output parameters for transaction processed with rewards program (e.g. Hang Seng Cash Dollar) Title Description Title Description Parameters Data Type Expected Value Descriptions resultCode Number {“0”,”-1”} 0 - Request Successfully -1 – Request Failed orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND errMsg Text Error Message All the return parameters will be concatenated as in html request format by separate with & Sample return string: Plain text resultCode=0&orderStatus=Accepted&ref=Test&payRef=4780&amt=1.0&cur=344&errM sg=Capture Successfully. • [Void Accepted Payment](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/void-accepted-payment.md): The aim of this function is to void the accepted payment before settlement. It can be done only before our settlement time • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/void-accepted-payment/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide loginId Text (30) The loginId of merchant API password Text (15) The password of merchant API actionType ““Void” The action type payRef Text (35) Payment Reference Number Return resultCode Number {“0”,”-1”} 0 - Request Successfully -1 – Request Failed orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND errMsg Text Error Message All the return parameters will be concatenated as in html request format by separate with & Sample return string: Plain text resultCode=0&orderStatus=Voided&ref=Test&payRef=4780&amt=1.0&cur=344&errMsg =Void Successfully. • [Request Refund for Accepted Payment](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/request-refund-for-accepted-payment.md): The aim of this function is to request refund for accepted payment before 14 days. • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/request-refund-for-accepted-payment/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide loginId Text (30) The loginId of merchant API password Text (15) The password of merchant API actionType ““RequestRefund” The action type payRef Text (35) Payment Reference Number (Optional Input) amount Number (12,2) The amount you want to refund (must be less than or equal to the original amount) Return resultCode Number {“0”,”-1”} 0 - Request Successfully -1 – Request Failed orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND errMsg Text Error Message All the return parameters will be concatenated as in html request format by separate with & Sample return string: Plain text resultCode=0&orderStatus=RequestRefund&ref=Test&payRef=4780&amt=1.0&cur=344 &errMsg=Request successfully and we will process it later. • [Query payment status](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status.md): The aim of this function is to query the payment status on an order by either Merchant Reference Number or Payment Reference Number with XML • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide to you loginId Text (30) The loginId of using merchant API password Text (15) The password of using merchant API actionType “Query” The action type (Conditional) orderRef Text (35) Merchant Reference Number (Conditional) payRef Text (35) Payment Reference Number Return orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference mpsMode The Multi – Currency Processing Service (MPS) Mode: “NIL” or not provide – Disable MPS (No currency conversion) “SCP” – Enable MPS with ‘Simple Currency Conversion’ “DCC” – Enable MPS with ‘Dynamic Currency Conversion’ “MCP” – Enable MPS with ‘Multi Currency Pricing’ amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency i.e. “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND prc Text Primary response code src Text Secondary response code ord Text Bank Reference Number holder Text The Holder Name of the Payment Account sourceIp Text (15) IP address of payer ipCountry Text (3) Country of payer ( e.g. HK) if country is on high risk country list, an asterisk will be shown (e.g. MY*) payMethod Text (20) Payment method (e.g. VISA, Master, JCB, AMEX) cardIssuingCountry Text (3) Card Issuing Country Code ( e.g. HK) if country is on high risk country list, an asterisk will be shown (e.g. MY*) if the card issuing country of credit card is undefined, “- -“ will be shown. Please refer to Appendix A “List of Country Code” for detail airline_ticketNumber Text Air Ticket Number errMsg Text Error Message txTime Text (YYYY-MM-DD HH:MI:SS.0) transaction time successcode Number 0- succeeded, 1- failure, 2-pending, Others – error *Only return for order status “Accepted”, “Authorized”, “Rejected”, “Pending”, “Pending_feedback” remark Text (200) A remark field for you to store additional data that will not show on the transaction web page authId Text Approval Code eci Text (2) ECI value (for 3D enabled Merchants) VISA / JCB / AMEX ECI Value Definition 05 Both cardholder and card issuing bank are 3D enabled. 3D card authentication is successful 06 Either cardholder or card issuing bank is not 3D enrolled. 3D card authentication is unsuccessful, in sample situations as: 3D cardholder not enrolled Card issuing bank is not 3-D Secure ready 07 Authentication is unsuccessful or not attempted. The credit card is either a non-3D card or card issuing bank does not handle it as a 3D transaction MasterCard ECI Value Definition 00 Authentication is unsuccessful or not attempted. The credit card is either a non-3D card or card issuing bank does not handle it as a 3D transaction 01 Either cardholder or card issuing bank is not 3D enrolled. 3D card authentication is unsuccessful, in sample situations as: 3D Cardholder not enrolled Card issuing bank is not 3-D Secure ready 02 Both cardholder and card issuing bank are 3D enabled. 3D card authentication is successful Remark: String value “null” will be sent when the transaction is rejected by PayDollar PayAlert or the transaction doesn’t has ECI value. payerAuth Text (1) Payer Authentication Status Y - Card is 3-D secure enrolled and authentication succeeds. N - Card is 3-D secure enrolled but authentication fails. P - 3-D Secure check is pending A - Card is not 3-D secure enrolled yet U - 3D-secure check is not processed. channelType Text (3) Channel Type: SPC – Client Post Through Browser DPC – Direct Client Side Connection DPS – Server Side Direct Connection SCH – Schedule Payment DPL – Direct Payment Link Connection MOT – Moto Connection RTL – RetailPay Connection BPP – Batch Payment Process MOB – Mobile Payment Connection MerchantId Number The merchant Id of transaction alertCode Text (50) The Alert Code e.g. R14 –IP Country not match with Issuing Country R 9 - In high risk country list • [Card Information](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/card-information.md): Title Description Title Parameters Data Type Descriptions expMonth Text (MM) Expiry month of the card *Return to approved merchant only expYear Text (YYYY) Expiry year of the card *Return to approved merchant only panFirst6 Text (6) First 6 digit of card *Return to approved merchant only panFull Text Encrypted PAN with AES256 encryption *Return to approved merchant only panMasked Text Full Masked PAN *Return to approved merchant only panFirst6 Text (6) First 6 digit of card *Return to approved merchant only panFirst4 Text (4) First 4 digit of card *Return to approved merchant only panLast4 Text (4) Last 4 digit of card *Return to approved merchant only accountHash Text Hash value of card *Return to approved merchant only accountHashAlgo Text Hash function of card *Return to approved merchant only • [MPS VAS](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/mps-vas.md): Additional output parameters for transaction processed with MPS VAS Title Description Title Parameters Data Type Descriptions mpsAmt Number (12,2) MPS Transaction Amount Remark: For MPS Enable only . mpsCur Text (3) MPS Transaction Currency Remark: For MPS Enable only. mpsForeignAmt Number (12,2) MPS Transaction Foreign Amount Remark: For MPS Enable only. mpsForeignCur Text (3) MPS Transaction Foreign Currency Remark: For MPS Enable only. mpsRate Number (12,4) MPS Exchange Rate: (Foreign / Base) e.g. USD / HKD = 7.77 Remark: For MPS Enable only. • [SchedulePay VAS](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/schedulepay-vas.md): Additional output parameters for transaction processed with SchedulePay VAS Title Description Title Parameters Data Type Descriptions mSchPayId Number The Master Schedule Payment Id *For Schedule payment transaction only dSchPayId Number The Detail Schedule Payment Id *For Schedule payment transaction only • [MemberPay VAS](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/memberpay-vas.md): Additional output parameters for transaction processed with MemberPay VAS Title Description Title Parameters Data Type Descriptions mpMemberId Text Member Id if merchant using memberPay • [Third Party eWallet](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/third-party-ewallet.md): Additional output parameters for transaction processed with Third Party eWallet Title Description Title Parameters Data Type Descriptions isEwallet Text(1) “T” –This is a transaction with Ewallet function eWalletBrand Text ECO - AMEX Express checkout MP – MasterPass VCO – VISA Checkout • [Promopay VAS](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/promopay-vas.md): Additional output parameters for transaction processed with Promopay VAS Title Description Title Parameters Data Type Descriptions promotionCode Text(8); The promotion campaign code of transaction *For promotion transaction only promotionRuleCode Text(8); The promotion rule code of transaction *For promotion transaction only promotionOriginalAmt Number (12,2) The original amount of promotion *For promotion transaction only • [Installment](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/installment.md): Additional output parameters for transaction processed with Installment Title Description Title Parameters Data Type Descriptions installment_period Number The installment period (In number of months) installment_provider Text The issuing bank or provider of the installment “HASE” – Hang Seng Bank (Hong Kong) “BOCIHK” – Bank of China (Hong Kong) “BCA” - Bank Central Asia (Indonesia) “WELEND” – WeLend (Hong Kong) installment_firstPayAmt Number The transaction amount for first installment period *Return only if the installment bank providing this information installment_eachPayAmt Number The transaction amount for each installment period *Return only if the installment bank providing this information installment_lastPayAmt Number The transaction amount for last installment period *Return only if the installment bank providing this information • [Rewards program](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/output-parameters/rewards-program.md): Additional output parameters for transaction processed with rewards program (e.g. Hang Seng Cash Dollar) Title Description Title Parameters Data Type Descriptions netAmtAfterRewards Number(12,2) Total Net Amount after Redeem Rewards Program rewardsRedeemTotalAmt Number(12,2) Total Rewards Redeem Amount rewardsRedeemType Text Rewards Redeem Type “HASE” – Hang Seng Cash Dollar rewardsRedeemProgram Number Number of redeem programs Return value is 1,2, or 3 rewardsRedeemCode1 Text First Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemLabel1 Text First Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemAmt1 Number(12,2) First Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsBalance1 Text First Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 1,2 or 3 rewardsRedeemCode2 Text Second Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemLabel2 Text Second Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemAmt2 Number (12,2) Second Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsBalance2 Text Second Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 2 or 3 rewardsRedeemCode3 Text Third Rewards Program Redeem Program Code *Return only when rewardsRedeemProgram return value is 3 rewardsRedeemLabel3 Text Third Rewards Program Redeem Program Label *Return only when rewardsRedeemProgram return value is 3 rewardsRedeemAmt3 Number(12,2) Third Rewards Program Redeem Amount *Return only when rewardsRedeemProgram return value is 3 rewardsBalance3 Text Third Rewards Program Balance Format Expired Rewards Balance Expired Date – Expired Balance Amount | Rewards Balance Expired Date- Rewards Balance Amount Example: 0115-20.00|0120-30.00 *Return only when rewardsRedeemProgram return value is 3 • [Sample](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-payment-status/integration-parameters/sample.md): All the return parameters will be in XML format Sample return XML file: Plain text Accepted Test 1390545 NIL 1 344 0 0 00004295104 Holder Name 123456 R14 Test 05 Y 202.65.133.23 HK VISA 4918914107195005 or 491891******5005 or 4918 5005 07 2015 HK SPN 2014-07-01 00:00:00.0 0 123456 T EOC Query Successfully • [Query Request Log](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-request-log.md): The aim of this function is to query the payment request log. • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/query-request-log/integration-parameters.md): Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide to you loginId Text (30) The loginId of using merchant API password Text (15) The password of using merchant API actionType “QueryRequestLog” The action type (Optional Input) orderRef Text (35) Merchant Reference Number (Optional Input) periodType Text (1) Period Type: M – Query by month D – Query by Day (Optional Input) queryDate Number(8) Query date format: MMYYYY - periodType is M DDMMYYYY - periodType is D Return requestDate Date The request date of transaction sessionId Number The sessionID of transaction ref Number(15) Merchant Reference Number cur Number (3) Transaction Currency i.e. “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND amt Number (12,2) Transaction Amount payerIp Text(15) IP address of payer ipCountry Text(3) Country of payer ( e.g. HK) if country is on high risk country list, an asterisk will be shown (e.g. MY*) deviceBrowser Text(50) Device Browser deviceOS Text(50) Device Operation System deviceMoblie Text(1) Device Mobile channelType Text(5) Channel Type SPN - Client post through browser SPV - Client post through browser DPS - Direct Server Side DPC - Direct Client Side pageCode Text(10) pageCode of payment page CPF - Payment Selection Page CPF2 - Credit Card Input Page CPV - 3D Verify Page CPVR - 3D Verification Result Page CPC - Result Page DPC - Payment Processing DPR - Result Redirect Page CPFD - DCC Selection Page All the return parameters will be in XML format Sample return XML file: Select... <records> <record> <requestDate>2016-01-20 10:17:19</requestDate> <sessionId>1135335</sessionId> <ref>Test</ref> <cur>344</cur> <amt>1</amt> <payerIp>192.168.77.28</payerIp> <ipCountry/> <deviceBrowser>Chrome</deviceBrowser> <deviceOS/> <deviceMoblie>F</deviceMoblie> <channelType>SPC</channelType> <pageCode>CPF</pageCode> </record> • [Cancel Payment](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/cancel-payment.md): The aim of this function is to cancel the payment that the status of transaction in pending status. • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/cancel-payment/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide to you loginId Text (30) The loginId of using merchant API password Text (15) The password of using merchant API actionType “Cancel” The action type payRef Text (35) Payment Reference Number forceCancel Text (1) T - Yes F - No (Default Value) Whether to cancel the transaction regardless of the order status of acquirer Return resultCode Number 0 - Request Successfully -1 – Request Failed orderStatus Text (20) The new order status after successfully request ref Text Merchant’s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (12,2) Transaction Amt cur Number (3) Transaction Currency “344” – HKD “840” – USD “156” – CNY (RMB) “392” – JPY “036” – AUD “978” – EUR “124” – CAD “446” – MOP “764” – THB “458” – MYR “410” – KRW “682” – SAR “784” – AED “096” – BND “356” – INR “702” – SGD “826” – GBP “901” – TWD “608” – PHP “360” – IDR “554” – NZD “704” – VND errMsg Text Error Message All the return parameters will be concatenated as in html request format by separate with & Sample return string: Plain text resultCode=0&orderStatus=Rejected&ref=Test&payRef=4888&amt=1.0&cur=344&errMsg=Cancel Successfully. • [Void / Online Refund or Partial Refund](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/void-online-refund-or-partial-refund.md): The aim of this function is to void / refund / partial refund the payment online according to its order status. To connect to our system, you need to post the required parameters by HTML form posting to our merchant API web page and then get back the processing result from that page. You can implement it by server-side html post. URL of Testing Platform: Select... https://test.paydollar.com/b2cDemo/eng/merchant/api/onlineApi.jsp • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/void-online-refund-or-partial-refund/integration-parameters.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) (Case Sensitive) Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide to you loginId Text (30) The loginId of using merchant API password Text (15) The password of using merchant API actionType “OnlineReversal” The action type payRef Text (35) Payment Reference Number amount Number The requested amount to be refund (up to 2 decimal place) Optional for Void transaction Return resultCode Number {“0”,”-1”} 0 - Request done successfully -1 – Request failed orderStatus Text(20) The new order status after successfully request ref Text Merchant‘s Order Reference Number payRef Number PayDollar/SiamPay/PesoPay transaction reference amt Number (15,5) Processed Amount cur Number (3) Transaction Currency e.g. 344 – HKD errMsg Text Result / Error Message Available for NICEPAY virtual account Title Description Title Description Input/Return Parameters Data Type Descriptions Input RefundAcctNo Number (16) Refund account number (Bank account number of the holder) RefundBankCd Number (3) Refund account bank code RefundAcctNm Text(10) Refund account name All the return parameters will be concatenated as in html request format by separate with & Sample return string: Plain text resultCode=0&orderStatus=Refunded&ref=Test&payRef=4780&amt=1.0&cur=344&errMsg= The transaction was refunded successfully. • [Cases for void/refund](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/void-online-refund-or-partial-refund/cases-for-void-refund.md): Title Description Title Description Case Description / Criteria Updated Order Status Result / Error Msg Void Transaction was accepted but not yet settled Voided Transaction was voided successfully Requested payment ref. no. is not existed (No change) The transaction is not existed The order status of requested transaction is not accepted before (No change) The transaction is not available for void/refund. Online Refund Transaction was accepted and settled. No online partial refund requested before The requested amount is equal to the transaction amount Refunded The transaction was refunded successfully The requested amount is larger than transaction amount (No change) The refund amount is larger than transaction amount Online Partial Refund Transaction was accepted and settled. The requested amount is less than transaction amount The request amount is equal than transaction amount but there is partial refunded before. PartialRefunded Transaction was partially refunded successfully The requested amount is larger than original/remained transaction amount (No change) The refund amount is larger than transaction amount The requested amount is larger than the today’s sales amount (No change) The transaction is not available for void/refund. • [Settlement report request](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/settlement-report-request.md): The aim of this function is to generate settlement report. URL of Testing Platform: Plain text https://test.paydollar.com/b2cDemo/GenTxnXML • [Integration Parameters](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/settlement-report-request/definition-of-parameters-in-the-integration-page.md): Title Description Title Description Title Input /Return Parameters (Required Fields are in Bold typeface) *Case Sensitive Data Type Expected Value Descriptions Input merchantId Number The merchant ID we provide to you loginId Text (30) The loginId of using merchant API password Text (15) The password of using merchant API startDate Number(14) Report Start Date endDate Number(14) DDMMYYYYhhmmss Report End Date (Optional Input) queryType Text(1) O/S Report Type: O - Use date/time of the authorization or sales transaction to generate report (default) S - Use date/time of the settlement transaction to generate report and only query transactions that settleflag is T Return authdate Number(14) The date/time of the authorization or sales transaction capturedate Number(14) The date/time of the captured (after authorize) transaction batchid Number(15) Settlement batch ID settledate Number(14) The date/time of the settlement transaction payref Number (14) Unique number in Payment platform merref Text(30) Merchant order reference number authid Text(6) Approval code cur Number Bank Return Status code 2 amt Number(12,2) Transaction Amount surcharge Number Surcharge Amount merRequestAmt Number Merchant Request Amount orderstatus Text The Holder Name of the Payment Account terminal Text(100) Bank Terminal id bankmid Text(100) Bank Merchant id settleflag boolean {“T”,”F”} Settled or not src Text Secondary response code prc Text Primary response code bank Text Eg.CITIBANK,PPS bankref Text Bank reference number traceno Text System trace number accountno Number Account Number currency Text Order currency remark Text Order Remark errMsg Text Error Message originalamt Number(12,2) Original Transaction Amount All the return parameters will be in XML format Sample return XML file: Plain text 08122023095821 11884225 Test1001_vinbts 702 1.00 0.0 0.0 Rejected bca936a5-c9c8-42e2-bcb6-95b8a3c6d544 F 1 -9 HOOLAH SGD • [Sample Source Code](https://developer.asiapay.com/integration-guide/functions-of-merchant-api/sample-source-code.md): Sample source code of HTML server-side posting on Java As different type of programming language have different syntax, so we just propose one method to connect to our merchant API page. To connect, we suggest you to use server side posting: Sample code for serverpost by using java: Plain text // SET UP THE POST DATA String postData = "merchantId=1&loginId=testing&password=pwd&payRef=123456&actionType=Capture&amount= 1 & ”; // POST TO PAYMENT PAGE strResult = ServerPost.post(postData, http: //test.paydollar.com:8080/b2cDemo/eng/merchant/api/orderApi.jsp ); // EXTRACT THE PAYMENT STATUS FROM STRRESULT ……… // FINISH ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** public class ServerPost { static public String post(String ip_postData, String ip_pageUrl) { try { String strResult = ""; URL url = new URL(ip_pageUrl); URLConnection con = url.openConnection(); //from secure site if (con instanceof com.sun.net.ssl.HttpsURLConnection) { ((com.sun.net.ssl.HttpsURLConnection) con).setSSLSocketFactory ((SSLSocketFactory) SSLSocketFactory.getDefault()); } con.setDoOutput(true); con.setDoInput(true); // Set request headers for content type and length con.setRequestProperty( "Content-type", "application/x-www-form-urlencoded"); con.setRequestProperty( "Content-length", String.valueOf(ip_postData.length())); // Issue the POST request OutputStream outStream = con.getOutputStream(); outStream.write(ip_postData.getBytes()); outStream.flush(); // Read the response InputStream inStream = con.getInputStream(); while (true) { int c = inStream.read(); if (c == -1) break; strResult = strResult + String.valueOf((char) c); } inStream.close(); outStream.close(); return strResult; } catch (Exception e) { System.out.print(e.toString()); return null; } } } All the source code in this document are the property of AsiaPay (HK) Limited. Any use, modification and adaptation to the code should be reported to and approved by AsiaPay (HK) Limited. AsiaPay (HK) Limited do not have any liability in any lose to the party using the source code. • [Exceptional Transaction Handling](https://developer.asiapay.com/integration-guide/exceptional-transaction-handling.md): This section explains various scenarios of transactions, other than good and successful transactions that may occur. • [Unsuccessful redirection](https://developer.asiapay.com/integration-guide/exceptional-transaction-handling/unsuccessful-redirection.md): Unsuccessful redirection to successUrl / failUrl / cancelUrl This may occur if Wrong / invalid returned URLs are set in the integration; or Connection between the customer and merchant server is lost; or Customer’s computer hangs / restarts / loses power. Since the bank has already determined the transaction status, the transaction is completed. Merchants should educate the customer to contact the merchant and confirm the transaction status with them when such case happens. • [Unsuccessful data feed](https://developer.asiapay.com/integration-guide/exceptional-transaction-handling/unsuccessful-data-feed.md): This may occur if Data feed URL is wrongly set up; or Connection between PayDollar/SiamPay/PesoPay and merchant server is lost; or Server of either side cannot process data feed correctly. Since the bank has already determined the transaction status, the transaction is completed. Merchant can confirm the status by Log on to Merchant Administration and retrieve the corresponding transactions in Transaction Details Report; or Query the transaction status by using Merchant API. • [Incomplete 3D authentication](https://developer.asiapay.com/integration-guide/exceptional-transaction-handling/incomplete-3d-authentication.md): Incomplete 3D authentication transactions by customer This may occur if The customer closes the browser when he / she is required to enter 3D authentication information at issuer bank webpage; or The customer cannot access 3D authentication page of issuer bank due to various reasons, e.g. disabled cookies. The transaction status remains “Pending_3D”, and payer authentication status remains “P”. In PayDollar/SiamPay/PesoPay production, a schedule job is set up to change the status from “Pending_3D” to “Rejected” from time to time. The PRC / SRC pair is also updated to 3 / 9999. Data feed is also sent out in the schedule job for these unsuccessful transactions. Sometimes customers may return to PayDollar/SiamPay/PesoPay payment page / merchant site by pressing the ‘Back’ button of the browser and try again. The same merchant reference number is used for these retry transactions. Thus merchants may receive multiple data feeds regarding transactions with the same merchant reference number, with one success transaction followed by failed transactions. Merchants can choose to ignore the fail transactions with the same merchant reference once a successful transaction has been processed. • [Incomplete Alternative Payment transactions by customer](https://developer.asiapay.com/integration-guide/exceptional-transaction-handling/incomplete-alternative-payment-transactions-by-customer.md): This may occur if The customer closes the browser when he / she is required to enter 99BILL / ALIPAY / CHINAPAY / PPS / TENPAY / WECHAT account information at respective site; or The customer cannot access 99BILL / ALIPAY / CHINAPAY / PPS / TENPAY / WECHAT / SCB / BAY / KTB / UOB / TMB / BBL iBanking / UPOP page due to various reasons, e.g. disabled cookies or 99BILL / ALIPAY / CHINAPAY / PPS / TENPAY / SCB / BAY / KTB / UOB / TMB / BBL iBanking / UPOP host is down. The transaction status remains “Pending”. In production environment a schedule job is set up in our servers to change the status from “Pending” to “Rejected” from time to time. Data feed is also sent out in the schedule job for these unsuccessful transactions. Sometimes customers may return to PayDollar/SiamPay/PesoPay payment page by pressing the ‘Back’ button of the browser and try again. The same merchant reference number is used for these retry transactions. Thus merchants may receive multiple data feeds regarding transactions with the same merchant reference number, with one success transaction followed by failed transactions. Merchants can choose to ignore the fail transactions with the same merchant reference once a successful transaction has been processed. • [Payment Methods by Regions/Countries](https://developer.asiapay.com/integration-guide/payment-methods-by-regions-countries.md): Australia Title Description Payment Options Payment Methods Credit and Debit Card American Express, China UnionPay, Mastercard, Visa Internet Banking PayTo, PayID Digital Wallet Alipay, PayPal, PayID, WechatPay Buy Now Pay Later AfterPay, Humm, Zip China Title Description Title Payment Options Payment Methods Credit and Debit Card American Express, JCB, Mastercard, Visa Digital Wallet Alipay, WechatPay Hong Kong Title Description Title Payment Options Payment Methods Credit and Debit Card American Express, China UnionPay, Click to Pay, Diners, Discover, JCB, Mastercard, Visa Digital Wallet Alipay, Alipay HK, Alipay+, WeChat Pay, Paypal, BoC Pay, PayMe, Octopus, FPS, PPS, Google Pay, Samsung Pay, Apple Pay Bank Account and Net Banking FPS, PPS Global (no grouping) Apple Pay, Google Pay, Samsung Pay, Click to Pay Installment Visa Instalment India Title Description Payment Options Payment Methods Bank Account and Net Banking NetBanking, UPI Buy Now Pay Later Slice Pay BNPL Credit and Debit Card American Express, Mastercard, RuPay, Visa Digital Wallet ITZ Cash Card, Mobikwik, PhonePe, Yes Bank Wallet Installment EMI Indonesia Title Description Payment Options Payment Methods Credit and Debit Card American Express, JCB, Mastercard, Visa Bank Account and Net Banking BCA KlikPay, BNI Virtual Account, CIMB Clicks, Danamon Virtual Account, Mandiri Clickpay, Permata Virtual Account Over-the-counter Alfamart Group, Indomaret Digital Wallet Dana Buy Now Pay Later Kredivo, Indodana Japan Title Description Title Payment Options Payment Methods Bank Account and Net Banking BANKTRANSFERJPN, Pay-easy Buy Now Pay Later Paidy Cash-based Payment via Convenience Stores Konbini Carrier Billing Docomo, SoftBank Digital Wallet Alipay HK, au PAY, PayPay, Merpay Korea Title Description Title Payment Options Payment Methods Credit and Debit Card MasterCard, Virtual Account, Visa Digital Wallet Naver Pay, Kakao Pay, PayCo Others Toss Macau Title Description Payment Options Payment Methods Credit and Debit Card American Express, JCB, Mastercard, Visa Others ALIPAYHKONL, WECHATONL Malaysia Title Description Payment Options Payment Methods Credit and Debit Card American Express, China UnionPay, Discover, JCB, Mastercard, Visa Bank Account and Net Banking FPX Digital Wallet Alipay, WechatPay, PayPal , BOOST, TouchnGo, Scan & Pay by MAE, GrabPay, Shopback Pay Buy Now Pay Later Atome, PayLater by Grab Philippines Title Description Payment Options Payment Methods Credit and Debit Card American Express, China UnionPay, Diners, Dicover, JCB, Mastercard, Visa Bank Account and Net Banking BDO (Brankas), BPI, Landbank (Brankas), Metrobank (Brankas), RCBC (Brankas), Unionbank (Brankas) Digital Wallet Gcash, Grabpay, ShopeePay, MAYA, Alipay, Wechatpay Over-the-counter Bayad Center, BDO, Cebuana, ECPay, RCBC Others PayPal Buy Now Pay Later TendoPay Singapore Title Description Title Payment Options Payment Methods Credit and Debit Card American Express, China UnionPay, Diners, Discover, JCB, Mastercard, Visa Bank Account and Net Banking ENETS, PayNow Digital Wallet GrabPay, Shopback Pay, ShopeePay, Alipay, Wechatpay, SGQR, PayPal Buy Now Pay Later Atome, PayLater by Grab, Shopee SPayLater Taiwan Title Description Title Payment Options Payment Methods Global (no grouping) Apple Pay, Google Pay, Samsung Pay Credit and Debit Card JCB, MasterCard, Visa Digital Wallet Linepay, Jkopay, Apple Pay , Google Pay Thailand Title Description Title Payment Options Payment Methods Global (no grouping) GooglePay Credit and Debit Card American Express, China UnionPay, JCB, Mastercard, Visa Bank Account and Net Banking BAY, BBL, KBANK, SCB, TMB, UOB Digital Wallet Paypal Buy Now Pay Later Atome Over-the-counter BBL, Kbank, KTB, Lotus, Mpay, TTB, UOB Vietnam Title Description Title Payment Options Payment Methods Credit and Debit Card American Express, JCB, Mastercard, Visa Internet Banking NAPAS (43 banks), OnePay Buy Now Pay Later Kredivo Digital Wallet MoMo • [System Setup](https://developer.asiapay.com/integration-guide/faq/system-setup.md): What programming languages are supported in the Integration? HTML, ASP, PHP, JSP / Servlet, and any other server side scripting languages that support HTTP protocol. Is there any consideration on firewall issues on Merchants side? Merchants have to open HTTP port for data feed handling, i.e. port 80(HTTP) / port 443(HTTPS). Does PayDollar/SiamPay/PesoPay PayGate support any shopping cart software? Technically yes. You are however required to know how to deploy the shopping cart software to work for your requirements. Samples include OSCommerce. • [Common Problems](https://developer.asiapay.com/integration-guide/faq/common-problems.md): During the integration I encounter the error message “Your payment service is not active.” Make sure you are using the corresponding pair of merchant ID and integration URL. If you are using the TESTING URL (test.paydollar.com), the TESTING merchant ID, a 6-digits number, should be used. If you are using the PRODUCTION URL (www.paydollar.com), PRODUCTION merchant ID should be used, which is 4-digits number or 8-digits number. During the integration I encounter the error message “CurrCode is incorrect.” One PayDollar/SiamPay/PesoPay merchant ID only allows one currency. Make sure you are using the corresponding currency for the merchant ID in the HTML form. To apply multi-currencies, please contact our salespersons to open additional merchant accounts. Can I make use of the calling of successUrl / failUrl / cancelUrl solely to determine the transaction status? Customer may call the successUrl / failUrl / cancelUrl (with the merchant reference appended) in the browser and pretend the transaction is completed. Thus we recommend merchants to use data feed to determine the transaction status. Since PayDollar/SiamPay/PesoPay and the merchant are the only parties with the knowledge of the data feed URL, it is safe to determine the status by using the data feed. What is the difference between the parameters: Ref (orderRef), PayRef and Ord? Ref (orderRef) is merchant’s own order reference number. This comes from merchant’s database or invoices. PayRef is PayDollar/SiamPay/PesoPay order reference number. It is unique among all orders from different merchants in PayDollar/SiamPay/PesoPay system. Ord is bank reference number. It is generated by acquiring banks. To seek help on transactions, please provide PayRef (preferred) or Ref to us. • [Data Feed](https://developer.asiapay.com/integration-guide/faq/data-feed.md): How do I make use of the data feed? You may make use of the data passed from PayDollar/SiamPay/PesoPay in the data feed to update your database records regarding the transaction. Since merchant reference can be retrieved from data feed, you can make use of this key to update the corresponding transaction records of your system(s). How to set up data feed in my merchant account? You can enable or disable the data feed function in the merchant administration site > Profile > Payment Options. How do I know if the data feed is set up properly? You may go to transaction details in the merchant administration site, select output columns “Data Feed Ind.” and “Data Feed Return” and view the transaction records. If the data feed indicator is “T”, the data feed is set up properly. However, if the indicator is “F”, you may look at the “Data Feed Return” column and see what the error is. You may ask our technical team to assist when it relates to data feed setup. In addition, you can enable “Data Feed Failure Alert by Email” in the merchant administration site > Profile > Payment Options. When it is enabled, and if there is any failure on calling Merchant’s data feed, an email will be sent to Merchant’s technical contact email account. What programming languages can be used in writing data feed page? Any programming languages that can handle HTTP Post request parameters can be used. How do I write the data feed page? Should the data feed page display anything on the screen? The data feed page contains 3 parts, receive HTTP parameters, print ‘OK’ and your own backend processing (e.g. update database, send email to customer, etc.). The data feed page is called in the back end. It should not display anything, i.e. no HTML code. However it should respond with the word ‘OK’ to let our server know that you have successfully received the data feed. There is data feed error return “javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found” Our server cannot recognize your SSL certificate provider. Please contact our I.T. team to resolve the issues. When necessary you will be asked to provide your CA root certificate. Auto retry failed datafeed (Applicable for merchants who have registered the datafeed link and retry function) Sometimes, you may not be able to receive the datafeed response due to reasons like internet connection issue, incorrect datafeed URL being used, etc. After enabling the “Auto retry failed data feed”, datafeed will be resent: (1) immediately after the original attempt is failed, and (2) 15 minutes after if (1) is also failed • [3-D Secure Authentication](https://developer.asiapay.com/integration-guide/faq/3-d-secure-authentication.md): Can I use FRAMES in designing our website? Some card issuing banks require Cookies when entering their 3D authentication page. Full page (i.e. no FRAMES) is required in this situation. Furthermore, the SSL indicator should be displayed somewhere on the browser window to let customers know that the site is secure enough to enter sensitive information such as credit card number. When FRAMES is used, the SSL indicator may not appear if the page required SSL is inside the frame window. Therefore, it is suggested not to use FRAMES after the HTML form is submitted to PayDollar/SiamPay/PesoPay. You may consider opening another browser window to handle payment transactions. Can I ask for disabling 3-D Secure authentication for my transactions? This is subject to bank’s sole decision. You may be asked for providing business information in order to help the bank risk management team to evaluate your company profile before special approval. Nonetheless, you should be well aware the serious consequences of fraudulent non3D transactions. • [Data Security](https://developer.asiapay.com/integration-guide/faq/data-security.md): Can I store the credit card information of my customers? We recommend our merchants NOT to store credit card information, especially credit card number, expiry date and CVV2 / CVC2. Even if absolute necessary, please ensure to encrypt the data compliant to Visa A.I.S. (Account Information Security) program. You may refer to the following webpage: http://www.visa-asia.com/ap/sea/merchants/riskmgmt/ais_what.shtml . Credit card information stored in PayDollar/SiamPay/PesoPay complies with Visa A.I.S. and MasterCard SDP programs. • [Support](https://developer.asiapay.com/integration-guide/faq/support.md): Who should we contact in case we encounter problems during testing and in production? You can contact our I.T. team by either of the following ways. Email: it@paydollar.com Technical hotline: (852) – 82267981 (852) – 31731990 • [3D transaction](https://developer.asiapay.com/integration-guide/appendix-a/3d-transaction.md): As 3D Authentication require your customers to enter the password of their cards, your clients’ browser will be redirected to a 3D notification web page in order to notify your customers that they need to complete the 3D Authentication by entering the password in the pop-up window. Below are some sample pages for the case of Verified By VISA. After the authentication process, the authentication result will forward to our system and the transaction process will be further continued by our acquiring bank according to the authentication result. • [Non-3D transaction](https://developer.asiapay.com/integration-guide/appendix-a/non-3d-transaction.md): Your client’s browser will be redirected from your site to our payment page and then we will redirect the page to your successful/fail page upon completed the transaction. • [Other](https://developer.asiapay.com/integration-guide/appendix-a/payment-flow/client-post-through-browser/other.md): Alternative Payment Method Flow • [Bill Payment](https://developer.asiapay.com/integration-guide/appendix-a/payment-flow/client-post-through-browser/bill-payment.md): Bill Payment Flow (BPM) • [Virtual Account](https://developer.asiapay.com/integration-guide/appendix-a/payment-flow/client-post-through-browser/virtual-account.md): Permata, BII and BCA Virtual Account (VA) Payment Flow It is notable that the software codes of the payment routine, whose example is as given, should be embedded into the integration page, as in above, which should be able to generate the sum of purchase from the previous shopping practice of the user. The subsequent parts of the flow would be directed to system architecture in which the payment details are to be submitted by the user, and handled for settlement and clearance. • [Credit and Debit Card](https://developer.asiapay.com/integration-guide/appendix-a/payment-flow/direct-client-side-connection/credit-and-debit-card.md): Credit and Debit Card Payment Flow for VISA, Master, Diners, JCB, AMEX • [PayDollar/SiamPay/PesoPay Payment Response Code](https://developer.asiapay.com/integration-guide/appendix-a/paydollar-siampay-pesopay-payment-response-code.md): PayDollar/SiamPay/PesoPay Payment Response Code is composed of the following items: Primary Response Code (PRC) The primary response code is the main response code used for identifying the authorization status of a payment transaction. The following table provides a summary of all the response codes which may be returned: PRC Description 0 Success 1 Rejected by Payment Bank 3 Rejected due to Payer Authentication Failure (3D) 9 Rejected by Other Reason (Please check the Reject Reason at the transaction) -1 Rejected due to Input Parameters Incorrect -2 Rejected due to Server Access Error -8 Rejected due to PayDollar Internal/Fraud Prevention Checking -9 Rejected by Host Access Error -10 PaySDK Error Secondary Response Code (SRC) The secondary response code provides the detail description corresponding to the primary response code. • [Bank’s Response Code](https://developer.asiapay.com/integration-guide/appendix-a/list-of-response-code/bank-s-response-code.md): PRC SRC Description 1 01 Bank Decline 1 02 Bank Decline 1 03 Other 1 04 Other 1 05 Bank Decline 1 12 Other 1 13 Other 1 14 Input Error 1 19 Other 1 25 Other 1 30 Other 1 31 Other 1 41 Lost / Stolen Card 1 43 Lost / Stolen Card 1 51 Bank Decline 1 54 Input Error 1 55 Other 1 58 Other 1 76 Other 1 77 Other 1 78 Other 1 80 Other 1 89 Other 1 91 Other 1 94 Other 1 95 Other 1 96 Other 1 2000 Other • [Response Code From PayDollar/SiamPay/PesoPay](https://developer.asiapay.com/integration-guide/appendix-a/list-of-response-code/response-code-from-paydollar-siampay-pesopay.md): PRC SRC Description -8 999 Other -8 1000 Skipped transaction -8 2000 Blacklist error -8 2001 Blacklist card by system -8 2002 Blacklist card by merchant -8 2003 Black IP by system -8 2004 Black IP by merchant -8 2005 Invalid cardholder name -8 2006 Same card used more than 6 times a day -8 2007 Duplicate merchant reference no. -8 2008 Duplicate merchant reference no. -8 2011 Other -8 2012 Card verification failed -8 2013 Card already registered -8 2014 High risk country -8 2016 Same payer IP attempted more than pre-defined no. a day. -8 2017 Invalid card number -8 2018 Multi-card attempt -8 2019 Issuing Bank not match -8 2020 Single transaction limit exceeded -8 2021 Daily transaction limit exceeded -8 2022 Monthly transaction limit exceeded -8 2023 Invalid channel type -8 2099 Non testing card -8 2031 System rejected(TN) -8 2032 System rejected(TA) -8 2033 System rejected(TR) -8 2035 Black List Payer Card Country defined by Merchant -8 2037 Black List Payer Country defined by Merchant -8 2039 Special Country Restriction Requested by Merchant -8 2041 Invalid period for installment -8 2043 Unverified Member -8 2045 Invalid Coupon Code -8 2047 Cancel by user -8 2049 Reject due to not complete EWallet process -8 2050 Invalid card for installment -8 2051 Invalid Expiry Date -8 2053 Canceled transaction -8 2054 Rejected by 3D Settings -8 2055 Card Issuing and Payer IP country not match • [Other Response Code](https://developer.asiapay.com/integration-guide/appendix-a/list-of-response-code/other-response-code.md): PRC SRC Description 0 0 Success 3 Any Number Payer Authentication Fail -1 -1 Input Parameter Error -2 -2 Server Access Error -9 -9 Host Access Error -10 Any Value PaySDK Error • [List of Country Code](https://developer.asiapay.com/integration-guide/appendix-a/list-of-country-code.md): This list shows the country names and risk level of individual country code. High Risk Country Title Description Country Code Country Name AF Afghanistan AO Angola Balkans BG Bulgaria BY Belarus CG Republic of Congo CL Ivory Coast CM Cameroon CF Central African Republic CU Cuba EG Egypt ET Ethiopia ER Eritrea GH Ghana GW Guinea-Bissau HT Haiti IL Israel IR Iran IQ Iraq KP North Korea LB Lebanon LR Liberia LY Libya LU Lithuania MA Morocco MM Burma MY Malaysia ML Mali NG Nigeria PK Pakistan RW Rwanda RO Romania RU Russian Federation SS South Sudan Southern Rhodesia SL Sierra Leone SO Somalia SY Syria TR Turkey UA Ukraine VE Venezuela VN Vietnam YE Yemen YU Yugoslavia ZW Zimbabwe Non-High-Risk Country Title Description Title Country Code Country Name A2 Satellite Provider AD Andorra AE United Arab Emirates AI Anguilla AL Albania AM Armenia AN Netherlands Antilles AP Asia/Pacific Region AQ Antarctica AR Argentina AS American Samoa AT Austria AU Australia AW Aruba AZ Azerbaijan BA Bosnia and Herzegovina BB Barbados BD Bangladesh BE Belgium BF Burkina Faso BG Bulgaria BH Bahrain BI Burundi BJ Benin BM Bermuda BN Brunei Darussalam BO Bolivia BR Brazil BS Bahamas BT Bhutan BV Bouvet Island BW Botswana BZ Belize CA Canada CD Congo CI Cote D'Ivoire CK Cook Islands CL Chile CN China CO Colombia CR Costa Rica CY Cyprus CZ Czech Republic DE Germany DJ Djibouti DK Denmark DM Dominica DO Dominican Republic DZ Algeria EC Ecuador EE Estonia ES Spain EU Europe FI Finland FJ Fiji FK Falkland Islands (Malvinas) FM Micronesia FO Faroe Islands FR France GA Gabon GB United Kingdom GD Grenada GE Georgia GF French Guiana GI Gibraltar GL Greenland GM Gambia GN Guinea GP Guadeloupe GQ Equatorial Guinea GR Greece GT Guatemala GU Guam GY Guyana HK Hong Kong HM Heard Island and McDonald Islands HN Honduras HR Croatia HU Hungary ID Indonesia IE Ireland IN India IO British Indian Ocean Territory IS Iceland IT Italy JM Jamaica JO Jordan JP Japan KE Kenya KG Kyrgyzstan KH Cambodia KI Kiribati KM Comoros KN Saint Kitts and Nevis KR Korea KW Kuwait KY Cayman Islands KZ Kazakstan LA Lao People's Democratic Republic LB Lebanon LC Saint Lucia LI Liechtenstein LK Sri Lanka LS Lesotho LU Luxembourg LV Latvia MD Moldova MG Madagascar MH Marshall Islands MK Macedonia MN Mongolia MO Macau MP Northern Mariana Islands MQ Martinique MR Mauritania MS Montserrat MT Malta MU Mauritius MV Maldives MW Malawi MX Mexico MZ Mozambique NA Namibia NC New Caledonia NE Niger NF Norfolk Island NI Nicaragua NL Netherlands NO Norway NP Nepal NR Nauru NZ New Zealand OM Oman PA Panama PE Peru PF French Polynesia PG Papua New Guinea PH Philippines PL Poland PR Puerto Rico PS Palestinian Territory PT Portugal PW Palau PY Paraguay QA Qatar RE Reunion SA Saudi Arabia SB Solomon Islands SC Seychelles SE Sweden SG Singapore SI Slovenia SK Slovakia SM San Marino SN Senegal SO Somalia SR Suriname ST Sao Tome and Principe SV El Salvador SZ Swaziland TC Turks and Caicos Islands TD Chad TF French Southern Territories TG Togo TH Thailand TJ Tajikistan TK Tokelau TM Turkmenistan TN Tunisia TO Tonga TT Trinidad and Tobago TV Tuvalu TW Taiwan TZ Tanzania UG Uganda UM United States Minor Outlying Islands US United States UY Uruguay UZ Uzbekistan VA Holy See (Vatican City State) VC Saint Vincent and the Grenadines VG Virgin Islands VI Virgin Islands VU Vanuatu WF Wallis and Futuna WS Samoa YT Mayotte ZA South Africa ZM Zambia • [3DS Testing Cards](https://developer.asiapay.com/integration-guide/appendix-a/3ds-testing-cards.md): In order to facilitate the testing in 3DS 2.0, you may use the testing cards in the list below for simulating different scenarios. The existing testing cards are still valid to use, and they will be classified as "non-3D card" or "3DS 1.0 card". To test for payment failure case, use a different Expiry Date and/or Secure Code Cards for 3DS 2.2 (Frictionless Flow) Title Description Title Description Card Scheme Card PAN Expiry Date Secure Code Visa 4333880000200019 07/2030 123 Mastercard 5422880000200018 07/2030 123 JCB 3518910000200013 07/2030 123 American Express 371891000200017 07/2030 1234 CUP 6220230626000057 07/2030 1234 Discover 6011000300002569 07/2030 1234 Cards for 3DS 2.2 (Challenge Flow) Title Description Title Description Title Card Scheme Card PAN Expiry Date Secure Code One Time Passcode Visa 4333880000200027 07/2030 123 123456 Mastercard 5422880000200026 07/2030 123 123456 JCB 3518910000200021 07/2030 123 123456 American Express 371891000200025 07/2030 1234 123456 CUP 6220230626000073 07/2030 123 123456 Discover 6011000300002585 07/2030 123 123456 Cards for no 3DS Title Description Title Description Card Scheme Card PAN Expiry Date Secure Code Visa 4918914107195005 07/2030 123 Mastercard 5258950000000020 07/2030 123 JCB 3528010000010021 07/2030 123 American Express 378416000100026 07/2030 1234 Cards for 3DS 2.0 (Reject Case: transStatus = R) Title Description Title Description Card Scheme Card PAN Expiry Date Secure Code Visa 4333880000200001 07/2030 123 Mastercard 5422880000200034 07/2030 123 JCB 3518910000200005 07/2030 123 American Express 371891000200009 07/2030 1234 Cards for 3DS 2.0 (Failed Case: transStatus = N) Title Description Title Description Card Scheme Card PAN Expiry Date Secure Code Visa 4333880000200092 07/2030 123 Mastercard 5422880000200091 07/2030 123 JCB 3518910000200039 07/2030 123 American Express 371891000200033 07/2030 1234 • [Payment Status Classification](https://developer.asiapay.com/integration-guide/appendix-a/payment-status-classification.md): Status Description Accepted Transaction is completed Accepted_Adj Completed transaction was refunded partial (Remind Amount) Authorized Authorize Success Authorized_Adj Transaction Partial Captured Captured Transaction Captured Capturing Transaction is in the process of being captured ChargeBack Transaction reversed due to a dispute PartialChargeBack A portion of the transaction is reversed due to a dispute. PartialRefunded Transaction Partial Refunded Pending Transaction is Processing Pending_feedback Transaction is awaiting feedback or additional information Pending_3D Transaction is awaiting 3D Secure authentication Refunded Refund Completed (Settled Transaction) Rejected Transaction Failed RequestPartialRefund A partial refund for the transaction has been requested. RequestRefund A full refund for the transaction has been requested. Reversal-Auth Authorized transaction has been reversed, due to a cancellation or a failed payment. Voided Void Completed (Non-Settle Transaction) Voiding Transaction is in the process of being canceled. • [Web Integration](https://developer.asiapay.com/integration-guide/security/web-integration.md): 1) Secure Hash The purpose of Secure Hash is to enhance the transaction message communication security between merchant site and our payment gateway system. By employing this technology, the integrity of the information and the identity of the signatory can be authenticated with industry standard. For all transaction request send from merchant site to our payment gateway, secure hash should be calculated and added to the transaction request to authenticate the integrity of the transaction information and the identity of the merchant. The secure hash is calculated by hashing the following parameters using SHA-1 or SHA-256, a cryptographic hash function of industry standard. Recommend merchant to turn-on for enhancing the communication security Merchants are required to enable & copy the secure hash through the merchant portal to utilize it in transactions effectively. To know more about secure hash please visit https://developer.asiapay.com/integration-guide/transaction-security-by-secure-hash • [Mobile SDK Integration](https://developer.asiapay.com/integration-guide/security/mobile-sdk-integration.md): 1) iOS App Bundle ID and Android Application These IDs uniquely identify your app in their respective app stores (Apple App Store and Google Play Store). PayDollar/SiamPay/PesoPay needs them to verify that the request is coming from your legitimate app and not from a malicious impersonator. This helps prevent unauthorized operations / requests. 2) Unique RSA Public Key This public key plays a critical role in securing PayDollar/SiamPay/PesoPay transactions: it acts like a special lock that exclusively works with AsiaPay's PaySDK service to encrypt sensitive information during all interactions, including operations, requests, responses, and the payment process itself. Make sure you obtain RSA Public key from AsiaPay. • [Backend Configuration](https://developer.asiapay.com/integration-guide/security/backend-configuration.md): 1) Merchant Domain enablement When you integrate AsiaPay's payment page into your website using iframe, please provide AsiaPay the domain name to enable. Kindly note that some card issuers may not support iframe when redirecting cardholders to their OTP page due to their internal policy or system configuration. How it Works with AsiaPay (Example): You integrate AsiaPay's SDC v1 iframe on your authorized domain (e.g., yourstore.com). When a customer checks out on your website, the SDC iframe loads securely from AsiaPay's domain. The customer enters their payment information within the secure iframe. The data submission happens within the iframe loaded from AsiaPay's authorized domain, 2) API IP Address Whitelist Imagine your API as a secure building with valuable resources. An IP address whitelist acts like a security guard who only allows authorized individuals (requests originating from specific IP addresses) to enter. Here's how it works: You configure your API to maintain a list of trusted IP addresses. When a request arrives at your API, its originating IP address is checked against the whitelist. If the IP address is on the list, the request is granted access. If the IP address is not on the list, the request is rejected. 3) Server-side payment IP whitelist Server-side payment IP whitelisting is a security measure where you restrict access to your payment processing functionality on your server to authorized IP addresses. This is similar to API IP whitelisting, but specifically focused on payment processing requests. How it Works: You configure your payment processing system (whether a custom solution or a third-party gateway) on your server. During configuration, you define a list of trusted IP addresses that are allowed to initiate payment requests. These could be: The IP addresses of your web servers where your shopping cart or checkout process resides. Specific IP ranges associated with your trusted partners handling order fulfillment or fraud prevention. When a customer initiates a payment on your website, the payment processing logic runs on your server. Your server-side code receives the payment request and retrieves the originating IP address. The code checks the originating IP address against the configured whitelist. If the IP address is on the whitelist, the payment processing continues. If the IP address is not on the whitelist, the request is rejected for security reasons. The customer might see an error message indicating a payment processing issue.