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

Parameter

Data Type

Mandatory

Description

recordType

C 1

M

Header = H

version

C 5

M

Current version is 1.0

merchantID

C 15

M

MID provided by 2c2p

createDateTime

C 19

M

YYYY-MM-DD HH:mm:ss (24 hours format)

totalRecord

N 5

M

total number of transactions

 

Detail Parameter

D|1|MID0001|DISCOUNT10|discount 10%|MC;AM|411111;411112|||||||||
D|2|MID0001|DISCOUNT20|discount 20%|MC;AM|411111;411112|Y|Y|S|Electronic;Kitchen;automobile|Y|1000||
D|3|MID0001|DISCOUNT30|discount 30%|MC;AM|411111;411112|Y|Y|S|Electronic;Kitchen;automobile|||Y|3

Parameter

Data type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

merchantID

C 15

O

MerchantID or sub MerchantID, if empty will use requestor MID.

promoCode

C 20

M

unique promotion code

promoDesc

C 200

O

promotion description

cardType

C 250

O

card type allowed to make payment. Multiple cardType separated by semi colon ";"

binList

C 1000

O

bin allowed to make payment. Multiple bin separated by semi colon ";"

allowMasterpass

C 1

O

"to allow customer to make payment with masterpass
value:
Y - yes
N - no
if not specified, default set to N"

ippMode

C 1

O

"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"

ippProductCodeType

C 1

O

"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"

ippProductCodeList

C 1000

C

if Specific product code is selected, list of the product code allowed to make payment. Mandatory if ippProductCodeType is set to 'S'

limitByTransactionCount

C 1

O

"to limit number of authorised transaction for this promo code.
Value:
Y - yes
N - no
if not specified, default set to N"

maxAuthorisedTransaction

N 4

C

"maximum number of authorised transaction allowed per promo code
mandatory if limitByTransactionCount is enabled"

limitPerCard

C 1

O

"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"

maxTransactionPerCard

N 4

C

"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

Parameter

Data type

Mandatory

Description

recordType

C 1

M

Header = H

version

C 5

M

Current version 1.0

merchantID

C 15

M

MID provided by 2c2p

completeDateTime

C 19

M

YYYY-MM-DD hh:mm:ss

totalRecords

N 5

M

total number of transactions

 

Detail Parameter

D|1|MID0001|DISCOUNT10|00|success
D|2|MID0001|DISCOUNT20|00|success
D|3|MID0001|DISCOUNT30|00|success

Parameter

Data type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

merchantID

C 15

M

MerchantID or sub MerchantID, if empty will use requestor MID.

promoCode

C 20

M

unique promotion code

respCode

C 4

M

Response status code

respDesc

C 50

M

Response status short description