# Reconcile a test refund

Reconcile one owned refund through an authenticated Mollie status read

`GET https://tokenlane.de/api/credits/topups/{id}/refunds/{refundId}`

## Authorizations

[
  [
    {
      "name": "Authorization",
      "description": "Organization management key: `Authorization: Bearer sk-tl-v1-…`. Existing `sk-eu-` keys remain valid. Required scopes are listed in `x-scopes`; gateway inference keys cannot authorize management operations.",
      "type": "http bearer",
      "location": "",
      "scopes": []
    }
  ]
]

## curl

```curl
curl --request GET \
  --url 'https://tokenlane.de/api/credits/topups/top_01k7tm3w8vfz6b2r4m9q5xyz7c/refunds/ref_01k7tm3w8vfz6b2r4m9q5xyz7c' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## node

```node
const response = await fetch("https://tokenlane.de/api/credits/topups/top_01k7tm3w8vfz6b2r4m9q5xyz7c/refunds/ref_01k7tm3w8vfz6b2r4m9q5xyz7c", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
  },
});
console.log(await response.text());
```

## python

```python
import os
import urllib.request

request = urllib.request.Request(
    "https://tokenlane.de/api/credits/topups/top_01k7tm3w8vfz6b2r4m9q5xyz7c/refunds/ref_01k7tm3w8vfz6b2r4m9q5xyz7c",
    method="GET",
    headers={
        "Authorization": "Bearer " + os.environ["TOKENLANE_API_KEY"],
    },
)

with urllib.request.urlopen(request) as response:
    print(response.read().decode("utf-8"))
```

## vercel

```vercel
// This operation uses HTTP directly.
const response = await fetch("https://tokenlane.de/api/credits/topups/top_01k7tm3w8vfz6b2r4m9q5xyz7c/refunds/ref_01k7tm3w8vfz6b2r4m9q5xyz7c", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.TOKENLANE_API_KEY,
  },
});
console.log(await response.text());
```

## path: id (required)

Top-up ID

### s21: string

Top-up ID

{}

```json
"top_01k7tm3w8vfz6b2r4m9q5xyz7c"
```

## path: refundId (required)

Refund ID

### s33: string

Refund ID

{}

```json
"ref_01k7tm3w8vfz6b2r4m9q5xyz7c"
```

## Response 200: application/json

Request successful

```json
{
  "id": "YOUR_ID",
  "topupId": "YOUR_TOPUPID",
  "amount": "YOUR_AMOUNT",
  "currency": "EUR",
  "testMode": true,
  "status": "creating",
  "failureReason": null,
  "createdAt": "YOUR_CREATEDAT"
}
```

### s34: object

{}

- id (required): s35

### s35: string

{}

- topupId (required): s35

- amount (required): s35

- currency (required): s81

### s81: string

"EUR"

{}

- testMode (required): s83

### s83: boolean

true

{}

- status (required): s97

### s97: string

"creating", "queued", "pending", "processing", "refunded", "failed", "canceled"

{}

- failureReason (required): s98

### s98: string | null

Why the refund is not settled yet or failed, e.g. creation_expired (Mollie never received it; the reserved credit was released) or upstream_unavailable (retrying automatically)

{}

- createdAt (required): s35

## Response 400: application/json

Bad request (validation error, invalid input)

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

### s11: object

{}

- requestId (optional): s56

### s56: string

Server correlation ID for an internal error. Also returned in X-Request-Id.

uuid

{}

- status (required): s57

### s57: number

HTTP status code

{}

```json
400
```

- code (required): s58

### s58: string

Error code

{}

```json
"VALIDATION_ERROR"
```

- message (required): s59

### s59: string

Error message

{}

```json
"Request validation failed"
```

- remedy_hint (optional): s60

### s60: string

A safe, actionable remedy from the error catalog.

{}

- details (optional): s61

### s61: array

Detailed validation errors

{}

### s154: object

{}

- path (required): s179

### s179: string

Field path

{}

```json
"title"
```

- message (required): s180

### s180: string

Field error message

{}

```json
"Required"
```

## Response 401: application/json

Authentication required (missing or invalid credentials)

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 403: application/json

Insufficient scope (authenticated but not authorized) | This session can only access security setup until the required factor is verified

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 404: application/json

Resource not found

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 409: application/json

Conflict with the current state (e.g. a name that already exists)

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 429: application/json

Retry after the indicated delay

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 500: application/json

Internal server error

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```

## Response 503: application/json

Configured upstream timed out, failed or returned an invalid response

```json
{
  "status": 400,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
```
