# Payments API

Base URL: `https://interact-uat.hsbc.com/payment-service/`

### GET /api/v0/payment-files/statuses/{transactionId}

**Payment Status Timeline**

Returns the ordered status timeline for a single payment instruction for the authenticated customer. The file identifier must be supplied as the `fileUuid` query parameter.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `X-HSBC-Request-Correlation-Id` | header | string | Optional trace identifier forwarded to downstream services and recorded in logs. Include this value when raising support requests. A UUID is recommended; auto-generated when not supplied. |
| `transactionId` | path | string *(required)* | The identifier of the payment instruction whose status timeline should be returned. |
| `fileUuid` | query | string *(required)* | The identifier of the file the payment instruction belongs to. |


#### Responses

- **200** — The status timeline for the requested payment instruction
- **400** — fileUuid is missing or blank
- **401** — Missing or invalid NEO session
- **429** — Too many requests — rate limit exceeded
- **500** — Unexpected server error
- **503** — The payment file service is temporarily unavailable
- **403** — Forbidden — insufficient permissions for this resource


#### Examples

```bash
curl "https://interact-uat.hsbc.com/payment-service/api/v0/payment-files/statuses/{transactionId}" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-HSBC-Request-Correlation-Id: YOUR_X_HSBC_REQUEST_CORRELATION_ID"
```

```javascript
const response = await fetch("https://interact-uat.hsbc.com/payment-service/api/v0/payment-files/statuses/{transactionId}", {
  headers: {
      "Authorization": "Bearer YOUR_TOKEN",
      "X-HSBC-Request-Correlation-Id": "YOUR_X_HSBC_REQUEST_CORRELATION_ID"
  },
});

const data = await response.json();
```

```python
import requests

url = "https://interact-uat.hsbc.com/payment-service/api/v0/payment-files/statuses/{transactionId}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "X-HSBC-Request-Correlation-Id": "YOUR_X_HSBC_REQUEST_CORRELATION_ID",
}

response = requests.get(url, headers=headers)
print(response.json())
```

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://interact-uat.hsbc.com/payment-service/api/v0/payment-files/statuses/{transactionId}"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .header("X-HSBC-Request-Correlation-Id", "YOUR_X_HSBC_REQUEST_CORRELATION_ID")
    .GET()
    .build();

HttpResponse<String> response = client.send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

