# Get payment by ID

**Retrieve a specific payment by its unique identifier**
This endpoint provides detailed payment information including:
- Complete payment transaction details
- PCI-compliant payment method information (masked)
- Payment status and confirmation data
- Associated invoice and client relationships
- Payment processor integration details
- Audit trail and security compliance data

**Security & Compliance:**
- PCI DSS compliant data handling
- Secure payment processor ID tracking
- Payment confirmation date logging
- Audit trail for payment processing

**Payment Details Include:**
- Payment amount and currency
- Payment method (masked for security)
- Payment status and confirmation
- Associated invoice references
- Client relationship data
- Payment processor details

**Business Applications:**
- Payment verification and reconciliation
- Client payment history lookup
- Payment dispute resolution
- Audit and compliance reporting
- Payment method analysis

**Real Example:**

```bash
curl --location 'https://{{host}}/v1/payment/12345' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json'
```
**Response Example:**

```json
{
  "id": 12345,
  "amount": 1500.00,
  "currency": "USD",
  "paymentMethod": "CREDIT_CARD",
  "cardLastFour": "1234",
  "cardType": "VISA",
  "status": "CONFIRMED",
  "confirmationDate": "2024-01-15T10:30:00Z",
  "processorReference": "stripe_pi_1234567890",
  "clientId": 789,
  "clientName": "Acme Corporation",
  "invoiceId": 456,
  "invoiceNumber": "INV-2024-001",
  "createdAt": "2024-01-15T10:25:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}
```

Endpoint: GET /gql/v1/payment/{id}
Version: 1.0.0
Security: BearerAuth

## Path parameters:

  - `id` (integer, required)
    Unique identifier of the payment

## Response 200 fields (application/json):

  - `id` (integer)
    Unique payment identifier
    Example: 12345

  - `amount` (number)
    Payment amount
    Example: 1500

  - `currency` (string)
    Payment currency code
    Example: USD

  - `paymentMethod` (string)
    Method used for payment
    Enum: "CREDIT_CARD", "DEBIT_CARD", "ACH", "BANK_TRANSFER", "CHECK", "WIRE", "PAYPAL", "APPLE_PAY", "GOOGLE_PAY"

  - `cardLastFour` (string)
    Last four digits of payment card (PCI compliant)
    Example: 1234

  - `cardType` (string)
    Type of payment card
    Example: VISA

  - `status` (string)
    Current payment status
    Enum: "PENDING", "CONFIRMED", "FAILED", "CANCELLED", "REFUNDED"

  - `confirmationDate` (string)
    Date and time when payment was confirmed
    Example: 2024-01-15T10:30:00Z

  - `processorReference` (string)
    Payment processor reference ID
    Example: stripe_pi_1234567890

  - `clientId` (integer)
    Associated client identifier
    Example: 789

  - `clientName` (string)
    Name of the client who made the payment
    Example: Acme Corporation

  - `invoiceId` (integer)
    Associated invoice identifier
    Example: 456

  - `invoiceNumber` (string)
    Invoice number for the payment
    Example: INV-2024-001

  - `createdAt` (string)
    Payment creation timestamp
    Example: 2024-01-15T10:25:00Z

  - `updatedAt` (string)
    Last update timestamp
    Example: 2024-01-15T10:30:00Z

## Response 404 fields (application/json):

  - `error` (string)
    Example: Payment not found

  - `message` (string)
    Example: Payment with ID 12345 does not exist

