Documentation v2.0 Last updated: 2021-05-27

intent
Overview

At PayNet, we are committed to providing the most secure, reliable and user-friendly payment processing solutions. By partnering with us for your payment processing needs, you can be confident that payment transactions will be processed quickly and efficiently, and your customers’ information will be safe. You’ll enjoy our easy set-up using our Plugins and easy integration with our APIs. Our two-level fraud protection system protects transaction data throughout the payment process. With PayNet as your payment processor, you’ll benefit from the fastest, most secure, and cost-effective payment processing in the industry. PayNet API is a RESTful resource. In order to integrate with PayNet API, you will need the credentials of your PayNet Merchant Account. If you do not have a merchant account, you can sign up for one here. It's important to note that the PayNet APIs are constantly evolving, and updates are usually done every quarter, if required. PayNet will intimate any major API change, so it’s important that you check your merchant dashboard notification or e-mail, frequently to be updated.

You can also access Prebuilt postman documentation and json. :Click here
Web Service URLs

PayNet does not offer an explicit Sandbox / Testing environment. But using a demo account, you can freely test all the functionalities and integrate our API and Plugin without any hassle. In order to move to LIVE PRODUCTION environment, you will need to activate your LIVE MERCHANT ACCOUNT.

Production Environment :https://paynetapiv2.paynet.co.in
Sr.No API FUNCTION API CALL
1 Validate Secret Key https://paynetapiv2.paynet.co.in/merchant_api/ValidateSecretKey
2 Create PayPage https://paynetapiv2.paynet.co.in/apipaynet/generate_payment_page
3 Verify Payment https://paynetapiv2.paynet.co.in/merchant_api/VerifyPayment
4 Refund Transactions https://paynetapiv2.paynet.co.in/merchant_api/RefundTransactions
5 Transaction Reports https://paynetapiv2.paynet.co.in/merchant_api/TransactionReports

Definition

The following are some of the terms that are used in this document and their respective definitions.

Sr.No Term Definition
1 Merchant PayNet customer who will use the PayNet system in their shops/counters.
2 Secret Key Secret key available on the merchant dashboard, under the menu: E-commerce Plugins and API.
3 Customers The customer that the merchant will charge. They are also called cardholders.
4 Banks The banks with which PayNet will interact.
5 Payment processor The 3rd party payment gateway that PayNet is using to capture payments
6 Masked number The first 6 and last 4 numbers of the card number with*(asterisk in the middle)
7 Issuer Bank The bank which has issued the credit card being used.
8 Settlement Bank The bank where PayNet will settle money after clearance.

Validate Secret Key

A new authentication model has been introduced in our API. It depends on a unique Secret Key generated only once for each merchant and will be used in all the web services provided by PayNet. This method uses the merchant_email and secret_key to validate your credentials. To access your credentials please interact with our relationship managers to obtain the same..

1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://paynetapiv2.paynet.co.in/merchant_api/ValidateSecretKey

Request

Element Description Formats
merchant_email Required The merchant’s valid email address used at the time of sign up. String > 4 characters E.g.: foo@bar.com
secret_key Required SECRET Key generated by merchant dashboard String E.g.: Mao8sdhasfyahosdap9sd.

Response

Element Description Formats
result Validation of secret Key: valid / invalid. String E.g.: valid / invalid
response_code The response code of the API call. String 4 characters E.g.: 4000, 4001, 4002.

Response Codes

Response Code Description
4000 Merchant with merchant_email and secret key found
4001 Missing merchant email or secret key parameters
4002 Merchant with merchant_email and secret key not found
4003 Merchant with merchant_email not found

Create Pay Page

This method will accept all the parameters required to create a PayPage and then return the response as well as the link where all the parameters posted to the API will appear in the PayPage prefilled and the customer can enter ONLY the credit card information and make the payment.

REQUEST METHOD POST
PRODUCTION LIVE
PATH https://paynetapiv2.paynet.co.in/merchant_api/CreatePayPage

