2C2Pv1.8.0

Request XML

Full request elements List:

<?PHP
		//Full request elements:
		$xml = "<PaymentRequest>
			<version>$apiVersion</version>
			<timeStamp>$timeStamp</timeStamp>
			<merchantID>$merchantID</merchantID>
			<uniqueTransactionCode></uniqueTransactionCode>
			<desc>$desc</desc>
			<amt>$amt</amt>
			<currencyCode>$currencyCode</currencyCode>
			<paymentChannel></paymentChannel>
			<storeCardUniqueID></storeCardUniqueID>
			<panBank></panBank>
			<panCountry></panCountry>
			<cardholderName>$cardholderName</cardholderName>
			<cardholderEmail></cardholderEmail>
			<payCategoryID></payCategoryID>
			<userDefined1></userDefined1>
			<userDefined2></userDefined2>
			<userDefined3></userDefined3>
			<userDefined4></userDefined4>
			<userDefined5></userDefined5>
			<storeCard>N</storeCard>
			<recurring></recurring>
			<invoicePrefix></invoicePrefix>
			<recurringAmount></recurringAmount>
			<allowAccumulate></allowAccumulate>
			<maxAccumulateAmt></maxAccumulateAmt>
			<recurringInterval></recurringInterval>
			<recurringCount></recurringCount>
			<chargeNextDate></chargeNextDate>
			<ippTransaction></ippTransaction>
			<installmentPeriod></installmentPeriod>
			<interestType></interestType>
			<promotion></promotion>
			<request3DS></request3DS>
			<statementDescriptor></statementDescriptor>
			<agentCode></agentCode>
			<channelCode></channelCode>
			<paymentExpiry></paymentExpiry>
			<mobileNo></mobileNo>
			<encCardData></encCardData>
			<tokenizeWithoutAuthorization></tokenizeWithoutAuthorization>
			<secureHash>$hash</secureHash>
		</PaymentRequest>";
?>
Variable Data Type Length Manda- tory Description Remark
version Character 5 Y Version of the Payment Request 9.3 payment request.
timeStamp Character 22 N Date and time of request Message. (if empty, system will take the server received date time.) Request DateTime in format of "ddMMyyHHmmss"
merchantID Character 15 Y Merchant ID Payment request merchant ID. Provided by 2C2P to merchant.
uniqueTransactionCode Character 20 Y Invoice No Transaction unique invoice number. Provided by merchant.
For 123 payment, maximum no of 12 non-zero leading number only.
desc Character 50 Y Product Description The following symbols are not allowed: !@#$%^&*()<>
amt Numeric 12 Y Payment amount. The amount will be padded with '0' from the left and include no decimal point. Example: 1 = 000000000100, 1.5 = 000000000150. Currency exponent is based on MasterCard GCMS.
currencyCode Numeric 3 Y Standard ISO4217 currency codes. Example :764 = Thai Baht
Currency Code List
paymentChannel Character 6 N Payment Channel for 3rd Party Payments (Leave empty for Credit Card payment) Options Available:
  • UPOP - China Union Pay
  • MPU - Myanmar Payment Union
  • ALIPAY - Alipay Payment
  • LINE - Line Pay Payment
  • PAYPAL - Paypal
  • 123 - 123 Payment
  • MPASS - MasterPass Payment
