## Get a payment

`client.payments.retrieve(stringpaymentID, RequestOptionsoptions?): Payment`

**get** `/v3/payments/{paymentId}`

Get a payment

### Parameters

- `paymentID: string`

### Returns

- `Payment`

  - `id?: string`

  - `amount_cents?: number`

  - `approval_url?: string`

    Present on `awaiting_user_action` once a card is on file and the
    charge needs the customer's passkey. Re-send the create request with
    the same `Idempotency-Key` to collect the payment after they approve.

  - `attach_url?: string`

    Present on `awaiting_user_action` when the customer has no card on
    file yet. A hosted page — open it for them; it stays valid for about
    48 hours. Not returned on `needs_connection`: connect the handle first.

  - `currency?: string`

  - `description?: string`

  - `handle?: string`

  - `merchant?: Merchant`

    The merchant the card is minted against, echoed from the request.

    - `name?: string`

    - `url?: string`

  - `metadata?: Record<string, string>`

    Your own key/values, echoed back from the request.

  - `status?: "needs_connection" | "connecting" | "awaiting_user_action" | 6 more`

    - `"needs_connection"`

    - `"connecting"`

    - `"awaiting_user_action"`

    - `"ready"`

    - `"authorized"`

    - `"succeeded"`

    - `"declined"`

    - `"canceled"`

    - `"expired"`

### Example

```typescript
import LinqAPIV3 from '@linqapp/sdk';

const client = new LinqAPIV3({
  apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});

const payment = await client.payments.retrieve('paymentId');

console.log(payment.id);
```

#### Response

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "amount_cents": 2500,
  "approval_url": "approval_url",
  "attach_url": "https://app.agentcard.sh/attach/eyJhbGciOi...",
  "currency": "usd",
  "description": "description",
  "handle": "+14155550123",
  "merchant": {
    "name": "DoorDash",
    "url": "doordash.com"
  },
  "metadata": {
    "foo": "string"
  },
  "status": "ready"
}
```