REQUEST

Element Description Formats
merchant_email Required Merchant email id used to login into PayNet Merchant Dashboard.. String E.g.: testing@test.com
secret_key Required SECRET Key generated by merchant dashboard String E.g.: Mao8sdhasfyahosdap9sd
site_url Required The URL of your site from which you will configure the API. String E.g.: http://www.yourwebsite.com/
return_url Required String E.g.: The URL to which the customer will be returned to. String E.g.: http://yourwebsite.com/pa be returned to.payment_completed.php
callback_url Required String E.g.: The URL to which the customer will be callback to. String E.g.: http://yourwebsite.com/callback be returned to.payment_completed.php

* The API V 2.x requires that the requesting website be exactly the same as the website/URL associated with your PayNet Merchant Account. The merchant can see this SITE URL on his dashboard, under “My Profile”.

For Demo Users: You can edit your site URL by clicking going to “My Profile” and clicking on edit, enter your correct site URL and click on Save.

For Live Merchants: You can use the website that you have submitted in the Go-Live application. If you need to edit/change the site URL, you can send a request to merchant.ops@paynet.co.in

c_first_name Required First Name of the Customer String 32 characters E.g.: John
c_last_name Required First Name of the Customer String 32 characters E.g.: Doe
c_phone_code Required Country code for Phone Number of the Customer String Minimum 3 numbers up to 6 numbers E.g.: 0091
c_phone_number Required Phone Number of the Customer. String Minimum 6 numbers up to 32 numbers E.g.: 3312345678
c_email Required Email of the customer. String 32 characters E.g.: customer@domain.com
products_per_title Required Product title of the product. If multiple products then add “||” separator To ensure that you get multiple line items in your PayPage, please make sure to add a space before and after two continuous pipeline separators. String 175 characters E.g.: IPhone || Samsung S5 || Samsung S4
unit_price Required Unit price of the product. If multiple products then add “||” separator. String 256 characters E.g.: 21.09 || 22.12 || 12.01
quantity Required Quantity of products. If multiple products then add “||” separator. To ensure that you get multiple line items in your PayPage, please make sure to add a space before and after two continuous pipeline separators. String 256 characters E.g.: 1 || 2 || 3
gst_amount Required Additional charges. e.g.: taxes, VATs, etc.. Float Up to 3 Decimal places E.g.: 123.399
amount Required Float Amount of the products and other Up to 3 Decimal places charges, it should be equal to: E.g.: 123.399 amount = (sum of all products’ (unit_price * quantity)) + other_charges This field will be displayed in the invoice as the sub total field. Float Up to 3 Decimal places E.g.: 123.399
discount Required Discount of the transaction The Total amount of the invoice will be= amount - discount Float Up to 3 Decimal places E.g.: 123.399
currency_code Required Currency of the amount stated. 3 character ISO currency code String E.g.: INR
ref_no Required Invoice reference number. Float Up to 3 Decimal places E.g.: 123.399
reference_no Required Invoice reference number. Its same as 'refno' parameter. Float Up to 3 Decimal places E.g.: 123.399
ip_customer Required The client IP with which the order 16 characters is placed.. String 16 characters E.g.: 123.123.12.2
ip_merchant Required Server IP where the order is coming from String 16 characters E.g.: 11.11.22.22
billing_address Required Complete Address of the customer. Multiple address lines will be merged into one single line. String 40 characters E.g.: Flat 11 Building 222 Block 333 Road 444 Mumbai India
state Required Billing State (part of the address) entered by the customer String 32 characters E.g.: Manama 2 characters for US and Canada E.g.: if state is NewYork then the state field should be NY
city Required Name of the billing city selected by customer String 13 characters E.g.: Manama
postal_code Required Billing Postal code provided by the customer String From 5 to 9 characters E.g.: 12345
Country Required Country of the customer String 3 character ISO country code E.g.: INR

Response Parameters

