## Get a payment request

**get** `/v3/payment_requests/{paymentRequestId}`

Returns a payment request's status and details.

### Path Parameters

- `paymentRequestId: string`

### Returns

- `PaymentRequest object { id, amount, checkout_url, 18 more }`

  - `id: string`

    Unique identifier of the payment request.

  - `amount: number`

    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: string`

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

  - `created_at: string`

  - `currency: string`

  - `mode: "payment" or "subscription"`

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

    - `"payment"`

    - `"subscription"`

  - `object: string`

  - `status: "requested" or "succeeded" or "canceled" or "expired"`

    Lifecycle status of the payment request.

    - `"requested"`

    - `"succeeded"`

    - `"canceled"`

    - `"expired"`

  - `description: optional string`

  - `expires_at: optional string`

    When an unpaid request auto-expires.

  - `interval: optional "day" or "week" or "month" or "year"`

    Subscription mode — how often the subscription renews.

    - `"day"`

    - `"week"`

    - `"month"`

    - `"year"`

  - `interval_count: optional number`

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

  - `metadata: optional map[string]`

  - `natural: optional object { payment_request_id, transaction_id }`

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

    - `payment_request_id: optional string`

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

    - `transaction_id: optional string`

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

  - `paid_at: optional string`

    When the request was paid. Absent until it succeeds.

  - `price_id: optional string`

    Subscription mode — the recurring price this request subscribes to.

  - `quantity: optional number`

    Subscription mode — units of the price subscribed to.

  - `rail: optional "stripe" or "natural"`

    The rail this request settled on.

    - `"stripe"`

    - `"natural"`

  - `stripe: optional object { customer_id, payment_intent_id, subscription_id }`

    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 string`

      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 string`

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

    - `subscription_id: optional string`

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

  - `trial_end: optional string`

    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 string`

### Example

```http
curl https://api.linqapp.com/api/partner/v3/payment_requests/$PAYMENT_REQUEST_ID \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
```

#### Response

```json
{
  "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"
}
```
