POST
/
api
/
v2
/
order
/
cancel
curl --request POST \
  --url https://api.paytring.com/api/v2/order/cancel \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "test_123",
  "id": "<string>",
  "hash": "<string>"
}'
"{\n    \"status\": true,\n    \"message\": \"Order canceled successfully.\"\n}"

This API is used to cancel a payment for a specific order.

Request Body

{
  "key": "string", // Merchant API key
  "id": "string", // Payment ID
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "message": "Payment cancelled successfully",
  "id": "string"
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
key
string
default:test_123
required

Merchant Key

id
string
required

pass order id of partying in this param.

hash
string
required

hash is calculated as provided in doc.

Response

200
application/json
200
status
boolean
default:true
Example:

true

message
string
Example:

"Order canceled successfully."