Embedded Form – PayU Documentation

Embedded Form

Overview

 

Our embedded form solution is the perfect choice for you if you want to own the entire payment experience of your customers. You will  create your own payment page to collect payment details and  POST a request  with all parameters to PayUbiz

Here, you’ll find more information on what parameters you need to POST, how to POST and how to handle response when you’ll integrate the embedded form in your website.

Pre-requisites

The following is required to integrate the embedded form solution:

  1. Test Key and salt for test environment (For Testing) [ Test Key : gtKFFx ,  Test Salt : eCwWELxi ]
  2. Live Key and salt for production environment (For Go Live) [ This will be shared with you post merchant on-boarding ]

How it works?

 

  • You make a HTTP POST request to PayU server with mandatory parameters.
  • Once POST request hits the PayU server, customer will be redirected to corresponding bank
  • Depending on the status of the transaction, customer is directed to surl/furl (success URL, failure URL) and you get a POST on the registered surl/furl links configured in the dashboard

Making a HTTP POST request

 

To get started you need to first make a HTTP POST request on test URL with the following mandatory parameters, post which  the customer will be redirected to the corresponding bank page for further processing:

URL https://test.payu.in/_payment
Parameters Description Data type Character

Limit

Example
key Unique key provided by Payu varchar  20 characters C0Ds8q
txnid Transaction id/ reference id generated at your end varchar 25 characters fd3e847h2
amount Amount payable by the customer number, float, double 2 digits after decimel 10.00
productinfo Small description of product, a string defining your product varchar 100 characters tshirt100
firstname First name of the customer varchar 60 characters Ankit
email Email id of the customer varchar 50 test@gmail.com
phone Phone number of the customerv varchar 50 (numeric) 9999999999
surl Redirect URL (your site) in case of a successful transaction  HTTP url  mediumtext success@yoursite.com
furl Redirect URL (your site) in case of a failed transaction  HTTP url  mediumtext failure@yoursite.com
hash Security parameter to avoid tampering. Refer : Hash  SHA512  varchar(256)

 

Based on the payment method customer chooses, additional parameters are required  to be sent which are as per the table below.:

 

If Credit Card/Debit Card is chosen as the mode of payment:

 

Parameters Description Data type Character

Limit

Example
pg Payment mode as chosen by the merchant  string  20 CC
ccnum Credit/ debit card number as entered by customer for transaction  string  20  5123456789012346
ccname Name on card- as entered by customer  string  20  ABC XYZ
ccvv Cvv number of the card- as entered by the customer  string  4  123
ccexpmon Card’s expiry month- as entered by customer  string 2 digits 6
ccexpyr Card’s expiry year- as entered by customer  string 4 digits 2018
Bank Code Identification code of each of the payment option  string  8 CC

 

If Net Banking is chosen as the mode of payment:

 

Parameters Description Data type Character

Limit

Example
pg Payment mode as chosen by the merchant  string  20 NB
Bank Code Identification code of each of the payment option  string  8 ICIB

 

If EMI is chosen as the mode of payment:

 

Parameters Description Data type Character

Limit

Example
pg Payment mode as chosen by the merchant  string  20 CC
ccnum Credit/ debit card number as entered by customer for transaction  string  20  5123456789012346
ccname Name on card- as entered by customer  string  20  ABC XYZ
ccvv Cvv number of the card- as entered by the customer  string  4  123
ccexpmon Card’s expiry month- as entered by customer  string 2 digits 6
ccexpyr Card’s expiry year- as entered by customer  string 4 digits 2018
Bank Code Identification code of each of the payment option  string  8 ICIB

 

If Cash Cards is chosen as mode of payment:

 

Parameters Description Data type Character

Limit

Example
pg Payment mode as chosen by the merchant  string  20 CASH
bankcode Identification code of each of the payment option  string  8 ICIB, check out the entire list of bank codes.

 

If PayUmoney is chosen as mode of payment:

Parameters Description Data type Character

Limit

Example
pg Payment mode as chosen by the merchant  string  20 WALLET
bankcode Identification code of each of the payment option  string  8 PAYUW

 

The parameters should be sent in the following format.

Getting response via GET method

 

In the payment response, you will receive following additional parameters in addition to the parameters posted to PayUbiz earlier

 

Parameter Description Example
mihpayid Unique reference no. created at PayUbiz’s end for each transaction.  5862483893
mode Payment category by which the transaction was completed/ attempted. Check out the entire list.  CC/DC/NB/WALLET
status Status of transaction  captured/bounced
reversehash Security parameter to avoid tampering  
error For a failed transaction, this parameter provides the reason for failure.  Authentication failed.Transaction cannot be authorized
bankcode Provides the payment option used for transaction.  AXIB, ICIB
PG_TYPE Gives the information of payment gateway used for transaction.   HDFCPG/SBIDI/INDUSPG
bank_ref_num For a successful transaction, this will give you the bank reference number generated at bank’s end    116646101
unmappedstatus This gives the status of transaction as per payu’s internal database.   captured/bounced

Go Live

You would have to make the post request to the following production URL, to have a live transaction:

URL https://secure.payu.in/_payment

Still have questions?

Our team will be more than happy to help you out. You can reach out to them at tech@payu.in