POST
/
api
/
v2
/
order
/
refund
/
partial
curl --request POST \
  --url https://api.paytring.com/api/v2/order/refund/partial \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "id": "<string>",
  "amount": 123,
  "hash": "<string>"
}'
"{\n    \"status\": true,\n    \"message\": \"ORDER_PARTIALLY_REFUNDED_SUCCESSFULLY\",\n    \"id\": \"xxxxxxxxxxx\"\n}"

This API is used to initiate a partial refund for a specific order.

Request Body

{
  "key": "string", // Merchant API key
  "order_id": "string", // Order ID
  "amount": 50, // Amount to refund
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "message": "Partial refund initiated successfully",
  "refund_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
required

Merchant api key, provided in paytring dashbord

id
string
required

Order id provided by paytring.

amount
integer
required

Amount should be in paise/cents and it should be based on order currency

hash
string
required

to be calculated by hash logic.

Response

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

true

message
string
Example:

"ORDER_PARTIALLY_REFUNDED_SUCCESSFULLY"

id
string
Example:

"xxxxxxxxxxx"