API parameters

❗️

Important Notice

New version of Payment Action API has been released.
We are recommending our merchants to refer new guide Payment Maintenance to implement Payment Action API.

📘

Data types

N - Numeric
C - Characters (AlphaNumeric and symbols)

Payment Action Request Parameter


Sample Request

<PaymentProcessRequest>
	<version>3.3</version>
	<timeStamp></timeStamp>
	<merchantID></merchantID>
	<processType></processType>
	<invoiceNo></invoiceNo>
	<actionAmount></actionAmount>
	<bankCode></bankCode>
	<accountName></accountName>
	<accountNumber></accountNumber>
	<subMerchantList>
		<subMerchant subMID="" subAmount="" />
		<subMerchant subMID="" subAmount="" />
	</subMerchantList>
	<notifyURL></notifyURL>
	<hashValue></hashValue>
</PaymentProcessRequest>

Detailed descriptions of the parameters are explained in the following table:

VariableData TypeLengthMandatoryDescriptionRemark
versionNumeric5YVersion of the Payment Request3.1
timeStampCharacter22NDate and time of request Message. (if empty, system
will take the server received date time.)
Requst DateTime
in format of
"ddMMyyHHmmss"
merchantIDCharacter15YMerchant IDPayment request merchant ID. Provided by 2C2P to merchant.
processTypeCharacter2YPayment process command.
I = Inquiry
S = Settlement
V = Void/Cancel
R = Refund
RS = Refund Status
Refund option availability
depends on the bank and payment channel.
invoiceNoCharacter50YInvoice No / order IDTransaction unique invoice number. Generated by merchant.
actionAmountNumeric13NRefund / settle amount in 2 decimal format.
Required only for Refund and Settlement request.
The amount should not exceed original transaction amount.
If partial refund was made, the total refund amount
(previous+current refund) should not exceed original transaction amount.
Example: 1.00, 100.00, 1000.00
bankCodeCharacter10NCustomer’s account’s bank code.(Only applicable to APM transaction Refund request. NOT required for Malaysia.)
accountNameCharacter50NCustomer’s bank account name(Only applicable to APM transaction Refund request. NOT required for Malaysia.)
accountNumberCharacter50NCustomer’s bank account number(Only applicable to APM transaction Refund request. NOT required for Malaysia.)
subMerchantListArrayN(Only applicable to MasterMerchant Account)
subMerchant subMIDhashValue15NSub Merchant ID
Required only for Master Merchant Account
sub merchant’s MID provided by 2C2P.
subMerchant subAmountNumeric13NRefund / settle amount in 2
decimal format. Required only for Master Merchant Account
The total of subAmount(s)
must match the action Amount.
Example: 1.00, 100.00, 1000.00
notifyURLCharacter250NURL to notify final refund statuswill notify with the same format as ‘PaymentProcessResponse’
hashValueCharacter150YHash value computed by
HMACSHA1 with secret key provided by 2C2P System.

Payment Action Response Parameters


Sample Response

<PaymentProcessResponse>
	<version></version>
	<timeStamp></timeStamp>
	<respCode></respCode>
	<respDesc></respDesc>
	<processType></processType>
	<invoiceNo></invoiceNo>
	<amount></amount>
	<status></status>
	<approvalCode></approvalCode>
	<referenceNo></referenceNo>
	<transactionDateTime></transactionDateTime>
	<paidAgent></paidAgent>
	<paidChannel></paidChannel>
	<maskedPan></maskedPan>
	<eci></eci>
	<subMerchantList>
 		<subMerchant subMID="" subAmount="" />
		<subMerchant subMID="" subAmount="" />
	</subMerchantList>
	<refundList>
		<refund referenceNo="" status="" amount="" dateTime=”” userDefined1="" ... userDefined5=""/>
		<refund referenceNo="" status="" amount="" dateTime=”” userDefined1="" ... userDefined5=""/>
	</refundList>
	<paymentScheme></paymentScheme>
	<processBy></processBy>
	<hashValue></hashValue>
</PaymentProcessResponse>

Detailed descriptions of the parameters are explained in the following table:

