Skip to main content

Payment Link

The Payment Link is a functionality designed to finalize an interrupted transaction.

This link can be incorporated within a message sent to the customer, and you have the flexibility to decide on the manner and format in which the customer receives it. Upon clicking on the link, the customer is redirected to a PayU page. On this page, the order details, the payable amount, and the available payment methods are presented.

Below, you see an example of message with payment link:

Message Example with Payment Link

Dear Madam,

further to our earlier telephone conversation, I send you a link to the insurance policy payment.


Payment lik is valid till: MM.DD.RR.

If you have any questions, please contact our Customer Service specialists by calling xxx xxx xxx. You may contact us from Monday to Friday, between 8.00 am and 7.00 pm and on Saturday from 8.00 am to 4.30 pm.

Kind regards,

XXX

Requirements and Recommendations for the Payment Link Service

Prior to integrating this service, it's important to go through the recommendations and requirements associated with the usage of the payment link.

Integrating Payment Link

The payment link is based on regular PayU integration described in: Creating a New Order section. The validityTime field serves as an extension for the request. It is included in the request body and indicates the payment link expiry date.

Request Example Created for the Payment Link
curl -v -X POST https://secure.payu.com/api/v2_1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '{
"notifyUrl":"https://your.eshop.com/notify",
"customerIp":"127.0.0.1",
"merchantPosId":"145227",
"description":"Car insurance",
"currencyCode":"PLN",
"totalAmount":"15000",
"extOrderId": "0c5v50c0bhcw69o4zty4dd",
"validityTime":"86400",
"products":[
{
"name":"Car insurance",
"unitPrice":"15000",
"quantity":"1"
}
],
"buyer": {
"email": "john.doe@example.com",
"phone": "654111654",
"firstName": "John",
"lastName": "Doe"
}
}'

For details on parameters, refer to the Create an Order section in our API Reference.

Notes

Above order was created using:

  • basic buyer's details,
  • exernal identifier (extOrderId),
  • payment link validityTime set to 86400s (24h).

In response PayU returns standard response object where the redirectUri field includes payment link.

Response Example
{
"status":{
"statusCode":"SUCCESS",
},
"redirectUri":"{payment_summary_page_url}",
"orderId":"WZHF5FFDRJ140731GUEST000P01",
"extOrderId":"{your_order_identifier}",
}'

The link payment expiry date (validityTime) is provided in seconds. The minimum value is one (1) second and the maximum one is three months (8035200 seconds).

PayU automatically cancels payments that are in the new status. However, if the payment is already marked as pending after the payment gateway selection, canceling the payment requires following the method outlined in the Cancelling Transaction section.

PayU notifies the seller or service provider regarding the payment by sending a notification to the address specified in the notifyUrl parameter of the order. Further details about notifications can be found in the Notifications section.