Refund

Refund batch services allow merchants to refund a batch of payments using SFTP connection.

๐Ÿ‘

Connect using SFTP

  • IP Address : 52.76.184.174
  • Port : 22
  • Username : The merchant must 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 : Everyday 2.00AM GMT+7
  • Drop Time For Response File : Everyday Before 3.00AM GMT+7

๐Ÿšง

File Format Specification

  • File name format : refund_YYYYMMDD_fileName.csv
  • Parameter delimiter : semicolon ';'
  • Record delimiter : line break
  • Encryption Method : None

ย 

How to integrate


  1. Merchants must prepare the refund request file. Refer to Refund Request.
  2. Upload the refund request file into the SFTP Server.
  3. 2C2P will pick up the refund request file and process the payment.
  4. 2C2P will drop the refund response file in the SFTP Server.
  5. Merchants must get the refund response file from SFTP Server.
  6. Merchants read the response data as payment acknowledgement. Refer to Refund Response.

ย 

๐Ÿ“˜

Data Attribute Reference

Data Type

  • A: Alphabet
  • AN: Alphanumeric
  • C: Characters
  • B: Boolean
  • D: Decimal
  • N: Numeric

Mandatory attributes

  • M: Mandatory
  • C: Conditional
  • O: Optional

Refund Request


Header Parameters

H;1.1;JT,[email protected];2015-01-01 00:00:01;2015-01-01 00:00:02;2
ParameterData TypeMandatoryDescription
recordTypeC 1MHeader = H
versionC 5MCurrent version is 1.1
merchantIDC 25MMerchant ID provided by 2C2P
requestorIDC 50MMerchant User Login ID
createDateTimeC 19MYYYY-MM-DD HH:mm:ss (24 hours format)
processDateTimeC 19Myyyy-MM-dd HH:mm:ss (24 hours format)
totalRecordN 5MTotal number of transactions

ย 

Detail Parameters

D;1;Test120116161653531;000000000005;test for refund upload (SGD)
D;2;Test120116160448782;000000000010;

Parameter

Data type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

transactionInvoiceNo

C 50

M

Invoice number

refundAmount

N 12

M

Note: The refund amount will be padded with โ€˜0โ€™ from the left and include no decimal point

Examples:

  • 1.00 = 000000000100
  • 1.50 = 000000000150
noteC 250ORefund note

ย 

Refund Response


Header Parameters

H;1.1;JT;[email protected];2015-01-02 00:00:02;4
ParameterData typeMandatoryDescription
recordTypeC 1MHeader = H
versionC 5MCurrent version 1.1
merchantIDC 15MMerchant ID provided by 2C2P
requestorIDC 50MMerchant User Login ID
completeDateTimeC 19MYYYY-MM-DD hh:mm:ss
totalRecordsN 5MTotal number of transactions

ย 

Detail Parameters

D;1;123,Test120116161653531;000000000005;test for refund upload (SGD);00;Success

Parameter

Data type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

tranRef

C 28

M

Routing trace reference number

transactionInvoiceNo

C 50

M

Invoice number

refundAmount

N 12

M

Note: The refund amount will be padded with โ€˜0โ€™ from the left and include no decimal point

Examples:

  • 1.00 = 000000000100
  • 1.50 = 000000000150

note

C 250

M

Refund note

respCode

N 2

M

00 = success

  • Other response codes represent failure; please check the response code list below for specific failure details
respDescC 100MResponse description

ย 

Response Code List

respCoderespDesc
00Success
01Mandatory field is not completed
02Invalid transactionInvoiceNo
or
Invoice number is blank
03Refund amount is not correct format
04invalid transaction status
05Invalid transaction
06Refund rejected
or
Total refund amount is more than transaction amount.
or
Cannot retrieve main transaction. Refund failed.
07Insufficient balance.
08Refund amount is over merchant amount.
09Data field length is not matched
89Database error
99System error