> ## 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.

# Update Stripe Configuration

> Create or update Stripe payment configuration for a project. Supports both test and live credentials.



## OpenAPI

````yaml cloud-api/openapi.json put /api/v1/payments/stripe/projects/{project_id}/config
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}/config:
    put:
      tags:
        - Stripe Configuration
      summary: Update Stripe Configuration
      description: >-
        Create or update Stripe payment configuration for a project. Supports
        both test and live credentials.
      operationId: >-
        update_stripe_config_api_v1_payments_stripe_projects__project_id__config_put
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StripeConfigRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StripeConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    StripeConfigRequest:
      properties:
        test_secret_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Secret Key
        test_publishable_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Publishable Key
        test_webhook_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Webhook Secret
        live_secret_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Secret Key
        live_publishable_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Publishable Key
        live_webhook_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Webhook Secret
      type: object
      title: StripeConfigRequest
      description: Request to create/update Stripe configuration.
    StripeConfigResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        is_active:
          type: boolean
          title: Is Active
        has_test_credentials:
          type: boolean
          title: Has Test Credentials
        has_live_credentials:
          type: boolean
          title: Has Live Credentials
        test_secret_key_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Secret Key Masked
        test_publishable_key_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Publishable Key Masked
        test_webhook_secret_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Webhook Secret Masked
        live_secret_key_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Secret Key Masked
        live_publishable_key_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Publishable Key Masked
        live_webhook_secret_masked:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Webhook Secret Masked
        test_configured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Test Configured At
        live_configured_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Live Configured At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - is_active
        - has_test_credentials
        - has_live_credentials
        - created_at
      title: StripeConfigResponse
      description: Stripe configuration response with masked credentials.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````