Authorization

Batch authorization services allow merchants to authorize 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 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 . Download the PGP Public Key here.

 

How to integrate


  1. Merchants must prepare the auth request file. Refer to Authorization Request.
  2. Encrypt the auth request file using GPG.
  3. Upload the encrypted auth request file to the SFTP Server.
  4. 2C2P will pick up the auth request file and process the payment.
  5. 2C2P will drop an encrypted auth response file in SFTP Server.
  6. Merchants must get the encrypted auth response file from SFTP Server.
  7. Decrypt the auth response file using GPG.
  8. Read the response data as payment acknowledgement. Refer to Authorization 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

Authorization Request


Header Parameters

H;1.4;0000001;2015-01-01 00:00:01;2015-01-01 00:00:02;2
ParameterData TypeMandatoryDescription
recrodTypeC 1MHeader = H
versionC 5MCurrent version is 1.4
merchantIDC 15MMerchant ID provided by 2C2P
createDateTimeC 19Myyyy-MM-dd HH:mm:ss (24 hours format)
processDateTimeC 19Myyyy-MM-dd HH:mm:ss (24 hours format), in merchant's local time
totalRecordN 5MTotal number of transactions

 

Detail Parameters

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
ParameterData TypeMandatoryDescription
recordTypeC 1MDetails = D
recordNoN 5Mrunning no 1 - 99999
uniqueTransactionCodeC 20MTransaction unique invoice number

* Provided by merchant
descC 50MPayment description

The following symbols are not allowed: !@#$%^&()<>;
amountD 12,2MTransaction amount

* Example: 12.50
currencyCodeN 3MStandard ISO-4217 currency codes

* Refer to List of Currency Codes N3.
panN 16MCredit Card Number

* This is optional if stored card token is used
expiryMonthN 2MCredit Card Expiry Month

* This is optional if stored card token is used
expiryYearN 4MCredit Card Expiry Year

* This is optional if stored card token is used
storeCardUniqueIDC 20OStored card token
securityCodeN 4OCVV2/CVC2/CID
cardholderNameC 50MCredit card holder name
cardholderEmailC 50OCredit card holder email address
userDefined1C 150OMerchant-defined information
userDefined2C 150OMerchant-defined information
userDefined3C 150OMerchant-defined information
userDefined4C 150OMerchant-defined information
userDefined5C 150OMerchant-defined information
ippTransactionC 1ON - Non-IPP payment
Y - IPP payment

* Default or empty values are read as N
installmentPriodN 2CIPP installment period

* Mandatory if IPP is enabled
interestTypeC 1CInterest type

C - interest paid by customer
M - interest paid by merchant
* Mandatory if IPP is enabled
recurringC 1OTo enable RPP (Recurring Payment Plan) transaction feature

N - Disable RPP feature (default)
Y - Enable RPP feature
* Empty value is read as N

(Recurring unique ID will be returned on payment response message if this option is enabled)
recurringPrefixC 15CRecurring Invoice Prefix
recurringAmountD 12,2CTransaction amount.

* Example: 12.50
recurringAllowAccumulateC 1ORPP will be terminated if accumulated failed RPP transaction amount is over maxAccumulateAmount.

N - Disable
Y - Enable
Empty value is read as N
Only required if allowAccumulate is allowed
recurringMaxAccumulateAmountD 12,2CRPP will be terminated if accumulated failed RPP transaction amount is over maxAccumulateAmount.

* Only required if allowAccumulate is allowed
recurringIntervalN 2CTo 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
recurringCountN 5CTo 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
recurringChargeNextDateN 8CTo indicate the next RPP charge date.

In ddMMyyyy format
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
recurringChargeOnDateN 4CTo charge RPP on specific date every month.

In ddMM format
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 Parameters

H;1.0;0000001;2015-01-02 00:00:02;4
ParameterData TypeMandatoryDescription
recrodTypeC 1MHeader = H
versionC 5MCurrent version 1.4
merchantIDC 15MMerchant ID provided by 2C2P
completeDateTimeC 19MYYYY-MM-DD hh:mm:ss
totalRecordsN 5MTotal number of transactions

 

Detail Parameters

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
ParameterData TypeMandatoryDescription
recordTypeC 1MDetails = D
recordNoN 5Mrunning no 1 - 99999
uniqueTransactionCodeC 20MTransaction unique invoice number

* Provided by merchant
tranRefC 28MRouting trace reference number
approvalCodeC 6MBank approval code
refNumberC 15MBank reference number
amtD 12,2MTransaction amount

* Example: 12.50
currencyCodeN 3MStandard ISO-4217 currency codes

* Refer to List of Currency Codes N3.
panN 16MMasked card number
storeCardUniqueIDC 20OStored card token
userDefined1C 150MMerchant-defined information
userDefined2C 150MMerchant-defined information
userDefined3C 150MMerchant-defined information
userDefined4C 150MMerchant-defined information
userDefined5C 150MMerchant-defined information
ippTransactionC 1ON - Non-IPP payment
Y - IPP payment

* Default or empty values are read as N
installmentPriodC 2CIPP installment period

* Mandatory if IPP is enabled
interestTypeC 1CInterest type

C - interest paid by customer
M - interest paid by merchant
* Mandatory if IPP is enabled
recurringUniqueIDN 20CRPP transaction record identifier

* Mandatory for RPP transaction
respCodeC 2MRefer to Card Response Code.
respDescC 100MRefer to Card Response Code.