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

# Check Match Pro Connection

> Tests whether the stored Match Pro credentials are valid and reachable. Use this endpoint after saving credentials to confirm the setup is working before running match checks.

**Status values**:
- `CONNECTED` — credentials are valid and the connection is active
- `NOT_CONNECTED` — no credentials saved, or `isActive` is `false`
- `EXPIRED` — the key file certificate has passed its expiry date
- `ERROR` — credentials exist but the connection attempt failed

The `customerId` path parameter must belong to the caller's tenant. Cross-tenant access is rejected with `403`.



## OpenAPI

````yaml openapi/integration-service/match-pro.json get /match-pro/{customerId}/check-connection-status
openapi: 3.1.0
info:
  title: Integration Service
  description: >-
    Match Pro endpoints for running payment network match checks against
    businesses.
  version: '1.0'
servers:
  - url: https://api.joinworth.com/integration/api/v1
    variables: {}
security:
  - bearer: []
paths:
  /match-pro/{customerId}/check-connection-status:
    get:
      tags:
        - Match Pro
      summary: Check Match Pro Connection
      description: >-
        Tests whether the stored Match Pro credentials are valid and reachable.
        Use this endpoint after saving credentials to confirm the setup is
        working before running match checks.


        **Status values**:

        - `CONNECTED` — credentials are valid and the connection is active

        - `NOT_CONNECTED` — no credentials saved, or `isActive` is `false`

        - `EXPIRED` — the key file certificate has passed its expiry date

        - `ERROR` — credentials exist but the connection attempt failed


        The `customerId` path parameter must belong to the caller's tenant.
        Cross-tenant access is rejected with `403`.
      operationId: CheckMatchProConnection
      parameters:
        - name: customerId
          in: path
          description: >-
            UUID of the customer tenant. Must belong to the authenticated
            caller's tenant.
          required: true
          schema:
            type: string
            examples:
              - a1b2c3d4-e5f6-7890-abcd-ef1234567890
        - name: acquirerId
          in: query
          description: >-
            Optional. Test connectivity for a specific acquirer ID instead of
            the default stored value.
          required: false
          schema:
            type: string
            examples:
              - '123456'
      responses:
        '200':
          description: Connection status retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionStatusResponse'
              examples:
                connected:
                  summary: Credentials valid
                  value:
                    status: success
                    data:
                      statusConnection:
                        status: CONNECTED
                        message: Connection established successfully
                        details:
                          isActive: true
                          expiresAt: '2027-01-01T00:00:00.000Z'
                          certificateExpiry: '2027-01-01T00:00:00.000Z'
                not_connected:
                  summary: Credentials inactive or not saved
                  value:
                    status: success
                    data:
                      statusConnection:
                        status: NOT_CONNECTED
                        message: No active credentials found for this customer.
                        details:
                          isActive: false
                          expiresAt: null
                          certificateExpiry: null
        '401':
          description: Missing or invalid Bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Cross-tenant access denied. The `customerId` does not belong to the
            caller's tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer: []
components:
  schemas:
    ConnectionStatusResponse:
      title: ConnectionStatusResponse
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        data:
          type: object
          properties:
            statusConnection:
              $ref: '#/components/schemas/ConnectionStatusResult'
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        status:
          type: string
          enum:
            - error
            - fail
        message:
          type: string
          description: Description of the error.
    ConnectionStatusResult:
      title: ConnectionStatusResult
      type: object
      properties:
        status:
          type: string
          enum:
            - CONNECTED
            - NOT_CONNECTED
            - EXPIRED
            - ERROR
          description: >-
            Connection status. `CONNECTED` = credentials valid and active.
            `NOT_CONNECTED` = no credentials saved or `isActive` is false.
            `EXPIRED` = certificate past expiry. `ERROR` = connection attempt
            failed.
        message:
          type: string
          description: Human-readable description of the connection status.
        details:
          type: object
          properties:
            isActive:
              type: boolean
              description: Whether the stored credentials are marked active.
            expiresAt:
              type:
                - string
                - 'null'
              format: date-time
              description: ISO 8601 timestamp of credential expiry, if applicable.
            certificateExpiry:
              type:
                - string
                - 'null'
              format: date-time
              description: ISO 8601 timestamp of the key file certificate expiry.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````