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

# Payment requests

> View payment history associated with Direct Debit mandates.

Use the payment requests endpoints to view the payment history associated with a Direct Debit mandate.

## List payment requests

<Note>
  **GET** `/v2/budgets/{budgetId}/direct-debits/{directDebitId}/payment-requests`
</Note>

Use this endpoint to retrieve a list of all payment requests for a specific Direct Debit.

### Path parameters

<ParamField path="budgetId" type="string" required>
  The ID of the budget.
</ParamField>

<ParamField path="directDebitId" type="string" required>
  The ID of the Direct Debit.
</ParamField>

### Query parameters

<ParamField query="accountId" type="string" required>
  The ID of the account.
</ParamField>

<ParamField query="limit" type="number">
  The maximum number of results to return. Default: `100`.
</ParamField>

<ParamField query="offset" type="number">
  The number of results to skip. Default: `0`.
</ParamField>

### Sample request

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/budgets/4db84122-9c4e-4607-98f7-84b2bbe02daf/direct-debits/a1b2c3d4-e5f6-7890-abcd-ef1234567890/payment-requests?accountId=F12345' \
    -H 'Authorization: ApiKey {apiKey}'
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/budgets/{budgetId}/direct-debits/{directDebitId}/payment-requests?accountId={accountId}&limit={limit}&offset={offset}' \
    -H 'Authorization: ApiKey {apiKey}'
  ```
</CodeGroup>

### Sample response

```json theme={null}
{
  "count": 3,
  "limit": 100,
  "offset": 0,
  "rows": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "budgetId": "4db84122-9c4e-4607-98f7-84b2bbe02daf",
      "reference": "JAN2024PAYMENT",
      "status": "PAID",
      "amount": "15.99",
      "currency": "GBP",
      "originator": {
        "id": "123456",
        "accountName": "Netflix International",
        "bankIdentifier": "608371",
        "accountIdentifier": "12345678"
      },
      "createdAt": "2024-01-01T00:00:00Z",
      "processedAt": "2024-01-03T00:00:00Z"
    },
    {
      "id": "d4e5f6a7-b8c9-0123-def0-234567890123",
      "budgetId": "4db84122-9c4e-4607-98f7-84b2bbe02daf",
      "reference": "FEB2024PAYMENT",
      "status": "PENDING",
      "amount": "15.99",
      "currency": "GBP",
      "originator": {
        "id": "123456",
        "accountName": "Netflix International",
        "bankIdentifier": "608371",
        "accountIdentifier": "12345678"
      },
      "createdAt": "2024-02-01T00:00:00Z",
      "processedAt": null
    }
  ]
}
```

## Response fields

| Field                          | Type   | Description                                                       |
| ------------------------------ | ------ | ----------------------------------------------------------------- |
| `id`                           | string | The unique identifier for the payment request                     |
| `budgetId`                     | string | The ID of the budget being debited                                |
| `reference`                    | string | The payment reference set by the originator                       |
| `status`                       | string | The status of the payment request: `PENDING`, `PAID`, or `FAILED` |
| `amount`                       | string | The payment amount                                                |
| `currency`                     | string | The currency code (currently only `GBP` is supported)             |
| `originator.id`                | string | The originator's identification number                            |
| `originator.accountName`       | string | The originator's account name                                     |
| `originator.bankIdentifier`    | string | The originator's sort code                                        |
| `originator.accountIdentifier` | string | The originator's account number                                   |
| `createdAt`                    | string | The date and time when the payment request was created            |
| `processedAt`                  | string | The date and time when the payment was processed                  |
