These docs are for v4.0.2. Click to read the latest docs for v4.3.0.

Promo Code

Promo Code batch services allowed merchant to send a batch of Promo Code using SFTP connection.

👍

Connect using SFTP

  • IP Address : 52.76.184.174
  • Port : 22
  • Username : Merchant required to fill in the SFTP setup form and send the request to support team. An account will be created for merchant to access 2c2p SFTP in demo and production environment.
  • Request Path : /input
  • Response Path : /output
  • Pickup Time For Request File : Every hour
  • Drop Time For Response File : Within the next hour

🚧

File Format Specification

  • File name format : promocode_YYYYMMDD_fileName.csv
  • Parameter delimiter : pipe '|'
  • Record delimiter : line break
  • Encryption Method : None

 

How to integrate


  1. Merchants have to prepare the promocode request file. Refer to Promo Code Request.
  2. Merchant is required to put promo code request file into SFTP Server.
  3. 2c2p pickup the promo code request file and process the payment.
  4. 2c2p will drop the promo code response file in SFTP Server.
  5. Merchant is required to get the promo code response file from SFTP Server.
  6. Merchant read the response data as payment acknowledgement. Refer to Promo Code Response.

 

📘

Data Attribute Reference

Data Type
A - Alphabet, N - Numeric, AN - AlphaNumeric, C - Characters, D - Decimal, B - Boolean

Mandatory
M - Mandatory, C - Conditional, O - Optional

Promo Code Request


Header Parameter

H|1.0|0000001|2015-01-01 00:00:01|3
ParameterData TypeMandatoryDescription
recordTypeC 1MHeader = H
versionC 5MCurrent version is 1.0
merchantIDC 15MMID provided by 2c2p
createDateTimeC 19MYYYY-MM-DD HH:mm:ss (24 hours format)
totalRecordN 5Mtotal number of transactions

 

Detail Parameter

D|1|MID0001|DISCOUNT10|discount 10%|MA;AM|411111;411112|||||||||
D|2|MID0001|DISCOUNT20|discount 20%|MA;AM|411111;411112|Y|Y|S|Electronic;Kitchen;automobile|Y|1000||
D|3|MID0001|DISCOUNT30|discount 30%|MA;AM|411111;411112|Y|Y|S|Electronic;Kitchen;automobile|||Y|3
ParameterData typeMandatoryDescription
recordTypeC 1MDetails = D
recordNoN 5Mrunning no 1 - 99999
merchantIDC 15OMerchantID or sub MerchantID, if empty will use requestor MID.
promoCodeC 20Munique promotion code
promoDescC 200Opromotion description
cardTypeC 250Ocard type allowed to make payment. Multiple cardType separated by semi colon ";"
binListC 1000Obin allowed to make payment. Multiple bin separated by semi colon ";"
allowMasterpassC 1O"to allow customer to make payment with masterpass
value:
Y - yes
N - no
if not specified, default set to N"
ippModeC 1O"to enable ippMode promocode, this will allow promocode to send different product code to the acquierer bank.
Value:
Y - yes
N - no
if not specified, default set to N"
ippProductCodeTypeC 1O"allow ALL or Specific product code to be submitted to the acquirer. Mandatory if ippMode is enabled.
Value:
A - ALL
S - Specific
if not specified, default set to A"
ippProductCodeListC 1000Cif Specific product code is selected, list of the product code allowed to make payment. Mandatory if ippProductCodeType is set to 'S'
limitByTransactionCountC 1O"to limit number of authorised transaction for this promo code.
Value:
Y - yes
N - no
if not specified, default set to N"
maxAuthorisedTransactionN 4C"maximum number of authorised transaction allowed per promo code
mandatory if limitByTransactionCount is enabled"
limitPerCardC 1O"to limit number of authorised transaction for each card number to use this promo code.
Value:
Y - yes
N - no
if not specified, default set to N"
maxTransactionPerCardN 4C"maximum number of transaction allowed per card number
mandatory if limitPerCard is enabled"

 

Promo Code Response


Header Parameter

H|1.0|0000001|2015-01-02 00:00:02|3
ParameterData typeMandatoryDescription
recordTypeC 1MHeader = H
versionC 5MCurrent version 1.0
merchantIDC 15MMID provided by 2c2p
completeDateTimeC 19MYYYY-MM-DD hh:mm:ss
totalRecordsN 5Mtotal number of transactions

 

Detail Parameter

D|1|MID0001|DISCOUNT10|00|success
D|2|MID0001|DISCOUNT20|00|success
D|3|MID0001|DISCOUNT30|00|success
ParameterData typeMandatoryDescription
recordTypeC 1MDetails = D
recordNoN 5Mrunning no 1 - 99999
merchantIDC 15MMerchantID or sub MerchantID, if empty will use requestor MID.
promoCodeC 20Munique promotion code
respCodeC 4MResponse status code
respDescC 50MResponse status short description