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

# Get Payment

> Retrieve a specific payment by ID

<Note>
  This endpoint retrieves detailed information about a specific payment including transaction details and processing status.
</Note>

## Authentication

This endpoint requires a valid API key with `payments:read` permissions.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the payment
</ParamField>

## Query Parameters

<ParamField query="expand" type="array">
  Expand related objects. Options: "customer", "order", "invoice", "refunds", "disputes"
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique payment identifier
</ResponseField>

<ResponseField name="object" type="string">
  Object type, always "payment"
</ResponseField>

<ResponseField name="amount" type="integer">
  Payment amount in cents
</ResponseField>

<ResponseField name="currency" type="string">
  ISO 4217 currency code
</ResponseField>

<ResponseField name="status" type="string">
  Payment status: "pending", "processing", "succeeded", "failed", "cancelled"
</ResponseField>

<ResponseField name="payment_method" type="object">
  Payment method details
</ResponseField>

<ResponseField name="processor_response" type="object">
  Response from payment processor
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://api.stateset.com/v1/payments/pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const payment = await stateset.payments.retrieve(
    'pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  );
  ```

  ```python Python theme={null}
  payment = stateset.payments.retrieve(
    'pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30'
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "payment",
    "amount": 15000,
    "currency": "USD",
    "status": "succeeded",
    "captured": true,
    "created_at": "2024-01-19T15:30:00Z",
    "updated_at": "2024-01-19T15:30:05Z",
    "payment_method": {
      "type": "card",
      "card": {
        "last4": "4242",
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2025,
        "fingerprint": "Xt5EWLLDS7FJjR1c",
        "country": "US",
        "funding": "credit"
      }
    },
    "order_id": "order_123456",
    "invoice_id": null,
    "customer_id": "cust_abc123",
    "customer": {
      "id": "cust_abc123",
      "email": "john.doe@example.com",
      "name": "John Doe"
    },
    "description": "Payment for Order #123456",
    "statement_descriptor": "STATESET ORDER",
    "receipt_url": "https://receipts.stateset.com/pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "receipt_number": "2234-5678",
    "billing_address": {
      "line1": "123 Main St",
      "city": "Los Angeles",
      "state": "CA",
      "postal_code": "90001",
      "country": "US"
    },
    "processor_response": {
      "approved": true,
      "authorization_code": "123456",
      "avs_result": "Y",
      "cvv_result": "M",
      "network_transaction_id": "123456789",
      "processor": "stripe",
      "risk_score": 32
    },
    "refunds": {
      "total_refunded": 0,
      "has_more": false,
      "data": []
    },
    "metadata": {
      "order_reference": "ORD-2024-001",
      "channel": "web"
    }
  }
  ```
</ResponseExample>
