Payment API v2.0
Payment API v2.0
1 Overview ..................................................................................................................................... 3
1.1 Related Documentation ......................................................................................................... 3
2 Implementation Details ................................................................................................................ 3
2.1 Accept Payment .................................................................................................................... 3
2.1.1 Request .......................................................................................................................... 3
2.1.2 Response ........................................................................................................................ 7
2.2 Process Payment ................................................................................................................... 9
2.2.1 Request .......................................................................................................................... 9
2.2.2 Response ...................................................................................................................... 14
2.3 Browser Redirect Response ................................................................................................. 17
2.3.1 Form Post Response Payload ....................................................................................... 17
3 Master codes.............................................................................................................................. 21
3.1.1 Net banking codes ........................................................................................................ 21
3.1.2 Wallet codes ................................................................................................................. 22
3.1.3 Payment Modes............................................................................................................ 22
3.1.4 Transaction Status ........................................................................................................ 22
This document explains how to integrate the Pine Labs edge payment gateway in redirect or seamless
mode.
This guide should be used together with the additional documents as described below.
Document Description
HashGeneration Describes about hash generation
algorithm
ResponseCodeList Listing of transaction response codes
2 Implementation Details
It initiates the transaction. Merchant has to pass unique merchant txn reference number, amount and
other parameters.
2.1.1 Request
UAT https://uat.pinepg.in/api/v2/accept/payment
Production https://pinepg.in/api/v2/accept/payment
HEADERS:
merchant_data
Mandatory(M)/Optional/Conditional
merchant_id int Merchant id M
provided by pine
labs
merchant_access_code string Merchant access M
code provided by
pine labs
unique_merchant_txn_id string Unique M
transaction id
maintained by
merchant for
each transaction
merchant_return_url string Merchant return C
url on which
©Pine Labs 2020 Rev. 1.0 Page 4 of 24
Confidential
This document shall not be disclosed to any third party.
browser response
will be sent.
Mandatory in the
case of EMI,
Cards,
Netbanking
payment_data
Mandatory(M)/Optional
amount_in_paisa long Transaction amount in M
paise
txn_data
Mandatory(M)/Optional
navigation_mode int Navigation mode M
2 for Redirect
7 for Seamless
payment_mode String It will contain csv of M
valid payment mode
Ids.
In case of seamless
mode only single
payment mode to be
specified.
transaction_type Integer 1 for ‘Purchase’, M
8 for ‘PreAuth
time_stamp Long Unix timestamp O
customer_data
Mandatory(M)/Optional
email_id string Customer email id O
first_name string Customer first name O
©Pine Labs 2020 Rev. 1.0 Page 5 of 24
Confidential
This document shall not be disclosed to any third party.
last_name string Customer last name O
customer_id string Customer id O
maintained at
merchant end
mobile_no string 10 digit mobile O
number
billing_data Object Customer billing O
address details
shipping_data Object Customer Shipping O
address details
udf_data
Mandatory(M)/Optional
udf_field_1 string User defined Fields O
udf_field_2 string User defined Fields O
udf_field_3 string User defined Fields O
udf_field_4 string User defined Fields O
udf_field_5 string User defined Fields O
billing_data
Mandatory(M)/Optional
address1 string Address 1 O
address2 string Address 2 O
address3 string Address 3 O
pincode string Pin code O
city string City name O
state string State name O
country string Country name O
shipping_data
Mandatory(M)/Optional
first_name String First name entered in O
shipping address
last_name String Last name entered in O
shipping address
mobile_no string Mobile number O
©Pine Labs 2020 Rev. 1.0 Page 6 of 24
Confidential
This document shall not be disclosed to any third party.
entered in shipping
address
address1 string Address 1 O
address2 string Address 2 O
address3 string Address 3 O
pincode string Pin code O
city string City name O
state string State name O
country string Country name O
Json Payload
{
"merchant_data": {
"merchant_id": 3473,
"merchant_access_code": "57e39383-b053-4db9-a708-26d8971886e7",
"unique_merchant_txn_id": "testorder786",
"merchant_return_url": "http://localhost:53132/ChargingResp.aspx"
},
"payment_data": {
"amount_in_paisa": 1100000
},
"txn_data": {
"navigation_mode": "7",
"payment_mode": "4",
"transaction_type": "1",
"time_stamp": 157588000000
}
}
"request": "ewogICJtZXJjaG-
FudF9kYXRhIjogewogICAgIm1lcmNoYW50X2lkIjogMzQ3MywKICAgICJtZXJjaGFudF9hY2Nlc3NfY29kZSI6ICI1N
2UzOTM4My1iMDUzLTRkYjktYTcwOC0yNmQ4OTcxODg2ZTciLAogICAgInVuaXF1ZV9tZXJjaGFudF90eG5faWQiOiAi
dGVzdG9yZGVyNzg2IiwKICAgICJtZXJjaGFudF9yZXR1cm5fdXJsIjogImh0dHA6Ly9sb2NhbGhvc3Q6NTMxMzIvQ2h
hcmdpbmdSZXNwLmFzcHgi-
gi-
CiAgfSwKICAicGF5bWVudF9kYXRhIjogewogICAgImFtb3VudF9pbl9wYWlzYSI6IDExMDAwMDAKICB9LAogICJ0eG5
fZGF0YSI6IHsKICAgICJuYXZpZ2F0aW9uX21vZGUiOiAiNyIsCiAgICAicGF5bWVudF9tb2RlIjogIjQiLAogICAgIn
RyYW5zYWN0aW9uX3R5cGUiOiAiMSIsCiAgICAidGltZV9zdGFtcCI6IDE1NzU4ODAwMDAwMAogIH0KfQo= "
2.1.2 Response
Redirect mode
{
"token": "ubrjAgbVaJVrGz67y%2fZCjCveYWNymE7ULAlOO7FCbz4%3d",
"response_code": 1,
"response_message": "SUCCESS",
"redirect_url":
"http://hostname:port/api/v2/process/payment?token=ubrjAgbVaJVrGz67y%2fZCjCveYWNymE7ULAlOO7FCbz4%
3d "
In redirect mode api will return a url on which customer needs to be redirected. Pine Labs
payment page will get open after redirection.
Seamless mode
{
"token": "ubrjAgbVaJVrGz67y%2fZCjCveYWNymE7ULAlOO7FCbz4%3d",
"response_code": 1,
"response_message": "SUCCESS"
}
In seamless mode api will not a redirect url and subsequent api needs to be called.
Failure response
{
"response_code": -1,
"response_message": "FAILURE",
©Pine Labs 2020 Rev. 1.0 Page 8 of 24
Confidential
This document shall not be disclosed to any third party.
}
Payment data against transaction will be passed in this call. This api will be called in seamless
mode.
2.2.1 Request
UAT https://uat.pinepg.in/api/v2/process/payment?token=BJ5Dj5o
5dh6jZaWCTAv%2fnwJj0h%2f3Eiq2HgY14%2fMOP7k%3d
Production https://pinepg.in/api/v2/process/payment?token=BJ5Dj5o5dh
6jZaWCTAv%2fnwJj0h%2f3Eiq2HgY14%2fMOP7k%3d
netbanking_data
wallet_data
upi_data
nbfc_data
bfl_data
zestMoney_data
additional_data
emi_data
offer_scheme
product_details
emi_scheme
Parameter Name Type Description
scheme_id Long It tells scheme id applicable on
product
program_type Int It tells scheme of which type.
105-Bank EMI
108-Product discount
112-Subvention discount
is_scheme_valid Bool Is scheme is valid
Schemes
{"card_data":{"card_number":"4012001037141112","card_expiry_year":"2020","card_expiry_month":"09","card_holder_
name":"harsh","cvv":"123"},"emi_data":{"offer_scheme":{"product_details":[{"schemes":[{"scheme_id":1682,"program_t
ype":112,"is_scheme_valid":true}],"product_code":"SM-
G975FCWG","product_amount":550000,"subvention_cashback_discount":60209,"product_discount":0,"subvention_cashb
ack_discount_percentage":0,"product_discount_percentage":0,"subvention_type":1},{"schemes":[],"product_code":"40","p
roduct_amount":550000,"subvention_cashback_discount":0,"product_discount":0,"subvention_cashback_discount_percent
©Pine Labs 2020 Rev. 1.0 Page 13 of 24
Confidential
This document shall not be disclosed to any third party.
age":0,"product_discount_percentage":0}],"emi_scheme":{"scheme_id":1683,"program_type":105,"is_scheme_valid":true
}},"tenure_id":"18","tenure_in_month":"18","monthly_installment":64867,"bank_interest_rate":150000,"interest_pay_to_b
ank":127815,"total_offerred_discount_cashback_amount":60209,"loan_amount":1039791,"auth_amount":1039791}}
{"card_data":{"card_number":"4012001037141112","card_expiry_year":"2019","card_expiry_month":"12","card_holder_
name":"harsh","cvv":"123"}}
{"netbanking_data":{"pay_code":"NB1033"}}
{"wallet_data":{"wallet_code":"payzapp","mobile_number":"9899189287"}}
2.2.1.2.5.1 UPI
{ "upi_data": { "vpa": "test@upi", "upi_option": "UPI " } }
2.2.1.2.5.2 GPAY
2.2.1.2.6.1 BFL
2.2.2 Response
2.2.2.1 Params
offer_scheme
product_details
emi_scheme
Parameter Name Type Description
scheme_id Long It tells scheme id applicable on
product
program_type Int It tells scheme of which type.
105-Bank EMI
108-Product discount
112-Subvention discount
is_scheme_valid Bool Is scheme is valid
Schemes
Reasons
2.2.2.2.1 Successful response for Cards, EMI, Netbanking and Wallets for process payment api
After receving successful response, customer will receive payment notification on his/her PSP app.
Final response of transaction will be posted as a S2S response on merchant’s callback url.
{ "api_url":
"http://environment/api/v2/validate/otp?token=Ml25pp7jQ87lWWlUpILdAa1yn
3LGjXPA%2fvNQk1A68uw%3d", "response_code": 1, "response_message":
"SUCCESS" }
2.2.2.2.4 Failure Response
Below codes are to be passed in process payment request for seamless integration
PAYMENT_CODE BANK_NAME
NB1001 AXIS Bank
NB1002 HDFC Bank
NB1003 JK Bank
NB1004 ICICI Bank
NB1005 Federal Bank
NB1006 State Bank of India
NB1007 State Bank of Bikaner and Jaipur
NB1008 State Bank of Hyderabad
NB1009 State Bank of Patiala
NB1010 State Bank of Mysore
NB1011 State Bank of Travancore
NB1012 Karnataka Bank
NB1013 Corporation Bank
NB1014 Indian Bank
NB1015 Yes Bank
NB1016 Central Bank
NB1017 Kotak Bank
NB1018 Oriental Bank of Commerce
NB1019 ING Vysya Bank (now Kotak)
NB1020 United Bank Of India
NB1021 Indian Overseas Bank
NB1022 Bank of India
NB1023 City Union Bank
NB1024 Union Bank of India
NB1025 Canara Bank
NB1026 Bank of Maharashtra
NB1027 Catholic Syrian Bank
NB1028 Dhanalakshmi Bank
NB1029 Andhra Bank
NB1030 Vijaya Bank
NB1031 Punjab National Bank
NB1032 UCO Bank
NB1033 IDBI Bank
PAYMENT_MODE_ID PAYMENT_MODE_NAME
1 CREDIT/DEBIT CARD
3 NET BANKING
4 EMI
5 REWARDS
6 EZECLICK
7 THIRD PARTY EMI
8 SI
9 E-MANDATE
10 UPI
11 WALLET
12 BHARAT QR CODE
13 DEBIT+PIN
14 DEBIT EMI