## List payment requests

`payment_requests.list(PaymentRequestListParams**kwargs)  -> PaymentRequestListResponse`

**get** `/v3/payment_requests`

Lists your payment requests, newest first, for reconciliation. Paginate
with `limit` + `offset`; `has_more` indicates whether another page exists.

### Parameters

- `limit: Optional[int]`

  Max results to return (default 20, max 100).

- `offset: Optional[int]`

  Number of results to skip.

- `status: Optional[Literal["requested", "authorized", "succeeded", 3 more]]`

  Filter by lifecycle status.

  - `"requested"`

  - `"authorized"`

  - `"succeeded"`

  - `"canceled"`

  - `"expired"`

  - `"declined"`

### Returns

- `class PaymentRequestListResponse: …`

  - `data: List[PaymentRequest]`

    - `id: str`

      Unique identifier of the payment request.

    - `amount: int`

      Amount in the currency's minor units. In `subscription` mode this is
      the recurring amount (price × quantity) the recipient pays per
      interval, starting at checkout.

    - `checkout_url: str`

      URL the recipient opens to pay:
      `https://zero.linqapp.com/pay/{slug}?session=...`, where `{slug}`
      is your partner checkout slug.

    - `created_at: datetime`

    - `currency: str`

    - `mode: Literal["payment", "subscription"]`

      Whether this request collects a one-time charge or starts a subscription.

      - `"payment"`

      - `"subscription"`

    - `object: str`

    - `status: Literal["requested", "succeeded", "canceled", "expired"]`

      Lifecycle status of the payment request.

      - `"requested"`

      - `"succeeded"`

      - `"canceled"`

      - `"expired"`

    - `description: Optional[str]`

    - `expires_at: Optional[datetime]`

      When an unpaid request auto-expires.

    - `interval: Optional[Literal["day", "week", "month", "year"]]`

      Subscription mode — how often the subscription renews.

      - `"day"`

      - `"week"`

      - `"month"`

      - `"year"`

    - `interval_count: Optional[int]`

      Subscription mode — intervals per renewal (e.g. `3` + `month` = quarterly).

    - `metadata: Optional[Dict[str, str]]`

    - `natural: Optional[Natural]`

      Natural-rail join keys, present when `rail: natural`.

      - `payment_request_id: Optional[str]`

        The Natural payment request (`prq_...`).

      - `transaction_id: Optional[str]`

        The settled transaction (`txn_...`).

    - `paid_at: Optional[datetime]`

      When the request was paid. Absent until it succeeds.

    - `price_id: Optional[str]`

      Subscription mode — the recurring price this request subscribes to.

    - `quantity: Optional[int]`

      Subscription mode — units of the price subscribed to.

    - `rail: Optional[Literal["stripe", "natural"]]`

      The rail this request settled on.

      - `"stripe"`

      - `"natural"`

    - `stripe: Optional[Stripe]`

      Ids of the Stripe objects created **on your connected account** —
      your join keys into your own Stripe Dashboard, webhooks, and API.
      After a subscription's first payment succeeds, its ongoing lifecycle
      (renewals, plan changes, cancellation) is managed in your Stripe
      account using `subscription_id`.

      - `customer_id: Optional[str]`

        The Customer this request is attached to (`cus_...`). Always set
        in subscription mode (created for you unless you passed
        `customer_id`); set in payment mode only when you passed one.

      - `payment_intent_id: Optional[str]`

        The PaymentIntent collected at checkout (`pi_...`).

      - `subscription_id: Optional[str]`

        Subscription mode — the Subscription (`sub_...`).

    - `trial_end: Optional[datetime]`

      Subscription mode — when the free trial ends and the first charge
      happens. Present only on trial requests; `paid_at`/`succeeded` mean
      the payment method was collected (no funds move until this time).

    - `updated_at: Optional[datetime]`

  - `has_more: bool`

    Whether more results exist beyond this page.

  - `object: Literal["list"]`

    - `"list"`

### Example

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
payment_requests = client.payment_requests.list()
print(payment_requests.data)
```

#### Response

```json
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "amount": 497,
      "checkout_url": "https://zero.linqapp.com/pay/tomo?session=tok_abc123",
      "created_at": "2019-12-27T18:11:19.117Z",
      "currency": "usd",
      "mode": "payment",
      "object": "payment_request",
      "status": "requested",
      "description": "description",
      "expires_at": "2019-12-27T18:11:19.117Z",
      "interval": "day",
      "interval_count": 0,
      "metadata": {
        "foo": "string"
      },
      "natural": {
        "payment_request_id": "payment_request_id",
        "transaction_id": "transaction_id"
      },
      "paid_at": "2019-12-27T18:11:19.117Z",
      "price_id": "price_id",
      "quantity": 0,
      "rail": "stripe",
      "stripe": {
        "customer_id": "cus_QAbCdEfGhIjKlMn",
        "payment_intent_id": "pi_3QAbCdEfGhIjKlMn",
        "subscription_id": "sub_1QAbCdEfGhIjKlMn"
      },
      "trial_end": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "has_more": true,
  "object": "list"
}
```
