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

# Cancel invoice

> Cancels an open invoice. Not available for WooCommerce dedicated keys.



## OpenAPI

````yaml /openapi.yaml post /v1/invoices/{id}/cancel
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/invoices/{id}/cancel:
    post:
      tags:
        - Invoices
      summary: Cancel invoice
      description: Cancels an open invoice. Not available for WooCommerce dedicated keys.
      operationId: cancelInvoice
      parameters:
        - $ref: '#/components/parameters/InvoiceId'
      responses:
        '200':
          description: Invoice cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicInvoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    InvoiceId:
      name: id
      in: path
      required: true
      description: Invoice ID from create or list responses (starts with `inv_`).
      schema:
        type: string
        pattern: ^(inv_|txn_|plink_|wh_|whd_|evt_|int_)[0-9a-z]{20,32}$
  schemas:
    PublicInvoice:
      type: object
      description: Full invoice record returned by list and get endpoints.
      properties:
        id:
          type: string
          pattern: ^(inv_|txn_|plink_|wh_|whd_|evt_|int_)[0-9a-z]{20,32}$
          description: Unique invoice ID (`inv_...`).
        external_order_id:
          type: string
          description: Your order reference from when the invoice was created.
          example: order_demo_1048
        status:
          $ref: '#/components/schemas/InvoiceStatus'
        amount:
          type: string
          description: Amount you requested to receive (decimal string, e.g. `"100.00"`).
          example: '100.00'
        currency:
          type: string
          description: Currency of `amount` (e.g. `USD`).
          example: USD
        order_amount:
          type: string
          description: Original order total before conversion, if different from `amount`.
          example: '100.00'
        order_currency:
          type: string
          description: Currency of `order_amount`.
          example: USD
        paid_amount:
          type:
            - string
            - 'null'
          description: How much the customer actually paid. `null` until payment starts.
          example: '100.00'
        output_asset:
          type: string
          description: Stablecoin paid out to you (e.g. `USDC`).
          example: USDC
        checkout_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Payment page URL while the invoice can still be paid. `null` if no
            longer payable.
        return_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Where the customer is redirected after checkout, if you set one at
            creation.
        customer_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Internal customer record ID, if linked. Usually not needed for basic
            integrations.
        payment_link_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Pay Link that created this invoice, if applicable.
        transaction_hash:
          type:
            - string
            - 'null'
          description: >-
            Blockchain transaction ID after payment is confirmed. `null` until
            paid.
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Custom data you attached when creating the invoice.
        created_at:
          type: string
          format: date-time
          description: When the invoice was created (UTC).
        updated_at:
          type: string
          format: date-time
          description: When the invoice was last updated (UTC).
        paid_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When payment was confirmed. `null` until the invoice is paid.
        expires_at:
          type: string
          format: date-time
          description: Deadline to pay before the invoice expires (UTC).
    InvoiceStatus:
      type: string
      description: |
        Where the invoice is in the payment flow:
        - `pending`: created, not yet ready for payment
        - `quoted`: price quote ready; customer can proceed to pay
        - `awaiting_payment`: waiting for the customer to send funds
        - `paid`: payment received and confirmed
        - `underpaid`: customer paid less than the requested amount
        - `expired`: not paid before the deadline
        - `failed`: payment or processing failed
        - `refunded`: payment was returned to the customer
        - `cancelled`: invoice was cancelled before completion
      enum:
        - pending
        - quoted
        - awaiting_payment
        - paid
        - underpaid
        - expired
        - failed
        - refunded
        - cancelled
    PublicApiError:
      type: object
      description: Standard error envelope for Public API v1 endpoints.
      required:
        - error
      properties:
        error:
          type: object
          description: Error details for the failed request.
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              description: High-level error category used for programmatic handling.
              enum:
                - invalid_request
                - authentication_error
                - permission_error
                - not_found
                - conflict
                - rate_limit_error
                - api_error
              example: not_found
            code:
              type: string
              description: >-
                Stable machine-readable error code (for example
                `invoice_not_found`).
              example: invoice_not_found
            message:
              type: string
              description: Human-readable explanation suitable to show in logs or UI.
              example: Invoice not found
            param:
              type: string
              description: Request field associated with the error, when applicable.
              example: url
            request_id:
              type: string
              description: Unique request ID. Include when contacting support.
              example: req_a1b2c3d4e5f6789012345678
      example:
        error:
          type: not_found
          code: invoice_not_found
          message: Invoice not found
          request_id: req_a1b2c3d4e5f6789012345678
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
    Forbidden:
      description: Insufficient scope or permission
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Store-scoped API key. Prefix with `sk_live_`.
        Example: `Authorization: Bearer sk_live_EXAMPLE_DO_NOT_USE`

````