storeCardUniqueID Character 20 N Unique ID of store card info (generated and returned by 2c2p payment gateway if payment send with storeCard option value is "Y")
panBank Character 50 Y Credit Card Issuer Bank name. Keyed in by Customer on the merchant website. Example : Siam Commercial Bank
panCountry Character 2 Y Credit Card Issuer Bank Country Code Selected country by Customer on the merchant website. Example : TH , SG (following ISO 3166-1 alpha 2)
cardholderName Character 50 Y Card Holder Name Keyed in by customer at merchant site. Only the following characters are allowed. -_,'.A-Za-z&
cardholderEmail Character 50 Y Card Holde Email address Keyed in by customer at merchant site.
payCategoryID Character 10 N Merchant predefined payment category code for reporting Category Code registered at merchant dashboard
userDefined1 Character 150 N Merchant Defined information (Optional) 2c2p will response back to merchant whatever information include in request message of this field
userDefined2 Character 150 N Merchant Defined information (Optional) 2c2p system will response back to merchant whatever information include in request message of this field
userDefined3 Character 150 N Merchant Defined information (Optional) 2c2p system will response back to merchant whatever information include in request message of this field
userDefined4 Character 150 N Merchant Defined information (Optional) 2c2p system will response back to merchant whatever information include in request message of this field
userDefined5 Character 150 N Merchant Defined information (Optional) 2c2p system will response back to merchant whatever information include in request message of this field
storeCard Character 1 N Command to store cardholder data at processor. (Optional) if storecard value is 'Y', processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information. Note: If unique ID is present in the same request , this option will be ignored.
ippTransaction Character 1 N Command to do installment payment. (Mandatory for IPP transaction only) if ippTransaction value is 'Y', processor will process the installment payment.
installmentPeriod Numeric 2 N Installment Period. (Mandatory for IPP transaction only) Valid installment period provided by 2c2p.
interestType Character 1 N C/M (C - Customer Pay Interest / M - Merchant Pay Interest) (Mandatory for IPP transaction only) If set to C, interest is paid by Customer. If set to M, interest is paid by Merchant.
recurring Character 1 N Command to do recurring payment (Mandatory for Recurring payment only) If recurring value is 'Y' , processor will response recurring unique ID of the transaction data upon successful authorization. Next payment will be recurred by according to recurring setting.
(Only for Non-3D endpoint) If merchant is allowed to do manual recurring, merchant may send 'M' value, processor shall process the payment as recurring authorization and respond the payment status.
invoicePrefix Character 15 N Invoice number prefix (Mandatory for Recurring payment only) Invoice prefix will be used to generate invoice no of recurring payment. System will generate with invoice prefix followd by serial no in 5 digits format (e.g 123456789012345 + 00001).
recurringAmount Numeric 12 N Recurring Amount (Optional) the amount changed in recurring payment. If this value is not set , payment amount will be used for recurring payment.
allowAccumulate Character 1 N Allow accumulation if authorization failed. (Optional) Merchant can set 'Y' for yes and 'N' for no to allow accumulation in next recurring cycle.
maxAccumulateAmt Numeric 12 N Limit for the accumulate amount before terminate (Optional) if the current accumulate amount exceeded the limitation, the recurring cycle will be terminated.
recurringInterval Numeric 5 N Recurring interval in days. (Mandatory for Recurring payment only) Charge card every x days. Max value 365 (1 Year).
recurringCount Numeric 5 N Recurring total count allowed (Mandatory for Recurring payment only) Repeat this payment x times. Value '0' for endless loop until terminated manually.
chargeNextDate Character 8 N The next date of recurring payment. (Mandatory for Recurring payment only) Date in DDMMYYYY format. Default value is current date + recurring Interval.
promotion Character 20 N Promotion Code (Optional) Promotion Code if merchant wants to perform promotion payment. (e.g Promotion Code "V001" is set for Visa Card holder, only Visa card will be authorized, other cards will be blocked.) Merchant can set promotion by Card Type OR BIN.
request3DS Character 1 N 3DS option (Optional) Allowing merchant to specify enable/disable 3DS authentication
  • Y - Do 3ds (default)
  • N - Don't do 3ds
  • F - Force 3ds (Only ECI 02 / 05 are accepted)
statementDescriptor Character 20 N Dynamic statement description (Optional) Only allow alphanumeric in latin character.
agentCode Character 30 N Agent Code Mandatory parameter for 123 payment. It is the unique Agent code in 123 system.
Refer to 123 Agent Codes
channelCode Character 30 N Channel Code Unique Channel code in 123 system. If input request channel code is blank then system will use default value "OVERTHECOUNTER"
Refer to 123 Channel Codes
paymentExpiry Character 19 N Payment Slip Expiry Allowing merchant to specify payment expiry date/time for 123 service.
Format: yyyy-MM-dd HH:mm:ss
By default, 1-2-3 system will set the expiry according to merchant configuration.
mobileNo Numeric 10 N Mobile No of payer. Mandatory for 3rd Party 1-2-3 Payment
encCardData Character 255 Y Encrypted Card Information Encrypted data that contains Credit Card information to be submitted to 2c2p PGW
tokenizeWithoutAuthorization Char 1 N To only tokenize card without authorization Option only available when using secureHash
  • Y - Perform tokenization only
  • N - Perform normal authorization (default)
secureHash Character 150 Y Hash value computed by HMACSHA1 with secret key provided by 2C2P System. Refer to hashing section