Element Description Formats
result The String represent for result about the supplied data. String E.g.: Pay Page is created. User must go to the page to complete the payment.
response_code The response code of the processor, if the parameters are accepted. String 4 Character E.g.: 4002
status The string represent ‘Success’ or ‘Failed’ Eg: Success/Failed
message The string represent message Eg: Paypage created successfully
p_id PayPage ID String E.g.: 123
payment_url The URL for the payment. String E.g.: http://www.paynet.co.in/pay/page/345

Response Codes

Response Code Description
4001 Missing mandatory parameters
4002 Merchant with merchant_email and secret_key not found
4003 Merchant with merchant_email not found
4007 Currency code used is invalid. Only 3 character ISO currency codes are valid.
4013 Amount should be in between 0.27 and 5000.00
4094 Your total amount is not matching with the sum of unit price amounts per quantity
4012 PayPage created successfully

Verify Payment

This method verifies the result of the payment. When you create a PayPage, you will receive p_id in the response. When the customer completes a payment and is referred back to your website, there is a payment_reference that is sent with a POST method. The payment_reference is used to verify the status of the payment whether it is a successful transaction or a failed transaction. Additionally, you can compare the payment_reference and the p_id, in order to match the payment with its respective PayPage. This can be used in seamless and stateful api integration.

1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://paynetapiv2.paynet.co.in/merchant_api/VerifyPayment

Request

Element Description Formats
merchant_email Required Merchant email that you use to sign up and/or login into PayNet Merchant Dashboard String > 4 characters E.g.: foo@bar.com
secret_key Required SECRET Key generated by merchant dashboard String E.g.: Mao8sdhasfyahosdap9sd.
payment_reference Required This is the p_id that is returned in the response of create PayPage when the page is created successfully. String Up to 64 characters E.g.: t2938yh202tu0

Response

Element Description Formats
result The string representation for result, whether transaction has succeeded or failed and the reason why your transaction failed. String E.g.: Payment is completed.
response_code The response code / error code of the String Up to 4 characters API call. Complete list of response codes can E.g.: 4002 be found in Merchant Dashboard > Help > Reason Code String Up to 4 characters E.g.: 4002.
pt_invoice_id The invoice/paypage ID of the transaction. String Up to 12 characters E.g.: 90094
amount The transaction amount. Float Up to 3 Decimal places E.g.: 123.399
transaction_id The ID of the latest transaction that occurred for this invoice. String Up to 12 characters E.g.: 90094
reference_no The same value posted in reference_no parameter in create pay page API String Up to 40 characters E.g.: 90094.

Response Codes

Error Code Description
4001 Missing mandatory parameters
4002 Merchant with merchant_email and secret_key not found
400 There are no transactions available.
486 Merchant with email not found
100 Payment is completed.
481 Payment is pending
482 Payment is initiated
484 Payment is failed/rejected
485 There are no invoice available with this paypage id

Refund Transaction

This method enables you to submit the refund requests using the below API function. Refund requests will be processed in around 24 hours and if you are using IPN service the IPN will post a response once the refund request is approved or rejected. Partial refunds are available. You can submit a single refund request for the whole amount of Multiple Partial refunds for the same transaction. However, if your refund request for a certain transaction is still pending for approval, you can’t submit a second refund request for the same transaction. Note: This feature is also available from Merchant Dashboard > Bank Account > Refunds Note: This API can be used by Active accounts only; it’s not available for Demo merchants This can be used in seamless and stateful api integration.

1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://paynetapiv2.paynet.co.in/merchant_api/RefundTransactions

Request

Element Description Formats
merchant_email Required Merchant email that you use to sign up and/or login into PayNet Merchant Dashboard String Up to128 characters E.g.: foof@foo.com
paypage_id Optional The paypage id of the successful payment that you wish to refund This is the p_id that is returned in the create paypage response. Up to 12 characters E.g.: 130017
payment_reference Required This is the p_id that is returned in the response of create PayPage when the page is created successfully. String Up to 64 characters E.g.: t2938yh202tu0
refund_amount Required The amount you wish to refund, it can either be partial amount or full amount String Up to 256 Characters
transaction_id Optional The transaction id of the successful payment that you wish to refund String Up to 12 characters E.g.: 130017

