Developer

API parameters

Follow

Data types

A - Alphabet
N - Numeric
AN - AlphaNumeric
C - Characters (AlphaNumeric and symbols)

Mandatory types

M - Mandatory
C - Conditional (Mandatory for some features only)
O - Optional

 

Payment request parameters

#

Parameter name Data type / Length       Mandatory     Description

1

version

C 3-5

M

API version number, e.g 7.2

2

merchant_id

AN 1-25

M

Merchant ID at 2C2P PGW

3

payment_description

AN 1-255

M

Payment detail description.
HTML Encode description if contain Symbols.

4

order_id

AN 1-20 / N 1-12

M

Unique merchant order number.
Example: 00000000010000091203

*Limited to 12 numerics when requesting for APM payment for Indonesia and Myanmar.

5

user_defined_1

AN 1-255

O

For merchant to submit merchant's specific data.

6

user_defined_2

AN 1-255

O

For merchant to submit merchant's specific data.

7

user_defined_3

AN 1-255

O

For merchant to submit merchant's specific data.

8

user_defined_4

AN 1-255

O

For merchant to submit merchant's specific data.

9

user_defined_5

AN 1-255

O

For merchant to submit merchant's specific data.

10

amount

N 12

M

Amount formatted into 12 digit format with leading zero.
Minor unit appended to the last digit depending on number of Minor unit specified in ISO 4217.
example:
Currency: 702 (SGD)
Minor unit: 2
Transaction amount: 15.00 SGD
12 digit formatted amount: 000000001500

Currency: 392 (JPY)
Minor unit: 0
Transaction amount: 100 JPY
12 digit formatted amount: 000000000100

11

currency

N 3

O

Transaction currency code in 3 numeric value as specified in ISO 4217.
if empty, default value will use merchant's base currency.

12

promotion

AN 1-50

O

Promotion Code for the payment.

Example: PromoMC for MasterCard payment only,
PromoVC for Visa card payment only.

13

customer_email

C 1-30

O

Customer's email address to receive payment receipt from 2C2P PGW.

14

pay_category_id

AN 1-20

O

Merchant’s predefined payment category code for reporting purpose.
Merchant can manage predefined codes
from the my.2c2p portal (ACCOUNT / OPTIONS / Predefined References).

Use pay_category_id value from “Ref Code” column to show “Reference Name” in the homepage sales volume graph.

15

result_url_1

C 1-255

O

Frontend return url for 2C2P PGW to redirect customer back to merchant after completing the payment.

16

result_url_2

C 1-255

O

Backend return url for 2C2P PGW to notify payment result to merchant after payment completed.
This URL will also be used to notify merchant when offline payment (such as CASH payments) is completed.

17

payment_option

AN 1

O

To restrict customer payment methods / channels

Payment option code

By default, all available options will be shown

18

ipp_interest_type

A 1

O

To specify IPP Interest Type.

A – All available options
C – Customer Pay Interest Option ONLY
M – Merchant Pay Interest Option ONLY

By default, all available options will be shown

19

payment_expiry

C 19

O

To specify payment expiry date/time for APM payments.
format: yyyy-MM-dd HH:mm:ss

By default, will use expiry date/time configured on merchant profile.

20

default_lang

A 2

O

To specify payment page localization

Language option code

21

enable_store_card

A 1

O

To enable tokenization feature

N - Disable tokenization option (default)
Y - Enable tokenization option

22

stored_card_unique_id

AN 20

O

To make payment with tokenized card

23

request_3ds

A 1

O

To enable / disable / Force 3DS authentication

Y - Do 3DS authentication (default)
N - No 3DS authentication
F - Force 3DS authentication (only ECI 02/05 are accepted)

24

recurring

A 1

O

To enable RPP (Recurring Payment Plan) transaction feature.
recurring unique ID will be returned on response message if this option is enabled.

N - Disable RPP feature (default)
Y - Enable RPP feature

25

order_prefix

AN 1-15

C

RPP transaction will add 5 additional digit behind order_prefix as invoice number.

Only required if RPP is enabled.

26

recurring_amount

N 12

C

The amount to be charged on RPP process.

Amount formatted into 12 digit format with leading zero.
Minor unit appended to the last digit depending on number of Minor unit specified in ISO 4217.
example:
Currency: 702 (SGD)
Minor unit: 2
Transaction amount: 15.00 SGD
12 digit formatted amount: 000000001500

Currency: 392 (JPY)
Minor unit: 0
Transaction amount: 100 JPY
12 digit formatted amount: 000000000100

Only required if RPP is enabled.

27

allow_accumulate

A 1

C

To allow accumulation of failed RPP transaction amount.

N - Do not allow
Y - Allow

Only required if RPP is enabled.

28

max_accumulate_amount

N 12

C

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

Only required if allow_accumulate is allowed

29

recurring_interval

N 1-3

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 charge_on_date is not used.

30

recurring_count

N 1-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.

31

charge_next_date

