Welcome to the 2C2P Developer Zone

This is the resource where developers can find all the information needed to integrate the services offered by 2C2P with their e commerce system.

API Variables

Overview of all available Variables

Access URL for the Payment Gateway API

In order to use SecurePay you need to use a specific endpoint at the following URL

Payment Request Variables

Values in the column Mandatory translate as follows:

M > Mandatory
C > Conditional (Mandatory for some features only)
O > Optional (added value but not required)

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 5 M Version Number of payment request, Example: 9.1
2 timeStamp Varchar 22 O Date and time of the request message, Format : yyyyMMddHHmmss,
yyyy = 4 numeric digits, ,
MM = 2 numeric digits with value 01-12,
dd = 2 numeric digits with value 01-31,
HH = 2 numeric digits with value 00-24,
mm = 2 numeric digits with value 00-59,
ss = 2 numeric digits with value 00-59, if empty,
received date time of server is applied
3 MerchantID Varchar 15 M Unique Identifier of merchant, assigned by 2C2P
4 uniqueTransactionCode Varchar 20 M Invoice number, unique per transaction, provided by merchant
Format : characters or numeric(or both), Example: ABCD12345
5 desc Varchar 50 M The description of product,
The following symbols are not allowed:
!@#$%^&*()<>
6 amt Numeric 12 M Purchase amount,
Format : pad left ‘0’ if not filled with 12 numeric and the last 2 digits is for exponent.
Example: 000000010000 represents 100.00
7 currencyCode Varchar 3 M ISO 4217 Currency Code,
Example: 764 for Thai Baht
8 paymentChannel Varchar 6 C Payment Channel selection for 3rd Party Payments,
(Leave empty for card payment),
Options Available:
UPOP - China Union Pay
MPU - Myanmar Payment Union,
ALIPAY - Alipay Payment,
PAYPAL- PayPal Payment,
123 - 123 Payments
9 storeCardUniqueID Varchar 20 C Unique ID of store card info (generated and returned by 2c2p payment gateway uses storeCard option value is "Y" (aka token)
10 panBank Varchar 50 M Credit Card Issuer Bank name
11 panCountry Varchar 2 M Credit Card Issuer Bank Country Code, 2 letter ISO 3166
12 cardholderName Varchar 50 M Cardholder Name (Latin characters only)
13 cardholderEmail Varchar 50 Y Cardholder Email address
14 payCategoryID Varchar 10 O Merchant predefined payment category code for reporting purpose
15 userDefined1 Varchar 150 O (Optional) Merchant defined information, 2C2P system will response back to merchant with information included in request message of this field
16 userDefined2 Varchar 150 O (Optional) Merchant defined information, 2C2P system will response back to merchant with information included in request message of this field
17 userDefined3 Varchar 150 O (Optional) Merchant defined information, 2C2P system will response back to merchant with information included in request message of this field
18 userDefined4 Varchar 150 O (Optional) Merchant defined information, 2C2P system will response back to merchant with information included in request message of this field
19 userDefined5 Varchar 150 O (Optional) Merchant defined information, 2C2P system will response back to merchant with information included in request message of this field
20 storeCard Varchar 1 C Selection to store cardholder data at 2C2P (Optional) if storecard value is ‘Y’,
2C2P will response with unique ID for the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information.
Note: If UniqueID is present in the same request, this option will be ignored.
21 ippTransaction Varchar 1 C Command to do installment payment,
(Mandatory for IPP transaction only) if ippTransaction value is 'Y', processor will allow / process the installment payment.
22 installmentPeriod Numeric 2 C Installment Period, (Mandatory for IPP transaction only) Valid installment period details as set by 2c2p.
23 interestType Varchar 1 C Variable can be C / M
(C - Customer Pay Interest / M - Merchant Pay Interest)
(Mandatory for IPP transaction only)
If set to C, interest is paid by Customer <brt> If set to M, interest is paid by Merchant.
24 recurring Varchar 1 C 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.
If recurring value is ‘M’, request payment will be sent to bank with 00/00 expiry
NOT APPLICABLE for 3-Party,123 Payments
25 invoicePrefix Varchar 15 C 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,
Example 123456789012345 + 00001
26 RecurringAmount Numeric 12 C Recurring Amount, (Optional) the amount changed in recurring payment.
If this value is not set , the payment amount will be used for recurring payment.
27 allowAccumulate Varchar 1 C Allow accumulation if authorization failed.
(Optional) Merchant can set 'Y' for yes and 'N' for no to allow accumulation in next recurring cycle.
28 maxAccumulateAmt Numeric 12 C Limit for the accumulate amount before terminate
(Optional) if the current accumulate amount exceeded the limitation, the recurring cycle will be terminated.
29 recurringInterval Numeric 5 C Recurring interval in days.
(Mandatory for Recurring payment only) Charge card every x days. Max value 365 (1 Year).
30 recurringCount Numeric 5 C Recurring total count allowed (Mandatory for Recurring payment only) Repeat this payment x times. Value '0' for endless loop until terminated manually.
31 chargeNextDate Character 8 C The next date of recurring payment.
Date in DDMMYYYY format.
If it is recurring payment, with recurringInterval filled in, charge_next_date can be optional, if blank then system will calculate charge_next_date based on recurringInterval
32 promotion Varchar 20 O Promotion Code, if merchant wants to perform promotion payment.
(e.g Promotion Code “V001” is for Visa Card holder, payment gateway will accept only Visa Card for this payment.) Merchant can set promotion by Card Type OR BIN.
33 request3DS Varchar 1 O 3DS option, (Optional) Allows merchant to enable/disable 3DS authentication,
Y - Do 3ds (default),
N - Don't do 3ds,
F - Force 3ds (Only ECI 02 / 05 are accepted)
34 statementDescriptor Varchar 20 O Dynamic statement description, (Optional) Only allows alphanumeric in latin character.
35 agentCode Varchar 30 C Agent Code, Mandatory parameter for 123 payment. It is the unique Agent code in 123 system, Refer to 123 Agent Codes
36 channelCode Varchar 30 C Channel Code, Unique Channel code in 123 system. If input channel Code is blank then system will use default value "OVERTHECOUNTER" , refer to 123 Channel Codes
37 paymentExpiry Varchar 19 C Payment Slip Expiry, Allows merchant to specify payment expiry date/time for 123 service,
Format: yyyy-MM-dd HH:mm:ss,
Default for expiry will be merchant configuration in 123 system
38 mobileNo Numeric 10 C Mobile No of payer, Mandatory for 3rd Party 123 Payment
39 encCardData Varchar 255 C Encrypted Card Information, Contains encrypted Card information to be submitted to 2C2P, Mandatory for Card Payments
40 secureHash Varchar 150 M Hash value computed by HMACSHA1 with secret key provided by 2C2P
Format: Signature String: version + timeStamp + merchantID + uniqueTransactionCode + desc + amt + currencyCode + paymentChannel + storeCardUniqueID + panBank + panCountry + cardholderName + cardholderEmail + payCategoryID + userDefined1 + userDefined2 + userDefined3 + userDefined4 + userDefined5 + storeCard + ippTransaction + installmentPeriod + interestType + recurring + invoicePrefix + recurringAmount + allowAccumulate + maxAccumulateAmt + recurringInterval + recurringCount + chargeNextDate + promotion + request3DS + statementdescriptor+ agentCode + channelCode + paymentExpiry + mobileNo + encCardData

Payment Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 Version Varchar 5 M Version Number, Example: 9.1
2 TimeStamp Varchar 22 M Date and time of the response message, Format : ddMMyyHHmmss,
yyyy = 4 numeric digits,
MM = 2 numeric digits with value 01-12,
dd = 2 numeric digits with value 01-31,
HH = 2 numeric digits with value 00-24,
mm = 2 numeric digits with value 00-59,
ss = 2 numeric digits with value 00-59,
Example : 2014-02-28 23:59:59
3 MerchantID Varchar 15 M Unique Identifier of merchant, assigned by 2C2P
4 respCode Varchar 2 M The indicator for the transaction result,
00 = Approved;
05 = Do Not Honor;
More details at Reference Doc - Codes
For 123 Payment:
001 = Success(Pending);
000 = Success(Paid);
More detail at 123 Response Code
5 pan Varchar 16 M Masked Credit Card Number, First 6 and last 4 digits of credit card number.
Example : 444411xxxxxx1111,
store for reference
6 amt Numeric 12 M Transaction amount,
Format : pad left ‘0’ if not filled with 12 numeric and the last 2 digits is for exponent.
Example: 000000010000 represents 100.00
7 uniqueTransactionCode Varchar 20 M Invoice No. The invoice no from the Payment Request, supplied by merchant. <brt> The invoice number needs to be unique to trace the transaction.
Please pad '0' to the left in the case of generated invoice number length is shorter than 20.
8 tranRef Varchar 28 M Transaction Reference for the Payment Routing System, Issued by System.
Tracer for the transaction in the Routing System.
9 approvalCode Varchar 6 M Transaction Approval Code from Credit Card Network, For 123 and PayPal Payments value will be blank.
10 refNumber Varchar 15 M Transaction Reference Number from Credit Card Network
11 eci Numeric 2 M ECI value, 3DS result code
12 dateTime Numeric 14 M Process Date/Time value using ddMMyyHHmmss format
13 status Varchar 1-3 M Last status of transaction, see Transaction Status List in Reference Doc
14 failReason Varchar 100 C Reason of failure, see to Payment Result Code in Reference Doc
15 userDefined1 Varchar 150 O User defined info from request message
16 userDefined2 Varchar 150 O User defined info from request message
17 userDefined3 Varchar 150 O User defined info from request message
18 userDefined4 Varchar 150 O User defined info from request message
19 userDefined5 Varchar 150 O User defined info from request message
20 storeCardUniqueID Varchar 20 C Unique ID of store card info, Unique ID of store card info will be generated by process if 'storeCard' parameter is set to 'Y' at payment request XML.
21 recurringUniqueID Numeric 20 C The unique id of recurrent payment cycle, it will be generated by 2C2P if merchant set the recurring parameters.
22 paymentChannel Numeric 3 C Payment Channel Indicator for 123 payments, Values as per table below
23 backendInvoice Varchar 12 C Invoice No, Only applicable to 123
24 paidAgent Varchar 30 C Agent Code, Only applicable for 123 Channel, for other channels it will be blank.
25 paidChannel Varchar 30 C Channel Code, Only applicable for 123 Channel, for other channels it will be blank.
26 issuerCountry Varchar 2 O Card Issuer Country Code
27 bankName Varchar 50 O Bank Name
28 cardExp Numeric 4 O Customer Card Expiry Date

ECI Variables

Visa / JCB

ECI Value Description
05 Card holder and issuing bank are 3D Secure. 3D Secure authentication successful.
06 One of card holder or issuing bank not registered as a 3D Secure.
07 Card holder and issuing bank not registered as a 3D Secure.

Mastercard

ECI Value Description
02 Card holder and issuing bank are 3D Secure. 3D Secure authentication successful.
01 One of card holder or issuing bank not registered as a 3D Secure.
00 Card holder and issuing bank not registered as a 3D Secure.

123 Payment Channel Response Codes

Response Code Response Description
001 Credit and debit
002 Cash payment channel
003 Direct Debit
004 Others