POST
/
api
/
v2
/
order
/
refund
/
attempts
curl --request POST \
  --url https://api.paytring.com/api/v2/order/refund/attempts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "order_id": "<string>",
  "hash": "null"
}'
"{\n    \"status\": true,\n    \"message\": \"Refund attempts fetched successfully\",\n    \"data\": [\n        {\n            \"refund_id\": \"7230436xxxxxx48056\",\n            \"amount\": 100,\n            \"type\": \"Full\",\n            \"status\": \"success\",\n          \t\"rrn\": \"xxxxxxxxxxxxxxxxxxx\",\n            \"attempted_at\": \"2xxx-0x-23T07:55:30.000000Z\"\n        }\n    ],\n    \"request_id\": x67af25xxxxxxx\"\n}"

This API retrieves the list of refund attempts for a specific order.

Request Parameters

  • key (string): Merchant API key
  • order_id (string): Order ID
  • hash (string): Calculated hash for request validation

Responses

200 OK

{
  "status": true,
  "refund_attempts": [
    {
      "attempt_id": "string",
      "status": "processed",
      "amount": 50
    },
    {
      "attempt_id": "string",
      "status": "failed",
      "amount": 30
    }
  ]
}

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

order_id
string
required

Utilise the order ID provided in the response from Paytring's create order API.

hash
string
default:null
required

Only required in V1 API . Pass NULL IN V2 API

Response

200
application/json
200

The response is of type any.