Documentation Last updated: 2021-05-27

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://merchants.paynet.co.in
Sr.No API FUNCTION API CALL
1 Validate Secret Key https://merchants.paynet.co.in/apipaynet/authenticate_key
2 Create PayPage https://merchants.paynet.co.in/apipaynet/generate_payment_page
3 Verify Payment https://merchants.paynet.co.in/apipaynet/uphold_payment
4 Refund Transactions https://merchants.paynet.co.in/apipaynet/refund_process
5 Transaction Reports https://merchants.paynet.co.in/apipaynet/transaction_details

Defination

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

Sr.No Term Definatiion
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://merchants.paynet.co.in/apipaynet/authenticate_key

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 Valid Secret Key
4001 missing secret_key or merchant_email parameter
4002 Invalid Secret Key

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://merchants.paynet.co.in/apipaynet/generate_payment_page

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
title Required Description or title of the 32 characters transaction done by the customer. String E.g.: Order # 3321

* 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

m_first_name Required First Name of the Customer String 32 characters E.g.: John
m_last_name Required First Name of the Customer String 32 characters E.g.: Doe
m_phone_number Required Country code for Phone Number of the Customer String Minimum 3 numbers up to 6 numbers E.g.: 0091
phone_number Required Phone Number of the Customer. String Minimum 6 numbers up to 32 numbers E.g.: 3312345678
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
other_charges Required Additional charges. e.g.: shipping charges, 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 Required Currency of the amount stated. 3 character ISO currency code String E.g.: INR
refno 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
shipping_first_name Required First Name of the Customer in 32 characters shipping address String 32 character E.g.: John
shipping_last_name Required Last Name of the Customer in shipping address String 32 character E.g.: Doe
address_shipping** Required Shipping address of the customer String 40 characters E.g.: Flat abc road 123
city_shipping Required Shipping City of the customer String 13 characters E.g.: Mumbai
state_shipping *** Required Shipping State of the customer String 32 characters E.g.: MAH 2 characters for US and Canada E.g.: if state is NewYork then the state field should be NY
postal_code_shipping Required Shipping postal code of the customer String From 5 to 9 characters E.g.: 403129
country_shipping Required Shipping country of the customer String 3 character ISO country code E.g.: IN
msg_lang Required Language of the PayPage to be created. Invalid or blank entries will default to English. String E.g.: English / Arabic
cms_with_version Required CMS / Language that you are using with its version. This will help us to troubleshoot issues, if any. String E.g.: Magento 0.1.9

** If shipping details are not required from customer or the same as the billing details, you can post the same billing details fields in shipping details fields.

*** When the country is selected as USA or CANADA, the state field should contain a String of 2 characters containing the ISO state code otherwise the payments may be rejected. For other countries, the state can be a string of up to 32 characters.

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
4404 You don't have permissions to create an Invoice
4001 Variable not found
4002 Invalid Credentials.
4007 'currency' code used is invalid. Only 3 character ISO currency codes are valid.
4008 Your SITE URL is not matching with your profile URL
4013 Your 'amount' post variable should be between 0.27 and 5000.00 USD
4014 Products titles, Prices, quantity are not matching
4094 Your total amount is not matching with the sum of unit price amounts per quantity

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.

1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://merchants.paynet.co.in/apipaynet/uphold_payment

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
currency The currency of the transaction amount. String 3 character ISO country code E.g.: INR
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 parameters
4002 Invalid Credentials
400 There are no transactions available.
100 Payment is completed.
481 482 This transaction is under review and will be reversed based on your card issuing bank's policy, if its not approved within 24 hours
Any response code other than 100, 481, 482 Any other response than 100, 482, 481 means that the transaction has been rejected and the rejection reason is the description of the corresponding response code.

Payment Status

Each transaction at PayNet can have one of the following statuses:

Status Description Reason Code
Payment Approved Payment is Successful 100
Payment Rejected Payment is rejected Any reason code other than 100 or 481 or 482
Payment Rejected (by fraud monitoring tools) Payment is rejected by our fraud monitoring tools; however the transactions are only authorized (Not tools) settled). In case the merchant can verify the transaction is genuine, the merchant needs to contact PayNet to force accept the transaction after checking if it is not fraud and we might ask verification documents like ID card and front side of credit card used showing only name and last 4 digits, otherwise the transaction amount will be released back to the cardholder according to the issuing bank policy. In case you are using IPN, it will post the response once the transaction is force Accepted from our side 481 or 482
Payment Force Accepted Payment is Approved by PayNet Operations team, upon merchant request and after verifying it’s not fraud. Note: In this case the Payment Status is only updated but the reason code remains the same 481 or 482
Payment Refunded For Payments that you submit a refund request for Note: In this case the Payment Status is only either from Merchant’s updated but the reason dashboard or using API code remains the same for submitting refund requests In case you are using IPN, it will post the response once the Accepted from our side 100 For Approved trx 481 or 482 In case the transaction was force Accepted
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.

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

1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://merchants.paynet.co.in/apipaynet/refund_process

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 and the reason why your transaction failed. String E.g.: Payment is completed.
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 parameters
4002 Invalid Credentials
810 You already requested Refund for this Transaction ID
811 Refund amount you requested is greater than transaction amount Your balance is insufficient to cover the Refund Amount
812 Refund request is sent to Operation for Approval. You can track the Status
813 You are not authorized to view this transaction

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.


1 REQUEST METHOD POST
2 PRODUCTION LIVE
3 PATH https://merchants.paynet.co.in/apipaynet/transactions_details

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
response_code Response code of the API call. String E.g.: 4001, 4090,4091
transaction_count Total number of transactions. String E.g.: 23
details The details of all the retrieved transactions String
status Payment Status String E.g.: Approved/ Rejected / Refunded / Force Accepted
response_code Payment Result Response Code 100 for successful or refunded payment 481: DM declined or Force Accepted Payment other: Rejected String E.g.: 475
transaction_id PayNet Transaction ID String E.g.: 12345
order_id Merchant’s Website order ID String E.g.: 1234
auth_code Authorization Code String E.g.: AhjzbwSR8VsHlol4QVCEcgSegd Uxd
transaction_title Title of the transaction String
amount Transaction Amount String E.g.: 199.287
currency Transaction Currency 3 Character ISO country Code String E.g.: AED
net_amount Transaction Currency 3 Character ISO country Code String E.g.: AED
net_amount_currency Merchant Dashboard Currency 3 Character ISO country Code String E.g.: AED
net_amount_credited Net Amount Credit to Merchant’s Balance after deducting PayNet fees String E.g.: 199.287
net_amount_credited_currency Merchant Dashboard Currency 3 Character ISO country Code String E.g.: AED
transaction_datetime Date and time of the transaction String E.g.: 23-03-2016 01:39:16 pm
force_accept_datetime Date and time of force accept (If applicable) String E.g.: 23-03-2016 01:39:16 am

Response Codes

Error Code Description
4001 Missing parameters
4002 Invalid Credentials
4006 Your time interval should be less than 60 days
4090 Data Found
4091 Transaction Count is 0

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