Response

Element Description Formats
result The string representation for result, whether transaction has succeeded or failed. String E.g.: invalid
response_code The response code / error code of the API call. Complete list of response codes can be found in Merchant Dashboard > Help > Reason Codes String Up to 4 characters E.g.: 4002

Response Code

Error Code Description
4001 Missing mandatory parameters
4010 Merchant with merchant_email not found
4009 Refund amount is invalid
4011 You are not authorized to view this transaction
4015 Refund amount is greater than transaction amount
4014 Refund already done for transaction id
4016 Refund request is sent to Operation for Approval. You can track the Status
4017 Refund request is rejected by Operation. You can track the Status
4018 Refund request is Cancelled/Rejected/OnHold

Transaction Reports

This API call will post all transactions that have taken place within the specified time interval to a URL. Before calling this API, you will need to set the listener URL for the reports. Login to your merchant dashboard and edit your profile. In the ‘IPN Listener for Transactions Reports’ Enter the URL where you would like PayNet to post your transactions and click on Save. Once you call the transaction_reports API, all the transactions will be posted to the listener URL and the response will be contain the number of transactions that will be posted. This can be used in seamless and stateful api integration.


1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://paynetapiv2.paynet.co.in/merchant_api/TransactionReports

Request

Element Description Formats
merchant_email Required Merchant email id String E.g.: foo@foo.com
secret_key Required Secret Key is generated from merchant Dashboard. String E.g.: Mao8sdhasfyahosdap9sd
startdate Required Start Date Format should be mm-dd-yy HH:MM:SS String E.g.: 02/20/2016 12:00:00ss
enddate Required End Date Format should be mm-dd-yy HH:MM:SS String E.g.: 02/20/2016 12:00:00

Response

Element Description Formats
result The string representation for result, whether transaction has succeeded or failed and the reason why your transaction failed. String E.g.: Payment is completed.
response_code Response code of the API call. String E.g.: 4001, 4090,4091
transaction_count Total number of transactions. String E.g.: 23
transaction_details The details of all the retrieved transactions List E.g: [transaction_id:1, order_id:1, amount:10, net_amount_credited:9.8, transaction_datetime:01/01/2000, status: Success/Failed/Expired]

Response Codes

Error Code Description
4001 Missing mandatory parameters
486 Merchant with email not found
485 There are no invoice available
4006 Your time interval should be less than 60 days
4091 There are no transactions available between start date and end date
4090 Transaction found

Seamless/Server To Server

Create Order

This method will accept all the parameters required to create an Order and then return the response.

REQUEST METHOD POST
PRODUCTION LIVE
PATH https://paynetapiv2.paynet.co.in/merchant_api/CreateOrder

REQUEST