VariableData TypeLengthMandatoryDescriptionRemark
versionCharacter5YVersion of the Payment Action
Request
3.1
timeStampCharacter22YDate and time of request MessageRequest DateTime in format of "ddMMyyHHmmss"
respCodeCharacter2YResponse codeRefer Result Code
respDescCharacter100Yresponse code
description
processTypeCharacter2YPayment process command.
I = Inquiry
S = Settlement
V = Void/Cancel
R = Refund
RS = Refund Status
Refund inquiry availability
depends on the bank and payment channel.
invoiceNoCharacter50YInvoice No / order IDTransaction unique invoice number. Generated by merchant.
amountNumeric13NPayment amount made by customer, or refund /
captured amount
Example: 1.00, 100.00, 1000.00
statusCharacter3YStatus of the transaction
requested
Refer Transaction Status Code
approvalCodeCharacter6NTransaction Approval CodeApproval code provided by Credit Card Host or from WebPay provider.
referenceNoCharacter30NReference numbertrace no for credit card payment, RefNo1 for APM
payment, Refund reference no when requesting Refund.
transactionDateTimeCharacter14NTransaction Date Time value with 'yyyyMMddhhmmss' format
paidAgentCharacter30NAgent Code that customer made payment with.Refer Paid Agent List
paidChannelCharacter30NChannel Code that
customer made
payment with.
Refer [Paid Channel List]
(doc:payment-action-references#section-paid-channel-list)
maskedPanCharacter16NMasked Credit Card NumberMasked Card Format based on merchant profile setting.
• First 6 Last 4 (411111XXXXXX1111)
• Last 4 (XXXXXXXXXXXX1111)
eciCharacter3NTransaction Approval Code
from Credit Card Host
(only for creditcard payment)
3DS E-Commerce Indicator
subMerchantListArrayN(Only applicable to Master Merchant Account)
subMerchant subMIDCharacter15NSub Merchant ID
Required only for Master Merchant Account
sub merchant’s MID provided by 2C2P.
subMerchant subAmountNumeric13NRefunded / settled amount in 2 decimal format.
Required only for Master Merchant Account
Example: 1.00, 100.00, 1000.00
refundListArrayN(Only applicable to Refund Status request)
refund referenceNoCharacter30NReference numberRefund reference number returned by PGW when
refund request was completed
refund statusCharacter3NStatus of the transaction requestedRefer to Transaction Status code
refund amountNumeric13NPayment amount made by customer, or refund / captured amount.Example: 1.00, 100.00, 1000.00
refund dateTimeCharacter14Nrefund approval Date Time with yyyyMMddhhmmss
format
paymentSchemeCharacter2NCard brand /
Payment Scheme
Card brand or Payment Scheme of the payment
VI - VISA
MA - MASTER
JC - JCB
AM - AMEX
DI - DINNER
UP - Union Pay
MP - MPU
AL - ALIPAY
LP - LINEPAY
PA - PAYPAL
AP - ALTERNATIVE
PAYMENT
WC - WECHAT

Refer to Payment Scheme / Process by
processByCharacter2NPayment Process
By code
Payment processing network
of the payment
VI - VISA
MA - MASTER
JC - JCB
AM - AMEX
DI - DINNER
UP - Union Pay
MP - MPU
AL - ALIPAY
LP - LINEPAY
PA - PAYPAL
AP - ALTERNATIVE
PAYMENT
WC - WECHAT

Refer to Payment Scheme / Process by
hashValueCharacter150YHash value computed by
HMACSHA1 with secret key
provided by 2C2P System.

Card Tokenization Request Parameters


Sample Request

<MaintenanceRequest>
	<version>2.3</version>
	<timeStamp></timeStamp>
	<merchantID></merchantID>
	<storeCardUniqueID></storeCardUniqueID>
	<pan></pan>
	<panBank></panBank>
	<panCountry></panCountry>
	<panCurrency></panCurrency>
	<cardholderName></cardholderName>
	<cardholderEmail></cardholderEmail>
	<panExpiry></panExpiry>
	<action></action>
	<hashValue></hashValue>
</MaintenanceRequest>

Detailed descriptions of the parameters are explained in the following table.

VariableDataTypeLengthMandatoryDescriptionRemark
VersionCharacter5YVersion of
the payment
request
2.3
timeStampCharacter22NDate and time of the maintenance request. (if
empty, system will take server received date time.)
Requst DateTime in format of
"ddMMyyHHmmss"
merchantIDCharacter15YMerchant IDmerchant ID provided by 2C2P to merchant.
storeCardUniqueIDCharacter20NUnique ID of store card info.Mandatory if action is not ‘A’.
storeCardUniqueID as provided by processor previously.
panBankCharacter50NCredit Card Issuer Bank name.Keyed in by Customer on the
merchant website.
Example: Siam Commercial Bank
panCountryCharacter2NCredit Card Issuer Bank Country CodeSelected country by Customer on the merchant website.
Example: TH, SG (following ISO 3166-1 alpha 2)
cardholderNameCharacter50NCardholder NameKeyed in by customer at merchant site. Only the following characters are
allowed. -_,'.A-Za-z&
cardholderEmailCharacter50NCardholder Email addressKeyed in by customer at merchant site.
panExpiryCharacter4NCredit Card ExpiryCredit Card Expiry in MMYY format (e.g 0215)
panCharacter19NFULL Card NumberFor “Add” request only
panCurrencyCharacter3NCredit Card Primary Currency
Code
3 Numeric Currency Code
e.g 764, 702
actionCharacter1YMaintenance action commandA = Add
I = Inquiry
D = Delete
U = Update
hashValueCharacter150YHash value computed by
HMACSHA256 with secret key
provided by 2C2P System.

Card Tokenization Response Parameters


Sample Response

<MaintenanceResponse>
	<version>2.4</version>
	<timeStamp></timeStamp>
	<merchantID></merchantID>
	<respCode></respCode>
	<respReason></respReason>
	<panBank></panBank>
	<storeCardUniqueID></storeCardUniqueID>
	<panCountry></panCountry>
	<cardholderName></cardholderName>
	<cardholderEmail></cardholderEmail>
	<panMasked></panMasked>
	<hashValue></hashValue>
</MaintenanceResponse>

Detailed descriptions of the parameters are explained in the following table.

VariableDataTypeLengthMandatoryDescriptionRemark
VersionCharacter5YVersion of the payment request2.4
timeStampCharacter22YDate and time of the maintenance request.Requst DateTime in
format of "ddMMyyHHmmss"
merchantIDCharacter15YMerchant IDPayment request merchant
ID. Provided by 2C2P to merchant
respCodeCharacter2YThe code whether The transaction is successful or not.00 = Success
RespCode not 00 is
failed.
respReasonCharacter100YReason of failure
panBankCharacter50NCredit Card Issuer Bank nameKeyed in by Customer on the
merchant website.
Example: Siam Commercial Bank
storeCardUniqueIDCharacter20YUnique ID of store card info.storeCardUniqueID as provided by processor previously.
panCountryCharacter2NCredit Card Issuer Bank Country CodeExample: TH, SG
(following ISO 3166-1 alpha 2)
cardholderNameCharacter50NCardholder NameKeyed in by customer at merchant site.
cardholderEmailCharacter50NCardholder Email addressKeyed in by customer at merchant site.
panMaskedCharacter19NMasked Card NumberMasked Card Format based on merchant profile setting.
• First 6 Last 4 (411111XXXXXX1111)
• Last 4 (XXXXXXXXXXXX1111)
hashValueCharacter150YHash value computed by
HMACSHA256 with secret
key provided by 2C2P System.

RPP (Recurring Payment Plan) Maintenance Request Parameters


Sample Request

<RecurringMaintenanceRequest>
	<version></version>
	<timeStamp></timeStamp>
	<merchantID></merchantID>
	<recurringUniqueID></recurringUniqueID>
	<processType></processType>
	<recurringStatus></recurringStatus>
	<amount></amount>
	<allowAccumulate></allowAccumulate>
	<maxAccumulateAmount></maxAccumulateAmount>
	<recurringInterval></recurringInterval>
	<recurringCount></recurringCount>
	<chargeNextDate></chargeNextDate>
	<chargeOnDate></chargeOnDate>
	<hashValue></hashValue>
</RecurringMaintenanceRequest>

Detailed descriptions of the parameters are explained in the following table.

VariableData TypeLengthMandatoryDescriptionRemark
versionCharacter5YVersion of the Recurring Maintenance Request2.4
timeStampCharacter22YDate and time of request MessageRequest DateTime in format
of "ddMMyyHHmmss"
merchantIDNumeric20YMerchant IDmerchant ID Provided by 2C2P to merchant.
recurringUniqueIDNumeric20YThe unique id of recurring payment cycleThis id is returned by 2C2P to merchant for recurring payment request.
processTypeChar1YPayment process command.
I = Inquiry
C = Cancel
U = Update
recurringStatusCharacter1NThe active status of recurring
payment cycle.
The value is either Y (yes) or N (no).
Merchant can set ‘Y’ for active and ‘N’ for inactive.
It is mandatory for Update Request.
amountNumeric12NRecurring amount in 12 digits leading zero format.It is mandatory for Update Request.
allowAccumulateCharacter1NAllow accumulation if authorization failed.Merchant can set ‘Y’ for yes and ‘N’ for no to allow
accumulation in next recurring
cycle. It is mandatory for Update Request.
maxAccumulateAmountNumeric12NLimit for the accumulate
amount before terminate. Format is 12 digits leading
zero format.
If the current accumulate
amount exceeded the limitation, the recurring cycle will be terminated.
It is mandatory for Update Request.
recurringIntervalNumeric5NRecurring Interval in days

NOTE : if this parameter is used, please do not passed in value for parameter chargeOnDate due to only 1 condition can be applied.
Charge card every x days. Max value 365(1 year).
It is mandatory for Update Request.
recurringCountNumeric5NRecurring total count allowed.Repeat this payment x times.
Value ‘0’ for endless loop until
terminated manually.
It is mandatory for Update Request.
chargeNextDateCharacter8NThe next date of recurring paymentDate in DDMMYYYY format. No value will be current date
+ recurring Interval.
It is mandatory for Update Request.
chargeOnDateCharacter8NCharge On Date,

format : ddMM

NOTE : if this parameter is used, please do not passed in value for parameter recurringInterval due to only 1 condition can be applied.
Charge card on X day of the month. dd for Day, MM for Month.

It is mandatory for Update Request when recurringInterval is NULL / EMPTY
hashValueCharacter150YHash value computed by
HMACSHA256 with secret key
provided by 2C2P System.

RPP (Recurring Payment Plan) Maintenance Response Parameters


Sample Response

<RecurringMaintenanceResponse>
	<version></version>
	<timeStamp></timeStamp>
	<respCode></respCode>
	<respReason></respReason>
	<recurringUniqueID></recurringUniqueID>
	<recurringStatus></recurringStatus>
	<invoicePrefix></invoicePrefix>
	<currency></currency>
	<amount></amount>
	<maskedCardNo></maskedCardNo>
	<allowAccumulate></allowAccumulate>
	<maxAccumulateAmount></maxAccumulateAmount>
	<recurringInterval></recurringInterval>
	<recurringCount></recurringCount>
	<currentCount></currentCount>
	<chargeNextDate></chargeNextDate>
	<chargeOnDate></chargeOnDate>
	<hashValue></hashValue>
</RecurringMaintenanceResponse>

Detailed descriptions of the parameters are explained in the following table.

VariableData TypeLengthMandatoryDescriptionRemark
versionCharacter5YVersion of the Recurring
Maintenance Request
2.4
timeStampCharacter22YDate and time of request MessageRequst DateTime in format of
"ddMMyyHHmmss"
respCodeCharacter3yResponse Code of recurring
maintenance request.
00 = success
respCode not 00 is failed.
respReasonCharacter100NReason of Failure
recurringUniqueIDNumeric20YThe unique id of recurring payment cycle
recurringStatusCharacter1NThe active status of recurring
payment cycle.
The value is either Y (yes) or N (no).
invoicePrefixCharacters15NInvoice Prefix
CurrencyNumeric3Npayment currency in ISO4217 three Numeric codeRefer to Currency List
amountNumeric12NRecurring amount in 12 digits leading zero format.
maskedCardNoCharacter16NMasked Credit Card NumberMasked Card Format based on merchant profile setting.
• First 6 Last 4 (411111XXXXXX1111)
• Last 4 (XXXXXXXXXXXX1111)
allowAccumulateCharacter1NAllow accumulation if authorization failed.The value is ‘Y’ for yes and ‘N’ for no
maxAccumulateAmountNumeric12NLimit for the accumulate
amount before terminate. Format is 12 digits leading
zero format.
recurringIntervalNumeric5NRecurring Interval in daysCharge card everyx days. Max value 365(1 year).
recurringCountNumeric5NRecurring total count allowed.Repeat this payment x times.
Value ‘0’ for endless loop until
terminated manually.
currentCountNumeric5NCurrent recurring count of recurring cycle.
chargeNextDateCharacter8NThe next date of recurring paymentDate in DDMMYYYY format. No value will be current date + recurring Interval.
chargeOnDateCharacter8NCharge On Date,

ddMM
hashValueCharacter150YHash value computed by
HMACSHA256 with secret key
provided by 2C2P System.

IPP Option Request Parameters


Sample Request

<IppOptionRequest>
	<version>2.3</version>
	<timeStamp>041016180647</timeStamp>
	<merchantID>JT</merchantID
	<hashValue>478DBA0F2CAA63D22B6B214CE1CC6ACB467C6D1A</hashValue>
</IppOptionRequest>

Detailed descriptions of the parameters are explained in the following table.

VariableData TypeLengthMandatoryDescriptionRemark
versionNumeric5YVersion of the Payment Request
timeStampCharacter22NDate and time of request Message.
(if empty, system will take the server received date time.)
Requst DateTime in format of
"ddMMyyHHmmss"
merchantIDCharacter15YMerchant IDPayment request merchant ID. Provided by 2C2P to merchant.
hashValueCharacter150YHash value computed by
HMACSHA256 with secret key provided by 2C2P System.

IPP Option Response Parameters


Sample Response

<IppOptionResponse>
	<version>2.3</version>
	<timeStamp>041016180707</timeStamp>
	<respCode>00</respCode>
	<respReason>Success</respReason>
	<ippBanks>
	<ippBank>
		<bankName>2C2P Simulator</bankName>
		<bankShortName>SIMU</bankShortName>
		<bankLogoUrl>https://d11fwxgc8zkidi.cloudfront.net/images/ippbanklogo/23.png</bankLogoUrl>
		<bankPromoUrl>https://d11fwxgc8zkidi.cloudfront.net/images/ipppromologo/23.png</bankPromoUrl>
		<bankTerms>Demo terms and conditions</bankTerms>
 		<bins>
			<bin>300307</bin>
			<bin>365988</bin>
		</bins>
		<installmentOptions>
			<option id="1" installmentPeriod="10" merInterestRate="-1.00" cusInterestRate="1.00" minAmount="100.00" currencyCode="THB" validFrom="2016-03-01" validUntil="2022-03-31" />
		</installmentOptions>
	</ippBank>
	<ippBank>
		<bankName>Bangkok Bank</bankName>
		<bankShortName>BBL</bankShortName>
		<bankLogoUrl>https://d11fwxgc8zkidi.cloudfront.net/images/ippbanklogo/3.png</bankLogoUrl>
		<bankPromoUrl>https://d11fwxgc8zkidi.cloudfront.net/images/ipppromologo/3.png</bankPromoUrl>
		<bankTerms>TOC</bankTerms>
		<bins>
			<bin>411111</bin>
			<bin>544485</bin>
		</bins>
		<installmentOptions>
			<option id="1" installmentPeriod="3" merInterestRate="0.40" cusInterestRate="0.50" minAmount="1.00" currencyCode="THB" validFrom="2014-07-01" validUntil="2020-12-31" />
		</installmentOptions>
	</ippBank>
	</ippBanks>
	<hashValue>965C8DB713EF63FD50D86DA972BBD4C8E31659F6</hashValue>
</IppOptionResponse>

Detailed descriptions of the parameters are explained in the following table.

VariableData TypeLengthMandatoryDescriptionRemark
versionCharacter5YVersion of the Payment Action
Request
2.3
timeStampCharacter22YDate and time of request MessageRequest DateTime in
format of "ddMMyyHHmmss"
respCodeCharacter3YResponse Code of payment request XML. Initial character
of the response code represents payment request type.
00 = success
Response code not 00 is failed.
respReasonCharacter100NReason of Failure
ippBanksArrayNArray of ippBank
bankNameCharacter250YIPP Bank Name
bankShortNameCharacter250YBank Short Name /
Bank Code
bankTermsCharacter-YTerms and condition
of Bank
bankLogoUrlCharacter250YBank Logo URL
bankPromoUrlCharacter250YBank Promo URL
binsArrayArray of bin
binCharacter6YAllow BIN
installmentOptions
option idNumeric2YSerial No for Option
option installmentPeriodNumeric2YNo of Months IPP Period
option merInterestRatedecimal2,2YMerchant Pay Interest RateNegative value means there is no option for merchant pay interest
option cusInterestRatedecimal2,2YCustomer Pay Interest RateNegative value means there is no option for customer pay interest
option minAmountdecimal2,2YMinimum amount to be Eligible for IPP
option currencyCodeCharacter3YPayment Currency to be eligible for IPPin 3 Char Currency Code.
e.g THB, SGD
option validFromdate10YOption valid from Date
format: yyyy-MM-dd
option validUntildate10YOption valid Until Date
format: yyyy-MM-dd
hashValueCharacter150YHash value computed by
HMACSHA256 with secret key provided by 2C2P System

Next: References