Authorization (Online)

Batch Authorization services is allowed merchant to authorize a batch of payments 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 : Everyday 5.00AM GMT+7
  • Drop Time For Response File : Everyday Before 8.00AM GMT+7

🚧

File Format Specification

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

 

How to integrate


  1. Merchants have to prepare the auth request file. Refer to Authorization Request.
  2. Merchant is required to encrypt the auth request file using GPG.
  3. Merchant is required to put encrypted auth request file into SFTP Server.
  4. 2c2p pickup the auth request file and process the payment.
  5. 2c2p will drop a encrypted auth response file in SFTP Server.
  6. Merchant is required to get the encrypted auth response file from SFTP Server.
  7. Merchant is required to decrypt auth response file using GPG.
  8. Merchant read the response data as payment acknowledgement. Refer to Authorization 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

Authorization Request


Header Parameter

H;1.4;0000001;2015-01-01 00:00:01;2015-01-01 00:00:02;2

Parameter

Data Type

Mandatory

Description

recrodType

C 1

M

Header = H

version

C 5

M

Current version is 1.4

merchantID

C 15

M

MID provided by 2c2p

createDateTime

C 19

M

yyyy-MM-dd HH:mm:ss (24 hours format)

processDateTime

C 19

M

yyyy-MM-dd HH:mm:ss (24 hours format), in merchant's local time

totalRecord

N 5

M

total number of transactions

 

Detail Parameter

D;1;Invoice00001;1 night hotel in bali;300.00;840;4111111111111111;12;2020;;123;Joppie tjoa;[email protected];data1;data2;data3;data4;data5;;;;;;;;;;;
D;2;Invoice00002;2 night hotel in bali;200.00;840;4111111111111111;12;2020;;123;Joppie tjoa;[email protected];;;;;;;;Y;RINV01;10.00;;;7;5;31122020;
D;3;Invoice00003;3 night hotel in bali;50.00;840;4111111111111111;12;2020;;123;Joppie tjoa;[email protected];data1;data2;data3;data4;data5;Y;3;M;Y;RINV02;100.00;Y;200.00;31;0;;0112

Parameter

Data Type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

uniqueTransactionCode

C 20

M

Transaction unique invoice number. Provided by merchant

desc

C 50

M

payment description. The following symbols are not allowed: [email protected]#$%^&*()<>;

amount

D 12,2

M

Transaction amount.
Example 12.50

currencyCode

N 3

M

Standard ISO4217
Refer List of Currency Codes N3.

pan

N 16

M

Credit Card No (optional value if stored card token is used)

expiryMonth

N 2

M

Credit Card expiry month (optional value if stored card token is used)

expiryYear

N 4

M

Credit Card expiry year (optional value if stored card token is used)

storeCardUniqueID

C 20

O

stored card token

securityCode

N 4

O

CVV2/CVC2/CID

cardholderName

C 50

M

Credit Card holder name

cardholderEmail

C 50

O

Credit Card holder email address

userDefined1

C 150

O

Merchant Defined information

userDefined2

C 150

O

Merchant Defined information

userDefined3

C 150

O

Merchant Defined information

userDefined4

C 150

O

Merchant Defined information

userDefined5

C 150

O

Merchant Defined information

ippTransaction

C 1

O

N - non IPP payment
Y - IPP payment
default or empty is N

installmentPriod

N 2

C

IPP installment period
Mandatory if IPP is enabled

interestType

C 1

C

interest type
C - interest paid by customer
M - interest paid by merchant.
Mandatory if IPP is enabled.

recurring

C 1

O

To enable RPP (Recurring Payment Plan) transaction feature.

N - Disable RPP feature (default)
Y - Enable RPP feature
empty value means N

(Recurring unique ID will be returned on payment response message if this option is enabled)

recurringPrefix

C 15

C

Recurring Invoice Prefix

recurringAmount

D 12,2

C

Transaction amount.
Example 12.50

recurringAllowAccumulate

C 1

O

RPP will be terminated if accumulated failed RPP transaction amount is over maxAccumulateAmount.

N - Disable
Y - Enable
empty value means N

Only required if allowAccumulate is allowed

recurringMaxAccumulateAmount

D 12,2

C

RPP will be terminated if accumulated failed RPP transaction amount is over maxAccumulateAmount.

Only required if allowAccumulate is allowed

recurringInterval

N 2

C

To indicate the frequency of RPP by days.
minimum is every 1 day.
maximum is every 365 days (1 year).

Only required if RPP is enabled and chargeOnDate is not used.

recurringCount

N 5

C

To indicate how many times to charge the customer with RPP.

set to '0' to charge indefinitely until terminated manually.

Only required if RPP is enabled.

recurringChargeNextDate

N 8

C

To indicate the next RPP charge date.
format: ddMMyyyy.

Only required if RPP with recurringInterval is set.

if RPP is with chargeOnDate then chargeNextDate is optional.
if chargeNextDate is not set, chargeOnDate Date and Month will be used

recurringChargeOnDate

N 4

C

To charge RPP on specific date every month.
format: ddMM
the MM is only used if charge_next_date is not set.
otherwise the dd will be used for every month.

Only required if RPP is enabled and recurringInterval is not used.

 

Authorization Response


Header Parameter

H;1.0;0000001;2015-01-02 00:00:02;4

Parameter

Data Type

Mandatory

Description

recrodType

C 1

M

Header = H

version

C 5

M

Current version 1.4

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;Invoice00001;ABC123456;111222;0123456789;300.00;840;411111XXXXXX1111;;user1;user2;user3;;;;;00;approved
D;2;Invoice00002;ABC123458;111222;0123456789;600.00;840;411111XXXXXX1111;;user1;user2;user3;;;Y;3;M;123456;00;approved

Parameter

Data Type

Mandatory

Description

recordType

C 1

M

Details = D

recordNo

N 5

M

running no 1 - 99999

uniqueTransactionCode

C 20

M

Transaction unique invoice number. Provided by merchant

tranRef

C 28

M

Routing trace reference number

approvalCode

C 6

M

bank approval code

refNumber

C 15

M

bank reference number

amt

D 12,2

M

Transaction amount.
Example 12.50

currencyCode

N 3

M

Standard ISO4217
Refer List of Currency Codes N3.

pan

N 16

M

masked card number

storeCardUniqueID

C 20

O

stored card token

userDefined1

C 150

M

Merchant Defined information

userDefined2

C 150

M

Merchant Defined information

userDefined3

C 150

M

Merchant Defined information

userDefined4

C 150

M

Merchant Defined information

userDefined5

C 150

M

Merchant Defined information

ippTransaction

C 1

O

N - non IPP payment
Y - IPP payment

default or empty is N

installmentPriod

C 2

C

IPP installment period

Mandatory if IPP is enabled

interestType

C 1

C

interest type

C - interest paid by customer
M - interest paid by merchant.

Mandatory if IPP is enabled.

recurringUniqueID

N 20

C

RPP transaction record identifier.

Mandatory for RPP transaction.

respCode

C 2

M

Refer to Card Response Code.

respDesc

C 100

M

Refer to Card Response Code.