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

# List Project Payments

> List all Stripe payment transactions for a specific project

List all Stripe payment transactions for a specific project. This endpoint is for developers to view all payments made by their end users.

## Authentication

<Note>
  This endpoint requires developer authentication via OAuth2 Bearer Token. You must own the project.
</Note>

## Path Parameters

<ParamField path="project_id" type="string (UUID)" required>
  The unique identifier of the project
</ParamField>

## Query Parameters

<ParamField query="test_mode" type="boolean" default="true">
  Filter by test mode. Set to `false` for live payments only.
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number for pagination (minimum: 1)
</ParamField>

<ParamField query="page_size" type="integer" default="50">
  Number of items per page (1-100)
</ParamField>

## Response

<ResponseField name="payments" type="array">
  Array of payment objects

  <Expandable title="Payment">
    <ResponseField name="id" type="string (UUID)">
      Internal payment ID
    </ResponseField>

    <ResponseField name="project_id" type="string (UUID)">
      Project ID
    </ResponseField>

    <ResponseField name="subscription_id" type="string (UUID)">
      Related subscription ID (if subscription payment)
    </ResponseField>

    <ResponseField name="user_id" type="string (UUID)">
      End user ID (if linked)
    </ResponseField>

    <ResponseField name="is_test_mode" type="boolean">
      Whether this is a test payment
    </ResponseField>

    <ResponseField name="payment_intent_id" type="string">
      Stripe PaymentIntent ID (e.g., `pi_1ABC...`)
    </ResponseField>

    <ResponseField name="status" type="string">
      Payment status
    </ResponseField>

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

    <ResponseField name="currency" type="string">
      Currency code (e.g., `usd`)
    </ResponseField>

    <ResponseField name="description" type="string">
      Payment description
    </ResponseField>

    <ResponseField name="refunded_amount_cents" type="integer" default="0">
      Amount refunded in cents
    </ResponseField>

    <ResponseField name="created_at" type="string (datetime)">
      When the payment was created
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of payments
</ResponseField>

<ResponseField name="page" type="integer">
  Current page number
</ResponseField>

<ResponseField name="page_size" type="integer">
  Items per page
</ResponseField>

## Example Request

```bash theme={null}
curl "https://api.devkit4ai.com/api/v1/payments/stripe/projects/550e8400-e29b-41d4-a716-446655440000/payments?test_mode=true&page=1" \
  -H "Authorization: Bearer {developer_jwt}"
```

## Example Response

```json theme={null}
{
  "payments": [
    {
      "id": "aa0e8400-e29b-41d4-a716-446655440000",
      "project_id": "550e8400-e29b-41d4-a716-446655440000",
      "subscription_id": "880e8400-e29b-41d4-a716-446655440000",
      "user_id": "990e8400-e29b-41d4-a716-446655440000",
      "is_test_mode": true,
      "payment_intent_id": "pi_1ABC123def456",
      "status": "succeeded",
      "amount_cents": 1999,
      "currency": "usd",
      "description": "Subscription to Pro Plan",
      "refunded_amount_cents": 0,
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 50
}
```

## Payment Statuses

| Status               | Description                    |
| -------------------- | ------------------------------ |
| `succeeded`          | Payment completed successfully |
| `pending`            | Payment is being processed     |
| `failed`             | Payment attempt failed         |
| `refunded`           | Payment was fully refunded     |
| `partially_refunded` | Payment was partially refunded |
| `canceled`           | Payment was canceled           |

## Amount Formatting

Amounts are stored in cents. To display as currency:

```javascript theme={null}
const amount = payment.amount_cents / 100;
const formatted = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: payment.currency.toUpperCase()
}).format(amount);

// $19.99
```

## Refund Tracking

Check if a payment has been refunded:

```mermaid theme={null}
flowchart TD
    A[Payment] --> B{refunded_amount_cents?}
    B -->|0| C[No Refund]
    B -->|amount_cents| D[Full Refund]
    B -->|Partial| E[Partial Refund]
```

```javascript theme={null}
if (payment.refunded_amount_cents === 0) {
  // No refund
} else if (payment.refunded_amount_cents === payment.amount_cents) {
  // Full refund
} else {
  // Partial refund
}
```

## Related Pages

<CardGroup cols={2}>
  <Card title="List Project Subscriptions" icon="list" href="/cloud-api/payments/stripe/list-project-subscriptions">
    View project subscriptions
  </Card>

  <Card title="List All Transactions" icon="credit-card" href="/cloud-api/payments/list-transactions">
    View payments across projects
  </Card>

  <Card title="Get My Payments" icon="user" href="/cloud-api/payments/stripe/get-my-payments">
    End user payment history
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /api/v1/payments/stripe/projects/{project_id}/payments
openapi: 3.1.0
info:
  title: Dev Kit for AI API
  description: 'API for Dev Kit for AI: Developer Toolkit for AI-Powered Web Applications'
  version: 1.6.1
servers:
  - url: https://api.devkit4ai.com
    description: Dev Kit for AI Production Server
  - url: https://api.vibecoding.ad
    description: Vibe Coding Production Server
security: []
paths:
  /api/v1/payments/stripe/projects/{project_id}/payments:
    get:
      tags:
        - Stripe Configuration
      summary: List Project Payments
      description: >-
        List all Stripe payment transactions for a specific project. Developer
        access required.
      operationId: list_payments_api_v1_payments_stripe_projects__project_id__payments_get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: test_mode
          in: query
          required: false
          schema:
            type: boolean
            description: Filter by test mode
            default: true
            title: Test Mode
          description: Filter by test mode
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StripePaymentListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    StripePaymentListResponse:
      properties:
        payments:
          items:
            $ref: '#/components/schemas/StripePaymentResponse'
          type: array
          title: Payments
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
      type: object
      required:
        - payments
        - total
        - page
        - page_size
      title: StripePaymentListResponse
      description: Paginated list of Stripe payments.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StripePaymentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        subscription_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Subscription Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        is_test_mode:
          type: boolean
          title: Is Test Mode
        payment_intent_id:
          type: string
          title: Payment Intent Id
        status:
          type: string
          title: Status
        amount_cents:
          type: integer
          title: Amount Cents
        currency:
          type: string
          title: Currency
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        refunded_amount_cents:
          type: integer
          title: Refunded Amount Cents
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - project_id
        - is_test_mode
        - payment_intent_id
        - status
        - amount_cents
        - currency
        - created_at
      title: StripePaymentResponse
      description: Stripe payment details.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/login

````