Element Description Formats
merchant_email Required Merchant email id used to login into PayNet Merchant Dashboard.. String E.g.: testing@test.com
secret_key Required SECRET Key generated by merchant dashboard String E.g.: Mao8sdhasfyahosdap9sd
site_url Required The URL of your site from which you will configure the API. String E.g.: http://www.yourwebsite.com/
return_url Required String E.g.: The URL to which the customer will be returned to. String E.g.: http://yourwebsite.com/pa be returned to.pay yment_completed.php
callback_url Required String E.g.: The URL to which the customer will be callback to. String E.g.: http://yourwebsite.com/pa be returned to.pay yment_completed.php
c_first_name Required First Name of the Customer String 32 characters E.g.: John
c_last_name Required First Name of the Customer String 32 characters E.g.: Doe
c_phone_code Required Country code for Phone Number of the Customer String Minimum 3 numbers up to 6 numbers E.g.: 0091
c_phone_number Required Phone Number of the Customer. String Minimum 6 numbers up to 32 numbers E.g.: 3312345678
c_email Required Email of the customer. String 32 characters E.g.: customer@domain.com
products_per_title Required Product title of the product. String 175 characters E.g.: IPhone
unit_price Required Unit price of the product. String 256 characters E.g.: 21.09
quantity Required Quantity of products. String 256 characters E.g.: 1
gst_amount Required Additional charges. e.g.: taxes, VATs, etc.. Float Up to 3 Decimal places E.g.: 123.399
amount Required Float Amount of the products and other Up to 3 Decimal places charges, it should be equal to: E.g.: 123.399 amount = (sum of all products’ (unit_price * quantity)) + other_charges This field will be displayed in the invoice as the sub total field. Float Up to 3 Decimal places E.g.: 123.399
discount Required Discount of the transaction The Total amount of the invoice will be= amount - discount Float Up to 3 Decimal places E.g.: 123.399
currency_code Required Currency of the amount stated. 3 character ISO currency code String E.g.: INR
ref_no Required Invoice reference number. Float Up to 3 Decimal places E.g.: 123.399
reference_no Required Invoice reference number. Its same as 'refno' parameter. Float Up to 3 Decimal places E.g.: 123.399
ip_customer Required The client IP with which the order 16 characters is placed.. String 16 characters E.g.: 123.123.12.2
ip_merchant Required Server IP where the order is coming from String 16 characters E.g.: 11.11.22.22
billing_address Required Complete Address of the customer. Multiple address lines will be merged into one single line. String 40 characters E.g.: Flat 11 Building 222 Block 333 Road 444 Mumbai India
state Required Billing State (part of the address) entered by the customer String 32 characters E.g.: Manama 2 characters for US and Canada E.g.: if state is NewYork then the state field should be NY
city Required Name of the billing city selected by customer String 13 characters E.g.: Manama
postal_code Required Billing Postal code provided by the customer String From 5 to 9 characters E.g.: 12345
Country Required Country of the customer String 3 character ISO country code E.g.: INR

Response Parameters

Element Description Formats
result The String represent for result about the supplied data. String E.g.: Pay Page is created. User must go to the page to complete the payment.
response_code The response code of the processor, if the parameters are accepted. String 4 Character E.g.: 4002
p_id PayPage ID String E.g.: 123
payment_url* The URL for the payment. String E.g.: http://www.paynet.co.in/pay/page/345

Response Codes

Response Code Description
4012 PayPage created successfully
4001 Missing mandatory parameters
4007 Currency code used is invalid. Only 3 character ISO currency codes are valid.
4008 Your Site url is not matching with profile url
4013 Your 'amount' post variable should be between 0.27 and 5000.00 USD
4094 Your total amount is not matching with the sum of unit price amounts per quantity

Payout

Get Balance

This API is used to check current balance in Payout account.

REQUEST METHOD POST
PATH https://payoutapiv2.paynet.co.in/merchant_api/CheckPayoutMasterBalance

Request Parameters

Element Description Formats
api_key Required, Api key can be found in Merchant Profile as secret key String E.g.Mao8sdhasfyahosdap9sd.
merchant_email Required,Merchant email can be found in Merchant Profile String > 4 characters E.g.:foo@bar.com

Sample Response (Success)

                                {
                                    "auth_response": {
                                        "result": {
                                            "response": "success",
                                            "response_code": "1512"
                                        }
                                    },
                                    "request_response": {
                                        "balance": 38.14
                                    }
                                }
    

Sample Response codes for Success

1512 Success: Payout Balance Fetched Successfully!!

Sample Response (Failure)

Missing secret_key parameter:

                                {
                                    "auth_response": {
                                        "result": {
                                            "response": "missing secret_key parameter",
                                            "response_code": "2001"
                                        }
                                    },
                                    "request_response": "EMPTY"
                                }
    

Wrong Secret _key:

                                {
                                    "auth_response": {
                                        "result": {
                                            "response": "merchant not found",
                                            "response_code": "2002"
                                        }
                                    },
                                    "request_response": "EMPTY"
                                }
    

