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

# Switch Wix Payments test mode

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

Switches the app's Wix Payments checkout between test mode and live.

While test mode is on, the checkout takes test payments and real cards aren't charged. Verify a test purchase, then send `test_mode: false` to start taking real payments. The mode is a Wix Payments setting, so the switch applies to the published app without a deploy.

<Warning>Turning test mode on stops real customers from paying until the app is switched back to live.</Warning>

The response carries the mode Wix reports after the call. Sending the mode the app is already in changes nothing and returns it. No other published endpoint returns the current mode.

Requires write access to the app and a connected Wix Payments account.

This is limited to 30 requests an hour per caller. Some workspaces have a different limit.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json put /api/apps/{app_id}/payments/wix/test-mode
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/payments/wix/test-mode:
    put:
      summary: Switch Wix Payments test mode
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Switches the app's Wix Payments checkout between test mode and live.


        While test mode is on, the checkout takes test payments and real cards
        aren't charged. Verify a test purchase, then send `test_mode: false` to
        start taking real payments. The mode is a Wix Payments setting, so the
        switch applies to the published app without a deploy.


        <Warning>Turning test mode on stops real customers from paying until the
        app is switched back to live.</Warning>


        The response carries the mode Wix reports after the call. Sending the
        mode the app is already in changes nothing and returns it. No other
        published endpoint returns the current mode.


        Requires write access to the app and a connected Wix Payments account.


        This is limited to 30 requests an hour per caller. Some workspaces have
        a different limit.
      operationId: update_test_mode_api_apps__app_id__payments_wix_test_mode_put
      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/UpdateTestModeRequest'
      responses:
        '200':
          description: The app's Wix Payments mode after the call.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestModeResponse'
        '400':
          description: >-
            Wix Payments isn't connected for the app, or its credentials are
            missing. Reconnect Wix Payments.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            The credential is not permitted or you don't have write access to
            the app. A missing app also fails the app access check.
        '404':
          description: >-
            The app isn't found, or it's outside the credential's granted
            workspace.
        '409':
          description: The workspace requires an unlocked SSO session.
        '422':
          description: >-
            `test_mode` is missing or isn't a boolean, or the body has other
            fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit reached. Retry later.
components:
  schemas:
    UpdateTestModeRequest:
      properties:
        test_mode:
          type: boolean
          title: Test Mode
          description: >-
            Whether to switch the checkout to test mode (`true`) or live
            (`false`).
          example: false
      additionalProperties: false
      type: object
      required:
        - test_mode
      title: UpdateTestModeRequest
    TestModeResponse:
      properties:
        test_mode:
          type: boolean
          title: Test Mode
          description: Whether the checkout is in test mode (`true`) or live (`false`).
          example: false
      type: object
      required:
        - test_mode
      title: TestModeResponse
      description: The app's Wix Payments mode.
    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:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````