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.

QuickPay Variables

General

QuickPay for Card Transactions has 2 different API's and endpoints:

One for the Direct API call, that generates the QuickPay Link and returns it to you via a response message and the merchant will need to distribute the URL (usually used for white label services).

The second is for merchants that want the creation and distribution of the URL using the services of 2C2P, therefore called the Delivery API

Sample requests for the following QuickPay options are available here

Access URL's for QuickPay



Below the links needed to test the QuickPay API for the test environment

Production requests can be send to the URL's below

API Type URL for Endpoint
Direct API https://t.2c2p.com/QuickPay/DirectAPI
Delivery API https://t.2c2p.com/QuickPay/DeliveryAPI

HMACSHA1 Hashing

To ensure data integrity and to identify the correct source of the request and response,
a merchant needs to send hash value as part of the request and The 2C2P system returns a hash
value in the response.

The hash value is computed using the HMACSHA1 algorithm with the merchant secret key (provided by 2C2P to merchant, see also the merchant interface, section Account - Options .

The merchant needs to ensure that the hash value is checked before any payment status updates are made to the merchants system.

The signature string is specific to each request and response type, see the variables below for details.

QuickPay Direct API

The Direct API call allows merchants to generate a purpose build URL that is specific to one transaction at your end. The resulting URL is send to the merchant system and can be shared with the customer.

There are 4 different options available

  • Generate the QuickPay URL
  • Query the QuickPay transaction
  • Update the QuickPay transaction
  • Delete the QuickPay transaction

Further details for each are available below:

Generate the QuickPay URL

The request types to Generate a QuickPay URL are

  • GenerateQPReq
  • GenerateQPRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 orderIdPrefix Varchar 14 M Prefix of merchant order number for transaction done using this QuickPay URL.
Only alphanumeric and special character of _- allowed.
5 description Varchar 150 M Description of QuickPay URL. Only alphanumeric and special character of ._#- allowed.
6 currency Varchar 3 M Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
7 amount Varchar 12 M Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
8 allowMultiplePayment Varchar 1 C Y = Yes, N = No. allow multiple payment to be made with this QP URL. Default value = N
9 maxTransaction Numeric 4 C Maximum no of approved transaction allowed. Value 1 to 1000, If you have 10 items to sell, put 10 as value.
10 expiry Varchar 8 M Expiry date of the QP URL with format of DDMMYYYY
11 userData1 Varchar 255 O User data
12 userData2 Varchar 255 O User data
13 userData3 Varchar 255 O User data
14 userData4 Varchar 255 O User data
15 userData5 Varchar 255 O User data
16 promotion Varchar 20 C Promotion code to filter promotion transactions
17 categoryId Varchar 20 C Predefined payment category code for reporting purpose.
18 resultUrl1 Varchar 255 C Front end return URL
19 resultUrl2 Varchar 255 C Back end return URL
20 paymentOption Varchar 1 C To restrict customer payment methods / channel:
F – Full amount payment only
I – Installment payment plan only
C – Credit card payment only
All available options, By default A option is selected.
21 ippInterestType Varchar 1 C To allow merchant to specify IPP Interest type.
M – Merchant Pay interest option only
C – Customer Pay interest option only
A – all available options, By default A is selected.
22 paymentExpiry Varchar 19 C Allow merchant to specify payment expiry date/time for 1-2-3 service.
Format: yyyy-MM-dd HH:mm:ss, by default, expiry value is taken from merchant configuration.
23 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + orderIdPrefix + description + currency + amount + allowMultiplePayment + maxTransaction + expiry + userData1 + userData2 + userData3 + userData4 + userData5 + promotion + categoryId + resultUrl1 + resultUrl2 + paymentOption + ippInterestType + paymentExpiry
using secret_key provided by 2C2P to merchant.

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M quickPay ID
4 orderIdPrefix Varchar 14 M Prefix of merchant order number for transaction done using this QuickPay URL.
Only alphanumeric and special character of _- allowed.
5 currency Varchar 3 M Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
6 amount Varchar 12 M Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
7 expiry Varchar 8 M Expiry date of the QP URL with format of DDMMYYYY
8 url Varchar 255 M Quickpay URL
9 resCode Numeric 3 M Response status code
10 resDesc Varchar 50 M Response status short description
11 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + qpID + orderIdPrefix + currency + amount + expiry + url + resCode + resDesc
using secret_key provided by 2C2P to merchant

Once the merchant receives the QuickPay URL it can be forwarded to the customer by the merchant. Alternatively the merchant can use the Delivery API for follow up actions by 2C2P.

Besides the URL generation there are 3 more options available for the Direct API

QuickPay Query - allows to check the status of an existing QuickPay transaction
QuickPay Update - allows a modification of an existing QuickPay transaction
QuickPay Delete - allows deletion of an existing QuickPay transaction

QuickPay Query

Used for checking the status of an existing URL
The request types to Query a QuickPay URL are

  • QPQueryReq
  • QPQueryRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 qpID Numeric 1-10 M QuickPay ID
5 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + qpID
using secret_key provided by 2C2P to merchant

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M QuickPay ID
4 orderIdPrefix Varchar 14 M Prefix of merchant order number for transaction done using this QuickPay URL.
Only alphanumeric and special character of _- allowed.
5 description Varchar 150 M Description of QuickPay URL. Only alphanumeric and special character of ._#- allowed.
6 currency Varchar 3 M Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
7 amount Varchar 12 M Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
8 allowMultiplePayment Varchar 1 C Y = Yes, N = No. allow multiple payment to be made with this QP URL. Default value = N
9 maxTransaction Numeric 4 C Maximum no of approved transaction allowed. Value 1 to 1000, If you have 10 items to sell, put 10 as value.
10 expiry Varchar 8 M Expiry date of the QP URL with format of DDMMYYYY
11 userData1 Varchar 255 O User data
12 userData2 Varchar 255 O User data
13 userData3 Varchar 255 O User data
14 userData4 Varchar 255 O User data
15 userData5 Varchar 255 O User data
16 promotion Varchar 20 C Promotion code to filter promotion transactions
17 categoryId Varchar 20 C Predefined payment category code for reporting purpose.
18 resultUrl1 Varchar 255 C Front end return URL
19 resultUrl2 Varchar 255 C Back end return URL
20 paymentOption Varchar 1 C To restrict customer payment methods / channel:
F – Full amount payment only
I – Installment payment plan only
C – Credit card payment only
All available options, By default A option is selected.
21 ippInterestType Varchar 1 C To allow merchant to specify IPP Interest type.
M – Merchant Pay interest option only
C – Customer Pay interest option only
A – all available options, By default A is selected.
22 paymentExpiry Varchar 19 C Allow merchant to specify payment expiry date/time for 1-2-3 service.
Format: yyyy-MM-dd HH:mm:ss, by default, expiry value is taken from merchant configuration.
23 url Varchar 255 M Quickpay URL
24 currentApproved Numeric 5 M Current total approved transaction(s)
25 clickCount Numeric 5 M Number of click(s) on the URL
26 resCode Numeric 3 M Response status code
27 resDesc Varchar 50 M Response status short description
28 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + qpID + orderIdPrefix + description + currency + amount + allowMultiplePayment + maxTransaction + expiry + userData1 + userData2 + userData3 + userData4 + userData5 + promotion + categoryId + resultUrl1 + resultUrl2 + paymentOption + ippInterestType + paymentExpiry + url + currentApproved + clickCount + resCode + resDesc
using secret_key provided by 2C2P to merchant.

QuickPay Update

Used for modifications of the transaction details of an existing URL
The request types to Update a QuickPay URL are

  • QPUpdateReq
  • QPUpdateRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 qpID Numeric 1-10 M QuickPay ID
5 description Varchar 150 C Description of QuickPay URL.
6 currency Varchar 3 C Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
7 amount Varchar 12 C Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
8 allowMultiplePayment Varchar 1 C Y = Yes, N = No. allow multiple payment to be made with this QP URL. Default value = N
9 maxTransaction Numeric 4 C Maximum no of approved transaction allowed. Value 1 to 1000, If you have 10 items to sell, put 10 as value.
10 expiry Varchar 8 C Expiry date of the QP URL with format of DDMMYYYY
11 userData1 Varchar 255 O User data
12 userData2 Varchar 255 O User data
13 userData3 Varchar 255 O User data
14 userData4 Varchar 255 O User data
15 userData5 Varchar 255 O User data
16 promotion Varchar 20 C Promotion code to filter promotion transactions
17 categoryId Varchar 20 C Predefined payment category code for reporting purpose.
18 resultUrl1 Varchar 255 C Front end return URL
19 resultUrl2 Varchar 255 C Back end return URL
20 paymentOption Varchar 1 C To restrict customer payment methods / channel:
F – Full amount payment only
I – Installment payment plan only
C – Credit card payment only
All available options, By default A option is selected.
21 ippInterestType Varchar 1 C To allow merchant to specify IPP Interest type.
M – Merchant Pay interest option only
C – Customer Pay interest option only
A – all available options, By default A is selected.
22 paymentExpiry Varchar 19 C Allow merchant to specify payment expiry date/time for 1-2-3 service.
Format: yyyy-MM-dd HH:mm:ss, by default, expiry value is taken from merchant configuration.
23 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + qpID + description + currency + amount + allowMultiplePayment + maxTransaction + expiry + userData1 + userData2 + userData3 + userData4 + userData5 + promotion + categoryId + resultUrl1 + resultUrl2 + paymentOption + ippInterestType + paymentExpiry
using secret_key provided by 2C2P to merchant

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M QuickPay ID
4 resCode Numeric 3 M Response status code
5 resDesc Varchar 50 M Response status short description
6 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + qpID + resCode + resDesc
Using secret_key provided by 2C2P to merchant.

QuickPay Delete

Used to delete an existing URL, if required
The request types to Delete a QuickPay URL are

  • QPDeleteReq
  • QPDeleteRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 qpID Numeric 1-10 M QuickPay ID
5 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + qpID
Using secret_key provided by 2C2P to merchant

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M QuickPay ID
4 resCode Numeric 3 M Response status code
5 resDesc Varchar 50 M Response status short description
6 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + qpID + resCode + resDesc
Using secret_key provided by 2C2P to merchant

QuickPay Delivery API

As mentioned before the Delivery API uses a different endpoint to send the messages to.

The options here allow you to

  • Generate and Send
  • Send (an existing URL)

the QuickPay URL to a predefined eMail address or SMS receipient.

Generate and Send

Used to Generate a new QuickPay URL and Send the details to an email or mobile phone.
The request types for a Generate and Send are

  • GenerateSendQPReq
  • GenerateSendQPRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 orderIdPrefix Varchar 14 M Prefix of merchant order number for transaction done using this QuickPay URL.
Only alphanumeric and special character of _- allowed.
5 description Varchar 150 M Description of QuickPay URL.
6 currency Varchar 3 M Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
7 amount Varchar 12 M Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
8 allowMultiplePayment Varchar 1 C Y = Yes, N = No. allow multiple payment to be made with this QP URL. Default value = N
9 maxTransaction Numeric 4 C Maximum no of approved transaction allowed. Value 1 to 1000, If you have 10 items to sell, put 10 as value.
10 expiry Varchar 8 M Expiry date of the QP URL with format of DDMMYYYY
11 userData1 Varchar 255 O User data
12 userData2 Varchar 255 O User data
13 userData3 Varchar 255 O User data
14 userData4 Varchar 255 O User data
15 userData5 Varchar 255 O User data
16 promotion Varchar 20 C Promotion code to filter promotion transactions
17 categoryId Varchar 20 C Predefined payment category code for reporting purpose.
18 resultUrl1 Varchar 255 C Front end return URL
19 resultUrl2 Varchar 255 C Back end return URL
20 paymentOption Varchar 1 C To restrict customer payment methods / channel:
F – Full amount payment only
I – Installment payment plan only
C – Credit card payment only
All available options, By default A option is selected.
21 ippInterestType Varchar 1 C To allow merchant to specify IPP Interest type.
M – Merchant Pay interest option only
C – Customer Pay interest option only
A – all available options, By default A is selected.
22 paymentExpiry Varchar 19 C Allow merchant to specify payment expiry date/time for 1-2-3 service.
Format: yyyy-MM-dd HH:mm:ss, by default, expiry value is taken from merchant configuration.
23 toEmails Varchar C~ 255 Email address to be sent to, separated by semi-colon, “;”.
24 ccEmails Varchar C 255 Email address to receive CC, separated by semi-colon, “;”.
25 bccEmails Varchar 255 C Email address to receive BCC, separated by semi-colon, “;”.
26 emailSubject Varchar 255 C* Characters except special character of > and <
27 emailMessage Varchar 255 C* Characters except special character of > and <
28 toMobiles Varchar 255 C~ Mobile Nos to be sent to, separated by semi-colon, “;”. In International format: CountryCode-AreaCode-TelephoneNo. E.g +66889999999
29 smsMessage Varchar 60 C^ Characters except special character of > and <
30 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + orderIdPrefix + description + currency + amount + allowMultiplePayment + maxTransaction + expiry + userData1 + userData2 + userData3 + userData4 + userData5 + promotion + categoryId + resultUrl1 + resultUrl2 + paymentOption + ippInterestType + paymentExpiry + toEmails + ccEmails + bccEmails + emailSubject + emailMessage + toMobiles + smsMessage
using secret_key provided by 2C2P to merchant

C*    mandatory when toEmails is supplied
C^    mandatory when toMobiles is supplied
C~    either value is mandatory

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M quickPay ID
4 orderIdPrefix Varchar 14 M Prefix of merchant order number for transaction done using this QuickPay URL.
Only alphanumeric and special character of _- allowed.
5 currency Varchar 3 M Standard ISO4217 currency codes. Eg. Thai baht = THB, Singapore dollar = SGD, US dollar = USD.
6 amount Varchar 12 M Transaction amount, Example: SGD = 100.00, JPY = 100, decimal point as specified in ISO 4217
7 expiry Varchar 8 M Expiry date of the QP URL with format of DDMMYYYY
8 url Varchar 255 M Quickpay URL
9 successEmails Varchar 255 C Email address that was successfully reached, separated by semi-colon, “;”.
10 successMobiles Varchar 255 C Mobile Numbers that was successfully reached, separated by semi-colon, “;”.
11 failedEmails Varchar 255 C Email address where sending failed , separated by semi-colon, “;”.
12 failedMobiles Varchar 255 C Mobile Numbers where sending failed, separated by semi-colon, “;”.
13 resCode Numeric 3 M Response status code
14 resDesc Varchar M 50 Response status short description
15 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timestamp + qpID + orderIdPrefix + currency + amount + expiry + url + successEmails + successMobiles + failedEmails + failedMobiles + resCode + resDesc
using secret_key provided by 2C2P to merchant.

Send to

Used to Send an existing Quickpay URL to an email or mobile phone.
The request types for Send (to) are

  • QPSendReq
  • QPSendRes

Request Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 merchantID Varchar 15 M Merchant ID provided by 2C2P
4 qpID Numeric 1-10 M quickPay ID
5 toEmails Varchar C~ 255 Email address to be sent to, separated by semi-colon, “;”.
6 ccEmails Varchar C 255 Email address to receive CC, separated by semi-colon, “;”.
7 bccEmails Varchar 255 C Email address to receive BCC, separated by semi-colon, “;”.
8 emailSubject Varchar 255 C* Characters except special character of > and <
9 emailMessage Varchar 255 C* Characters except special character of > and <
10 toMobiles Varchar 255 C~ Mobile Nos to be sent to, separated by semi-colon, “;”. In International format: CountryCode-AreaCode-TelephoneNo. E.g +66889999999
11 smsMessage Varchar 60 C^ Characters except special character of > and <
12 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + merchantID + qpID + toEmails + ccEmails + bccEmails + emailSubject + emailMessage + toMobiles + smsMessage
using secret_key provided by 2C2P to merchant

C* mandatory when toEmails is supplied
C^ mandatory when toMobiles is supplied
C~ either value is mandatory

Response Variables

No Variable Name Data Type   Length   Mandatory Description
1 version Varchar 3 M Request Message version number
2 timeStamp Varchar 14 M Request time stamp in yyyyMMddHHmmss format
3 qpID Numeric 1-10 M quickPay ID
4 successEmails Varchar 255 C Email address that was successfully reached, separated by semi-colon, “;”.
5 successMobiles Varchar 255 C Mobile Numbers that was successfully reached, separated by semi-colon, “;”.
6 failedEmails Varchar 255 C Email address where sending failed , separated by semi-colon, “;”.
7 failedMobiles Varchar 255 C Mobile Numbers where sending failed, separated by semi-colon, “;”.
8 resCode Numeric 3 M Response status code
9 resDesc Varchar M 50 Response status short description
10 hashValue Varchar 150 M HMACSHA1 cryptographic hash value of:
version + timeStamp + qpID + successEmails + successMobiles + failedEmails + failedMobiles + resCode + resDesc
using secret_key provided by 2C2P to merchant.

Service Response Codes

Response Code Response Description
000 Success
001 Invalid MID
002 Invalid QuickPay ID
003 Invalid amount
004 Invalid currency
005 Invalid description
006 Invalid expiry date
007 Invalid payment option
008 Invalid ipp interest type
009 Invalid payment expiry date
010 Invalid allow multiple
011 Invalid max transactions
012 Invalid order id prefix
013 Order Id already in use
014 Max transaction must be more than pending and approved transactions
015 Invalid request version
101 Please provide one or more emails / mobiles
102 One or more to email address not valid
103 One or more bcc email address not valid
104 One or more mobile number not valid
105 One or more cc email address not valid
106 Invalid email subject
107 Invalid email message
108 Invalid sms message
997 Invalid request message
998 Empty compulsory value
999 System down

QuickPay Variables


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.