Sample Response codes reference for Failure:

Response Code Description
1502 Failure: Unable to Fetch Balance!!
2001 Missing secret_key parameter
2002 merchant not found
2003 Invalid secret key
2004 merchant virtual account not found

Make Payout

This API is used to initiate a Payout transaction.

REQUEST METHOD POST
PATH https://payoutapiv2.paynet.co.in/merchant_api/DoPayout

Request Parameters

Element Data type Description
api_key String Required, Api key can be found in Merchant Profile as secret key
merchant_email String Required The merchant’s valid email address used at the time of sign up.
customer_email String Required, Customer's email
phone_number String Required, User phone number
pan_no String Required, Pancard Number
aadhar_no String Required, Aadhaar Card Number
account_holder_name String Required, User’s Bank account hoder name
bank_name String Optional, User’s Bank Name
bank_branch String Optional, User’s Bank Branch Name
account_number String Required, User’s Bank account No
ifsc String Required, User’s Bank ifsc code
amount String Required, Payout amount
upi_id String Required, upi Id
merchantTxnRef String Required, Merchant payout order Id
payment_type String Required, NEFT/IMPS/RTGS

Sample Response (Success)

                                {
                                    "response": "success",
                                    "response_code": "1511",
                                    "message": "Payment Initiated Successfully"
                                }
    
                                

Sample Response codes reference for Success

Response Code Description
1511 Success: Payout Initiated Successfully!!

Sample Response (Failure)

                                {
                                    "response": "invalid",
                                    "response_code": "1514",
                                    "message": "Amount is Invalid"
                                }
    
                                

Sample Response codes reference for Failure:

Response Code Description
4001 Missing Parameters
4003 Merchant with email not found
4002 Merchant with email and secret key not found
1514 Amount is Invalid
1515 Account Number is invalid
1516 IFSC Code is invalid
1517 Account Holder Name is invalid
1518 Phone Number is invalid
1521 Bank Name is Invalid
1522 Bank Branch is Invalid
1523 Payment Type is Invalid
1524 Merchant Transaction Reference is Invalid
1525 Customer Email is Invalid
1526 Incorrect ifsc format
1527 Incorrect payment mode
1528 Payout master has insufficient balance
1529 Limit is not assigned to merchant

Status Check

This API is used to check a current status of Payout transaction.

REQUEST METHOD GET
PATH https://payoutapiv2.paynet.co.in/merchant_api/StatusCheck

Request Parameters

Element Data type Description
api_key String Required, Api key can be found in Merchant Profile as secret key
merchant_email String Required The merchant’s valid email address used at the time of sign up.
merchantTxnRef String Merchant payout order id
trxnRef String Paynet txn ref No

Note: Status Check can be made using either txnRef or merchantTxnRef. Please send only one of the parameters.

Sample Response (Success)

                                {
                                    "result": {
                                    "response": "Transaction Successful",
                                    "response_code": "1514",
                                    "status": true,
                                    "utr": null,
                                    "reference_no": "PNT1878307623",
                                    "merchantTxnRef": "XXAB12as12347"
                                    }
                                }
                            
    
                                

Sample Response codes for Success

Response Code Description
1513 True: transaction Successful

Sample Response (Failure)


                                {
                                    "auth_response": {
                                        "result": {
                                            "response": "merchant not found",
                                            "response_code": "2002"
                                        }
                                    },
                                    "request_response": "EMPTY"
                                }

                                

Sample Response codes reference for Failure:

Response Code Description
1503 False: Transaction not Found
2001 missing secret_key or merchant_email parameter
2002 merchant not found
2000 & 2002 Invalid

SDK

OverView

We have created ready-made code for you to start using our API's in various different languages.

Web SDK

PHP
We have created a sample code in one of the most widely used language.
Java
Looking for sample code for your Java projects
GoLang

Mobile Sdk

Android