The Expire Intent Link API is used to expire UPI Intent link.
Environment | URI |
---|---|
Production | https://info.payu.in/merchant/postservice.php |
Request parameters
Parameter | Description | Sample Value |
---|---|---|
key
|
| vDy3i7 |
command |
| expire_intent_link |
hash |
| ajh84babvav |
var1 |
| {"transactionIds":"intent210,intent211"} |
Sample request
curl --location -g --request POST 'https://info.payu.in/merchant/postservice.php?command=expire_intent_link&key=vDy3i7&hash=c8aa5dc5f2139936227bc1daf21dd2cad79fc32a623b66098667e6ebfc0f7aec0005f4e19e4296c79cf1f92077db60a20635a572342f5377972c469137db6bf1&var1={"transactionIds":"intent210,intent211"}' \
--data-urlencode 'command=Mandatory' \
--data-urlencode 'key=Mandatory' \
--data-urlencode 'hash=Mandatory' \
--data-urlencode 'var1=Mandatory'
import http.client
conn = http.client.HTTPSConnection("info.payu.in")
payload = 'command=Mandatory&key=Mandatory&hash=Mandatory&var1=Mandatory'
headers = {}
conn.request("POST", "/merchant/postservice.php?command=expire_intent_link&key=vDy3i7&hash=c8aa5dc5f2139936227bc1daf21dd2cad79fc32a623b66098667e6ebfc0f7aec0005f4e19e4296c79cf1f92077db60a20635a572342f5377972c469137db6bf1&var1=%7B%22transactionIds%22:%22intent210,intent211%22%7D", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://info.payu.in/merchant/postservice.php?command=expire_intent_link&key=vDy3i7&hash=c8aa5dc5f2139936227bc1daf21dd2cad79fc32a623b66098667e6ebfc0f7aec0005f4e19e4296c79cf1f92077db60a20635a572342f5377972c469137db6bf1&var1=%7B%22transactionIds%22:%22intent210,intent211%22%7D',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'command=Mandatory&key=Mandatory&hash=Mandatory&var1=Mandatory',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
require "uri"
require "net/http"
url = URI("https://info.payu.in/merchant/postservice.php?command=expire_intent_link&key=vDy3i7&hash=c8aa5dc5f2139936227bc1daf21dd2cad79fc32a623b66098667e6ebfc0f7aec0005f4e19e4296c79cf1f92077db60a20635a572342f5377972c469137db6bf1&var1={\"transactionIds\":\"intent210,intent211\"}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "command=Mandatory&key=Mandatory&hash=Mandatory&var1=Mandatory"
response = https.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "command=Mandatory&key=Mandatory&hash=Mandatory&var1=Mandatory");
Request request = new Request.Builder()
.url("https://info.payu.in/merchant/postservice.php?command=expire_intent_link&key=vDy3i7&hash=c8aa5dc5f2139936227bc1daf21dd2cad79fc32a623b66098667e6ebfc0f7aec0005f4e19e4296c79cf1f92077db60a20635a572342f5377972c469137db6bf1&var1={\"transactionIds\":\"intent210,intent211\"}")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
Response parameters
Parameter | Description |
---|---|
status | This parameter returns the status of web service call. The status can be any of the following: 0 - If web service call failed |
msg | This parameter returns the following message if the offline intent link was generated successfully: |
details | This parameter returns the message in following JSON format if the request was successful: txnId: The transaction ID of the offline intent link. |
Sample response
{
"status": "success",
"message": "processed",
"details": [
{
"txnId": "intent210",
"status": 0,
"msg": "No active Intent Link against this txnid"
},
{
"txnId": "intent211",
"status": 1,
"msg": "Intent Link expired"
}
]
}