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

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

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.

To make a test purchase, pay with card number `4111 1111 1111 1111` for an approved payment, or `4000 0000 0000 0002` for a declined one. The checkout rejects any other card number.

Sending the mode the app is already in changes nothing and still returns it.



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


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


        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.


        To make a test purchase, pay with card number `4111 1111 1111 1111` for
        an approved payment, or `4000 0000 0000 0002` for a declined one. The
        checkout rejects any other card number.


        Sending the mode the app is already in changes nothing and still returns
        it.
      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 lacks app write access, or the app's workspace
            restricts payment management (`app_payment_management_not_allowed`).
        '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: >-
            The base limit is 30 requests per hour, scoped to your account
            rather than the workspace. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
      security:
        - PersonalAccessTokenAuth:
            - full_access
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>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.