> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a dispute for a transaction



## OpenAPI

````yaml post /issuing/transactions/{transactionId}/disputes
openapi: 3.0.3
info:
  title: Issuing API
  description: This is the specification for Rain's Issuing API.
  termsOfService: https://www.rain.xyz/legal/authorized-user-terms
  contact:
    email: support@rain.xyz
  version: 1.3.0
servers:
  - url: https://api-dev.rain.xyz/v1
    description: Sandbox server
  - url: https://api.rain.xyz/v1
    description: Production server
security: []
tags:
  - name: paymentRoutes
    description: >-
      **Endpoint Migration:** The `/v1/automations` endpoints have been renamed
      to `/v1/payment-routes`. The old `/v1/automations` paths remain available
      as deprecated aliases during migration. Update your integrations to use
      `/v1/payment-routes` as the deprecated endpoints will be removed in a
      future release.
  - name: simulate
    description: >-
      Transaction simulation endpoints for testing integration flows in
      non-production environments. These endpoints let you trigger transaction
      events programmatically to automate integration tests and verify webhook
      handling without depending on external systems or staging real deposits.
      **Sandbox only** — all simulation endpoints return `404 Not Found` in
      production.
  - name: raindrops
    description: >-
      Rewards and points management endpoints. Custom API keys need
      `raindrops:read`/`raindrops:write` for general rewards endpoints and
      `raindrops-travel:read`/`raindrops-travel:write` for travel redemption
      endpoints.
    x-group: rewards
paths:
  /issuing/transactions/{transactionId}/disputes:
    post:
      tags:
        - disputes
      summary: Create a dispute for a transaction
      operationId: createIssuingDispute
      parameters:
        - name: transactionId
          in: path
          description: Id of the transaction to create a dispute for
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The dispute to create
        content:
          application/json:
            schema:
              type: object
              properties:
                disputeType:
                  type: string
                  enum:
                    - fraud
                    - creditNotProcessed
                    - serviceNotReceived
                    - merchandiseIssue
                    - other
                  description: The type of dispute being filed
                textEvidence:
                  type: string
                  maxLength: 65535
                  description: The textual evidence for the dispute
                disputeAmount:
                  type: integer
                  minimum: 1
                  description: >-
                    Disputed amount in cents. Must be less than or equal to the
                    transaction amount. If omitted, defaults to the full
                    transaction amount.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuingDispute'
        '400':
          description: >-
            Invalid request. Returns when: the transaction is not settled (no
            postedAt timestamp), the transaction has a zero amount, or the
            request body is malformed.
        '401':
          description: Invalid authorization
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    IssuingDispute:
      type: object
      required:
        - id
        - transactionId
        - status
        - createdAt
        - disputeAmount
      properties:
        id:
          type: string
          description: The dispute's unique identifier
          format: uuid
        transactionId:
          type: string
          format: uuid
          description: The transaction's unique identifier
        status:
          type: string
          enum:
            - pending
            - inReview
            - accepted
            - rejected
            - canceled
            - resolvedByMerchant
          description: The status of the dispute
        disputeType:
          type: string
          enum:
            - fraud
            - creditNotProcessed
            - serviceNotReceived
            - merchandiseIssue
            - other
          description: The type of dispute
        textEvidence:
          type: string
          maxLength: 65535
          description: The textual evidence for the dispute
        disputeAmount:
          type: integer
          description: Disputed amount in cents
        createdAt:
          type: string
          format: date-time
          description: The time at which the dispute was created
        resolvedAt:
          type: string
          format: date-time
          description: The time at which the dispute was resolved
        transaction:
          $ref: '#/components/schemas/IssuingDisputeTransaction'
          description: Details of the transaction associated with the dispute
        hasFileEvidence:
          type: boolean
          description: Indicates whether file evidence has been uploaded for the dispute
        attachmentCount:
          type: integer
          minimum: 0
          description: The number of attachments uploaded for the dispute
    IssuingDisputeTransaction:
      type: object
      description: Transaction details associated with a dispute
      required:
        - id
        - amount
      properties:
        id:
          type: string
          format: uuid
          description: The transaction's unique identifier
        cardholderUserId:
          type: string
          format: uuid
          description: The unique identifier of the cardholder user
        cardholderFirstName:
          type: string
          description: The cardholder's first name
        cardholderLastName:
          type: string
          description: The cardholder's last name
        amount:
          type: number
          description: The transaction amount in cents
        merchantName:
          type: string
          description: The name of the merchant
        postedAt:
          type: string
          format: date-time
          description: The time at which the transaction was posted
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Api-Key
      in: header

````