You don't have javascript enabled.
Please enable javascript in your site settings to get better user experience
Please Use PC to view the documentation
Seller Cancel Payment
First Check the Order Status.
On getting same response as below, seller has the rights to cancel the order in the transaction.
data : { "Buyer_agree" : true, "Buyer_paid" : true, "Seller_agree" : true, "Buyer_del_conf" : false, "Seller_del_conf" : false }
This section details the APIs you need to work with to cancel order by seller in a transaction.
https://verifipay.in/test/v1/seller-cancel-transaction
cURL
Node
Ruby
Python
curl --request POST \
--url https://verifipay.in/test/v1/seller-cancel-transaction \
--header 'content-type: application/json' \
--data '{"request":"xyz"}' \
--header'x-verify: X-VERIFY'
var request = require("request");

var options = { method: 'POST',
url: https://verifipay.in/test/v1/seller-cancel-transaction,
headers: {   'x-verify': 'X-VERIFY',
  'content-type': 'application/json' }
data:{"request":"xyz"} };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
require 'uri'
require 'net/http'
url = URI(https://verifipay.in/test/v1/seller-cancel-transaction)

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["x-verify"] = 'X-VERIFY'

response = http.request(request)
puts response.read_body
import requests

url = "https://verifipay.in/test/v1/seller-cancel-transaction"

headers = { 'content-type': "application/json",
'x-verify': "X-VERIFY" }
data={"request":"xyz"}
response = requests.request("POST", url, data=data,headers=headers)

print(response.text)
Success
Failure
{
"success": true,
"code": "TXN_CANCELLED",
"description": "Trasaction got cancelled"
}
{
"success": false,
"code": "BAD_REQUEST",
"description": "Invalid request payload",
}
Request Header
Header Name Header Value
Content-Type application/json
x-api-token API Token Provided by Verifipay
Sample Payload for Base64
 {
  "Txn_id": "YX93720849HDIN929",
  "Uniq_order_id": "VP8289Y61969"
}
Sample Request
 {
  "request": "eyJUeG5faWQiOiJZWDkzNzIwODQ5SERJTjkyOSIsIlJlZ2lzdGVyZWRfbm8iOiI4Nzg5NDYwOTMwIiwiQnV5ZXIiOiI5MDc4NTQ1NDYxIiwiQnV5ZXJfbmFtZSI6IlN1Ymhhaml0IEthciIsIkJ1eWVyX2VtYWlsIjoic3ViaGFqaXRrYXIxOTk2QGdtYWlsLmNvbSIsIlNlbGxlciI6Ijg3ODk0NjA5MzAiLCJTZWxsZXJfbmFtZSI6IkFkaXR5YSBCaGFyZ2F2IiwiU2VsbGVyX2VtYWlsIjoiYWRpdHlhYmhhcmdhdjk2QGdtYWlsLmNvbSIsIlByb2R1Y3QiOlt7IlByb2R1Y3QiOiJWZXJ0aXMgU2hpcnRzIiwiUHJpY2UiOiI0NTAiLCJJbnNwZWN0aW9uIHBlcmlvZCI6IjYiLCJEZXNjcmlwdGlvbiI6IlNpemUgTCwgQ29sb3VyIFllbGxvdyJ9LHsiUHJvZHVjdCI6IlplbGxvIEplYW5zIiwiUHJpY2UiOiI3NTAiLCJJbnNwZWN0aW9uIHBlcmlvZCI6IjMiLCJEZXNjcmlwdGlvbiI6IlNpemUgMzAsIFR5cGUgTmFycm93LCBDb2xvdXIgQmx1ZSJ9XSwidF9wcmljZSI6IjEyMDAifQ==",
}
Request Parameters
Parameter Name Type Description Mandatory
Txn_id String Unique TransactionID generated by the merchant to track request to Verifipay transactionId length should be less than 38 characters. Yes
Uniq_order_id String Unique id returned by Verifipay for every product. So that the merchant can track request to Verifipay Yes
Response Parameters
Parameter Name Type Description
success Boolean Success status of the request
code String See list of response codes below
description String Short message about code
Response Codes
Codes Description
BAD_REQUEST Invalid request payload
AUTHORIZATIO_FAILED Incorrect x-verify header
TXN_CANCELLED Trasaction got cancelled
TXN_CANCELLED_NOT_REFUNDED Trasaction cancelled but Refund not initiated due to Buyer's Pending KYC
TXN_CANCELLED_REFUNDED Trasaction got cancelled and Buyer got the Refund
INVALID_TRANSACTION_ID No Such Transaction Available with Us
INTERNAL_SERVER_ERROR Something went wrong
You will have to check the Order Status of the Transaction before performing any action. To cancel order in a transaction by buyer(Buyer Cancel's transaction).