POST
/
api
/
v2
/
order
/
refund
curl --request POST \
  --url https://api.paytring.com/api/v2/order/refund \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "id": "<string>",
  "hash": "null"
}'
"{\n    \"status\": true,\n    \"message\": \"Refund has been initiated\",\n    \"id\": \"xxxxxx-xxxx\"\n}"

This API can trigger a refund for any order of any payment gateway.

Request Body

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

Responses

200 OK

{
  "status": true,
  "message": "Refund has been initiated",
  "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

Response

200
application/json

200

The response is of type object.