> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paytring.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refund Attempts

> This takes an order id and returns all associated refunds with that Order ID.

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

```json theme={null}
{
  "status": true,
  "refund_attempts": [
    {
      "attempt_id": "string",
      "status": "processed",
      "amount": 50
    },
    {
      "attempt_id": "string",
      "status": "failed",
      "amount": 30
    }
  ]
}
```

#### 400 Bad Request

```json theme={null}
{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}
```


## OpenAPI

````yaml POST /api/v2/order/refund/attempts
openapi: 3.1.0
info:
  title: Orchestration
  version: '1'
servers:
  - url: https://api.paytring.com
security:
  - sec0: []
paths:
  /api/v2/order/refund/attempts:
    post:
      summary: Refund Attempts
      description: >-
        This takes an order id and returns all associated refunds with that
        Order ID.
      operationId: refund-attempts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - key
                - order_id
                - hash
              properties:
                key:
                  type: string
                  description: Merchant API key
                order_id:
                  type: string
                  description: >-
                    Utilise the order ID provided in the response from
                    Paytring's create order API.
                hash:
                  type: string
                  description: Only required in V1 API . Pass NULL IN V2 API
                  default: 'null'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\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}"
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````