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

# Dispute a Transaction

> Create a ticket to dispute a transaction. The list of available dispute reason keys can be found in the `GET /api/v1/transactions/dispute` endpoint.
If the dispute reason is `unrecognized_transaction_report_fraudulent`, the user's card will be restricted.




## OpenAPI

````yaml https://api.gnosispay.com/api-docs/spec.json post /api/v1/transactions/{threadId}/dispute
openapi: 3.0.0
info:
  title: GnosisPay API
  version: 1.0.0
  description: OpenAPI documentation for GnosisPay
servers:
  - url: https://api.gnosispay.com
security: []
tags:
  - name: Account Management
    description: Information about your Account
  - name: Authentication
    description: Authenticate to our API using SIWE
  - name: Card Management
    description: Manage all your Cards
  - name: IBAN
    description: Integrate with Monerium to issue IBANs
  - name: KYC
    description: KYC using Sumsub SDK
  - name: Physical Card Order
    description: Order a Physical Card and manage the process
  - name: Rewards
    description: Cashback Rewards
  - name: Safe Management
    description: Manage your Safe
  - name: Transactions
    description: Manage Card Transactions
  - name: User
    description: Manage User Information
  - name: Webhooks
    description: Manage Webhooks
paths:
  /api/v1/transactions/{threadId}/dispute:
    post:
      tags:
        - Transactions
      summary: Dispute a Transaction
      description: >
        Create a ticket to dispute a transaction. The list of available dispute
        reason keys can be found in the `GET /api/v1/transactions/dispute`
        endpoint.

        If the dispute reason is `unrecognized_transaction_report_fraudulent`,
        the user's card will be restricted.
      parameters:
        - in: path
          name: threadId
          required: true
          schema:
            type: string
          description: The thread ID of the transaction to dispute
          example: '1234567890'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - disputeReason
              properties:
                disputeReason:
                  type: string
                  enum:
                    - purchase_cancelled_but_no_refund_received
                    - problem_with_the_product_chargeback_
                    - problem_with_service_subscription_chargeback
                    - wrong_installment_number
                    - wrong_value
                    - charged_more_than_once
                    - unrecognized_transaction_report_fraudulent
                  description: The reason for disputing the transaction
                  example: purchase_cancelled_but_no_refund_received
      responses:
        '202':
          description: Dispute submitted for review
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Dispute submitted for review
        '400':
          description: Bad request - Thread ID or dispute reason is required/invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Valid dispute reason is required
                  validReasons:
                    type: array
                    items:
                      type: string
                    example:
                      - purchase_cancelled_but_no_refund_received
                      - problem_with_the_product_chargeback_
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Transaction not found or does not belong to user
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Transaction not found or does not belong to user
        '409':
          description: Transaction has already been disputed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Transaction has already been disputed
                  message:
                    type: string
                    example: >-
                      This transaction has already been disputed and is being
                      reviewed
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal server error
      security:
        - bearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````