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

# Void invoice

> Voids a non-completed invoice through the existing invoice void pipeline.



## OpenAPI

````yaml /openapi.json post /dev/v1/invoices/{uniqid}/void
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/invoices/{uniqid}/void:
    post:
      tags:
        - Invoices
      summary: Void invoice
      description: >-
        Voids a non-completed invoice through the existing invoice void
        pipeline.
      operationId: postDevV1InvoicesByUniqidVoid
      parameters:
        - name: uniqid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                void_details:
                  type: string
              example:
                void_details: Customer requested cancellation
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                void_details:
                  type: string
              example:
                void_details: Customer requested cancellation
          multipart/form-data:
            schema:
              type: object
              properties:
                void_details:
                  type: string
              example:
                void_details: Customer requested cancellation
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - data
                    properties:
                      data:
                        type: object
                        required:
                          - id
                          - uniqid
                          - type
                          - subtype
                          - origin
                          - shop_id
                          - customer_id
                          - affiliate_link_id
                          - affiliate_customer_id
                          - affiliate_code
                          - affiliate_discount_amount
                          - currency
                          - product_id
                          - product_title
                          - product_type
                          - product_variants
                          - quantity
                          - gateway
                          - payment_status
                          - flow_type
                          - provider_reference
                          - provider_reference_type
                          - blockchain
                          - apm_method
                          - crypto_address
                          - crypto_amount
                          - crypto_received
                          - crypto_uri
                          - crypto_confirmations_needed
                          - total
                          - total_display
                          - subtotal
                          - tax
                          - tax_percentage
                          - exchange_rate
                          - crypto_exchange_rate
                          - balance_paid_amount
                          - coupon_id
                          - discount
                          - discount_display
                          - volume_discount
                          - customer_email
                          - country
                          - location
                          - ip
                          - is_vpn_or_proxy
                          - user_agent
                          - custom_fields
                          - is_developer_invoice
                          - developer_title
                          - developer_webhook
                          - developer_return_url
                          - fee_percentage
                          - fee_billed
                          - to_process
                          - status
                          - status_details
                          - void_details
                          - name
                          - surname
                          - address_line_1
                          - address_city
                          - address_country
                          - address_postal_code
                          - address_state
                          - subscription_id
                          - items
                          - created_at
                          - updated_at
                          - checkout_url
                          - product
                        properties:
                          id:
                            type: string
                          uniqid:
                            type: string
                          type:
                            type: string
                          subtype:
                            type: string
                            nullable: true
                          origin:
                            type: string
                            nullable: true
                          shop_id:
                            type: string
                          customer_id:
                            type: string
                            nullable: true
                          affiliate_link_id:
                            type: string
                            nullable: true
                          affiliate_customer_id:
                            type: string
                            nullable: true
                          affiliate_code:
                            type: string
                            nullable: true
                          affiliate_discount_amount:
                            type: number
                          currency:
                            type: string
                          product_id:
                            type: string
                            nullable: true
                          product_title:
                            type: string
                            nullable: true
                          product_type:
                            type: string
                            nullable: true
                          product_variants:
                            type: array
                            nullable: true
                            items:
                              type: object
                              required:
                                - title
                              properties:
                                title:
                                  type: string
                              additionalProperties: true
                          quantity:
                            type: number
                          gateway:
                            type: string
                            description: Null while no gateway has been selected yet.
                            nullable: true
                          payment_status:
                            type: string
                            nullable: true
                          flow_type:
                            type: string
                            nullable: true
                          provider_reference:
                            type: string
                            nullable: true
                          provider_reference_type:
                            type: string
                            nullable: true
                          blockchain:
                            type: string
                            nullable: true
                          apm_method:
                            type: string
                            nullable: true
                          crypto_address:
                            type: string
                            nullable: true
                          crypto_amount:
                            type: number
                          crypto_received:
                            type: number
                          crypto_uri:
                            type: string
                            nullable: true
                          crypto_confirmations_needed:
                            type: number
                          total:
                            type: number
                            description: USD-normalized invoice total.
                          total_display:
                            type: number
                            description: Invoice total in the buyer display currency.
                          subtotal:
                            type: number
                          tax:
                            type: number
                          tax_percentage:
                            type: number
                          exchange_rate:
                            type: number
                          crypto_exchange_rate:
                            type: number
                          balance_paid_amount:
                            type: number
                          coupon_id:
                            type: string
                            nullable: true
                          discount:
                            type: number
                          discount_display:
                            type: number
                          volume_discount:
                            type: number
                          customer_email:
                            type: string
                            nullable: true
                          country:
                            type: string
                            nullable: true
                          location:
                            type: string
                            nullable: true
                          ip:
                            type: string
                            nullable: true
                          is_vpn_or_proxy:
                            type: boolean
                          user_agent:
                            type: string
                            nullable: true
                          custom_fields:
                            type: object
                            nullable: true
                            additionalProperties: true
                          is_developer_invoice:
                            type: boolean
                          developer_title:
                            type: string
                            nullable: true
                          developer_webhook:
                            type: string
                            nullable: true
                          developer_return_url:
                            type: string
                            nullable: true
                          fee_percentage:
                            type: number
                          fee_billed:
                            type: boolean
                          to_process:
                            type: boolean
                          status:
                            type: string
                            description: >-
                              Raw invoice status, e.g. PENDING, PENDING_PAYMENT,
                              COMPLETED, VOIDED.
                          status_details:
                            type: string
                            nullable: true
                          void_details:
                            type: string
                            nullable: true
                          name:
                            type: string
                            nullable: true
                          surname:
                            type: string
                            nullable: true
                          address_line_1:
                            type: string
                            nullable: true
                          address_city:
                            type: string
                            nullable: true
                          address_country:
                            type: string
                            nullable: true
                          address_postal_code:
                            type: string
                            nullable: true
                          address_state:
                            type: string
                            nullable: true
                          subscription_id:
                            type: string
                            nullable: true
                          items:
                            type: array
                            items:
                              type: object
                              required:
                                - product_id
                                - product_title
                                - product_type
                                - variant_title
                                - quantity
                                - unit_price
                                - total
                              properties:
                                product_id:
                                  type: string
                                  nullable: true
                                product_title:
                                  type: string
                                product_type:
                                  type: string
                                variant_title:
                                  type: string
                                  nullable: true
                                quantity:
                                  type: number
                                unit_price:
                                  type: number
                                total:
                                  type: number
                                delivered_items:
                                  type: object
                                  additionalProperties: true
                              additionalProperties: true
                          created_at:
                            type: number
                            description: Unix timestamp in seconds.
                          updated_at:
                            type: number
                            description: Unix timestamp in seconds.
                          checkout_url:
                            type: string
                          product:
                            type: object
                            nullable: true
                            required:
                              - id
                              - uniqid
                              - type
                              - subtype
                              - title
                              - description
                              - price
                              - price_display
                              - currency
                              - stock
                              - stock_delimiter
                              - quantity_min
                              - quantity_max
                              - quantity_warning
                              - gateways
                              - custom_fields
                              - created_at
                              - updated_at
                            properties:
                              id:
                                type: string
                              uniqid:
                                type: string
                              type:
                                type: string
                              subtype:
                                type: string
                                nullable: true
                              title:
                                type: string
                              description:
                                type: string
                                nullable: true
                              price:
                                type: number
                              price_display:
                                type: number
                              currency:
                                type: string
                              stock:
                                type: number
                              stock_delimiter:
                                type: string
                                nullable: true
                              quantity_min:
                                type: number
                              quantity_max:
                                type: number
                              quantity_warning:
                                type: number
                              gateways:
                                type: array
                                nullable: true
                                items:
                                  type: string
                              custom_fields:
                                type: array
                                nullable: true
                                items:
                                  type: object
                                  additionalProperties: true
                              created_at:
                                type: number
                                description: Unix timestamp in seconds.
                              updated_at:
                                type: number
                                description: Unix timestamp in seconds.
                            additionalProperties: true
                        additionalProperties: true
                    additionalProperties: true
                  - type: object
                    required:
                      - data
                    properties:
                      data:
                        type: object
                        required:
                          - message
                        properties:
                          message:
                            type: string
                        additionalProperties: true
                    additionalProperties: true
                example:
                  data:
                    id: inv_3
                    uniqid: 33333333-3333-4333-8333-333333333333
                    type: PRODUCT
                    shop_id: shop_1
                    customer_email: buyer@example.com
                    currency: USD
                    total: 49.99
                    total_display: 49.99
                    status: VOIDED
                    void_details: Customer requested cancellation
                    payment_status: VOIDED
                    gateway: STRIPE
                    items:
                      - product_id: null
                        product_title: External Payment
                        product_type: SERVICE
                        variant_title: null
                        quantity: 1
                        unit_price: 49.99
                        total: 49.99
                        delivered_items: null
                    created_at: 1712059200
                    updated_at: 1712059860
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````