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

# Connect WooCommerce

> Registers or reconnects a WooCommerce store. Returns a dedicated API key and
webhook secret. Uses legacy error shape on some failures.




## OpenAPI

````yaml /openapi.yaml post /v1/integration/woocommerce/connect
openapi: 3.1.0
info:
  title: Meum Public Merchant API
  version: 1.0.0
  description: >
    Public merchant API for programmatic payment management: invoices,
    transactions,

    payment links, webhooks, and WooCommerce integration.


    Authenticate with a store-scoped API key (`sk_live_*`) via Bearer token.

    Base URL: https://api.meum.io
  contact:
    name: Meum Support
    email: support@meum.io
    url: https://meum.io
servers:
  - url: https://api.meum.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Service health checks
  - name: Invoices
    description: Invoice lifecycle
  - name: Transactions
    description: On-chain payment transactions
  - name: Payment Links
    description: Reusable payment link management
  - name: Webhooks
    description: Webhook endpoint and delivery management
  - name: Integrations
    description: Third-party platform integrations
paths:
  /v1/integration/woocommerce/connect:
    post:
      tags:
        - Integrations
      summary: Connect WooCommerce
      description: >
        Registers or reconnects a WooCommerce store. Returns a dedicated API key
        and

        webhook secret. Uses legacy error shape on some failures.
      operationId: wooConnect
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WooConnectRequest'
      responses:
        '200':
          description: WooCommerce connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WooConnectResponse'
        '400':
          description: Bad request (legacy error shape)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden (legacy error shape)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict (legacy error shape)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error (legacy error shape)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    WooConnectRequest:
      type: object
      required:
        - webhook_url
        - site_url
      properties:
        webhook_url:
          type: string
          format: uri
          description: >
            **Required.** URL on your WordPress site that receives payment
            updates from Meum.

            Usually: `https://your-store.com/wp-json/meum/v1/webhook`
          example: https://shop.example.com/wp-json/meum/v1/webhook
        site_url:
          type: string
          format: uri
          description: >
            **Required.** Your store's public homepage URL (used to identify
            this WooCommerce site).
          example: https://shop.example.com
        plugin_version:
          type: string
          description: >
            **Optional.** Meum WooCommerce plugin version (e.g. `"1.2.0"`).
            Helps support diagnose issues.
          example: 1.2.0
        wordpress_version:
          type: string
          description: '**Optional.** WordPress version (e.g. "6.5"). Omit if unknown.'
          example: '6.5'
        woocommerce_version:
          type: string
          description: '**Optional.** WooCommerce version (e.g. "8.9"). Omit if unknown.'
          example: '8.9'
    WooConnectResponse:
      type: object
      description: >-
        Credentials returned after a successful WooCommerce connection
        handshake.
      properties:
        store_id:
          type: string
          format: uuid
          description: Meum store UUID linked to this site.
        store_name:
          type: string
          description: Store display name in Meum.
          example: Demo Store
        integration_id:
          type: string
          format: uuid
          description: Integration UUID for this WooCommerce installation.
        installation_id:
          type: string
          description: Unique installation identifier for support and rotation.
          example: inst_a1b2c3d4e5f678901234
        site_url:
          type: string
          format: uri
          description: Connected storefront URL.
        api_key:
          type: string
          description: >-
            Merchant API key for server-side calls (`sk_live_...`). Store
            securely.
          example: sk_live_EXAMPLE_DO_NOT_USE
        webhook_secret:
          type: string
          description: Secret for verifying inbound webhooks from Meum to WordPress.
          example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
        webhook_url:
          type: string
          format: uri
          description: Registered webhook destination on the WordPress site.
        webhook_id:
          type: string
          format: uuid
          description: Meum webhook endpoint UUID for this integration.
        status:
          type: string
          description: Connection status (for example `ACTIVE`).
          example: ACTIVE
        credentials_rotated:
          type: boolean
          description: >-
            True when this response re-issued credentials for an existing
            installation.
        payout_configured:
          type: boolean
          description: False until a payout wallet is configured for the store.
        checkout_base_url:
          type: string
          format: uri
          description: Base URL for hosted checkout links.
          example: https://pay.meum.io
        warning:
          type: string
          description: >-
            Present when payout wallet is not configured; payments may be
            blocked until resolved.
    ErrorResponse:
      type: object
      description: >
        Legacy flat error shape retained for backward compatibility on invoice
        create

        and WooCommerce integration endpoints.
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Payout wallet not configured
        code:
          type: string
          description: Machine-readable error code for legacy endpoints.
          example: EXTERNAL_ORDER_INTEGRATION_CONFLICT
        details:
          type: object
          additionalProperties:
            type: string
          description: Optional key-value context with field-level validation errors.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Store-scoped API key. Prefix with `sk_live_`.
        Example: `Authorization: Bearer sk_live_EXAMPLE_DO_NOT_USE`

````