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

# Configure live Stripe keys

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Stores live credentials, backs up current test credentials, and redeploys backend functions with the updated secrets. Key prefixes are checked, but success does not verify that the keys belong to the same Stripe account or can process payments. Automatic webhook migration is best effort. Requires write access to the app. Workspace viewers cannot call this operation.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/payments/stripe/configure-live-keys
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/payments/stripe/configure-live-keys:
    post:
      summary: Configure live Stripe keys
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Stores live credentials, backs up current test credentials, and
        redeploys backend functions with the updated secrets. Key prefixes are
        checked, but success does not verify that the keys belong to the same
        Stripe account or can process payments. Automatic webhook migration is
        best effort. Requires write access to the app. Workspace viewers cannot
        call this operation.
      operationId: >-
        configure_live_keys_api_apps__app_id__payments_stripe_configure_live_keys_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the Base44 app.
            title: App Id
          description: ID of the Base44 app.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigureLiveKeysRequest'
      responses:
        '200':
          description: The operation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StripeLiveKeysResult'
        '400':
          description: A key has an invalid prefix.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            The credential is not permitted or you don't have the required app
            access. A missing app also fails the app access check.
        '404':
          description: No Stripe sandbox exists or the app is outside the credential grant.
        '409':
          description: The workspace requires an unlocked SSO session.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConfigureLiveKeysRequest:
      properties:
        publishable_key:
          type: string
          title: Publishable Key
          description: Live Stripe publishable key beginning with `pk_live_`.
          example: pk_live_example
        secret_key:
          type: string
          title: Secret Key
          description: >-
            Live Stripe secret or restricted key beginning with `sk_live_` or
            `rk_live_`.
          example: sk_live_example
        webhook_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Secret
          description: >-
            Live webhook signing secret beginning with `whsec_`. Defaults to
            `null`, which attempts automatic migration when an existing webhook
            secret is present.
          example: whsec_example
      type: object
      required:
        - publishable_key
        - secret_key
      title: ConfigureLiveKeysRequest
      description: Request to configure live mode API keys.
    StripeLiveKeysResult:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether live keys were stored and the app was switched to live mode.
          example: true
        message:
          type: string
          title: Message
          description: Human-readable configuration result.
          example: >-
            Live mode API keys configured successfully. Test keys have been
            backed up.
        live_keys_configured:
          type: boolean
          title: Live Keys Configured
          description: >-
            Whether the stored completion flag was confirmed. It can be false
            even after keys were stored if finalization failed.
          example: true
        webhook_migrated:
          type: boolean
          title: Webhook Migrated
          description: >-
            Whether this call automatically migrated the webhook. It is false
            when a webhook secret was supplied directly.
          example: false
      type: object
      required:
        - success
        - message
        - live_keys_configured
        - webhook_migrated
      title: StripeLiveKeysResult
      description: The result of storing live Stripe 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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````