N 8

C

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

Only required if RPP with recurring_interval is set.

if RPP is with charge_on_date then charge_next_Date is optional.
if charge_next_date is not set, charge_on_date Date and Month will be used.

32

charge_on_date

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 recurring_interval is not used.

33

statement_descriptor

AN 1-20

O

To set dynamic statement descriptor.
only alphanumeric in latin character is allowed.

34

hash_value

C 40

M

For 7.2, HMACSHA1 cryptographic hash value of: version + merchant_id + payment_description + order_id + currency + amount + customer_email + pay_category_id + promotion + user_defined_1 + user_defined_2 + user_defined_3 + user_defined_4 + user_defined_5 + result_url_1 + result_url_2 + enable_store_card + stored_card_unique_id + request_3ds + recurring + order_prefix + recurring_amount + allow_accumulate + max_accumulate_amount + recurring_interval + recurring_count + charge_next_date+ charge_on_date + payment_option + ipp_interest_type + payment_expiry + default_lang + statement_descriptor and use the secret_key provided by 2C2P as salt.

 

Payment response parameters

# Parameter name Data type / Length       Mandatory     Description

1

version

C 3-5

M

API version number, e.g 7.2

2

request_timestamp

C 22

M

Timestamp of the time when message is
sent
Format: yyyy-MM-dd HH:mm:ss

3

merchant_id

AN 1-25

M

Merchant ID at 2C2P PGW

4

order_id

AN 1-20 / N 1-12

M

Unique merchant order number.
Example: 00000000010000091203

*Limited to 12 numerics when requesting for APM payment for Indonesia and Myanmar.

5

payment_channel

N 3

M

Payment channel response code

6

payment_status

N 3

M

Payment status response code

7

channel_response_code

N 2

O

Channel response code

8

channel_response_desc

AN 1-255

O

Channel response description

9

approval_code

AN 6

O

Authorization code from issuing bank. Only applicable when customer pay with credit or debit card.

10

eci

N 2

O

ECI value. Only applicable when customer pay with credit or debit card

11

transaction_datetime

C 22

M

Transaction processed date time value in format yyyy-MM-dd HH:mm:ss

12

transaction_ref

AN 1-15

O

Channel transaction reference number

13

masked_pan

C 1-19

O

Only applicable when customer pay with credit or debit card

14

paid_agent

AN 1-30

O

Only applicable to 123 Cash Payment Channel and IPP transaction channel.

123: APM agent code that customer made payment with.

IPP: IPP bank’s name.

15

paid_channel

AN 1-30

O

APM channel code
Only applicable to 123 Cash Payment Channel.

16

amount

N 12

M

Amount formatted into 12 digit format with leading zero.
Minor unit appended to the last digit depending on number of Minor unit specified in ISO 4217.
example:
Currency: 702 (SGD)
Minor unit: 2
Transaction amount: 15.00 SGD
12 digit formatted amount: 000000001500

Currency: 392 (JPY)
Minor unit: 0
Transaction amount: 100 JPY
12 digit formatted amount: 000000000100

17

currency

N 3

M

Transaction currency code in 3 numeric value as specified in ISO 4217.

18

user_defined_1

AN 1-255

O

For merchant to submit merchant's specific data.

19

user_defined_2

AN 1-255

O

For merchant to submit merchant's specific data.

20

user_defined_3

AN 1-255

O

For merchant to submit merchant's specific data.

21

user_defined_4

AN 1-255

O

For merchant to submit merchant's specific data.

22

user_defined_5

AN 1-255

O

For merchant to submit merchant's specific data.

23

browser_info

C 1-50

M

Client Browser information. Eg. Type=Firefox28,Name=Firefox,Ver=28.0

24

stored_card_unique_id

AN 20

O

To make payment with tokenized card

25

backend_invoice

C 1-12

O

backend invoice number

26

recurring_unique_id

N 1-20

O

recurring unique id

27

ippPeriod

N 2

O

IPP tenor

28

ippInterestType

A 1

O

IPP Interest Type.
M – Merchant Pay Interest Option ONLY
C – Customer Pay Interest Option ONLY
A – All available options

29

ippInterestRate

C 1-5

O

IPP interest rate

30

ippMerchantAbsorbRate

C 1-5

O

IPP merchant absorb rate

31

payment_scheme

C 2

O

Payment scheme code

32

hash_value

C 40

M

For 7.2, HMACSHA1 cryptographic hash value of
version + request_timestamp + merchant_id + order_id + currency + amount + transaction_ref + approval_code + eci + transaction_datetime + payment_channel + payment_status + channel_response_code + channel_response_desc + masked_pan + stored_card_unique_id + backend_invoice + paid_channel + paid_agent + recurring_unique_id + user_defined_1 + user_defined_2 + user_defined_3 + user_defined_4 + user_defined_5 + browser_info + ippPeriod + ippInterestType + ippInterestRate + ippMerchantAbsorbRate + payment_scheme

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.