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

# Report that a chargeback occurred

> An endpoint for reporting that a chargeback process has occurred on a transaction. The `state` and `chargebackNotes` properties can be used to provide information about the chargeback. The `isFraud`, `fraudType`, and `fraudNotes` are used to provide information about fraud or suspected fraud related to this chargeback. Note that this transaction must previously have been enriched to report the chargeback.




## OpenAPI

````yaml /api-reference/spec.yml post /enrichments/{enrichmentId}/chargeback
openapi: 3.1.0
info:
  title: Spade API
  description: >-
    Documentation for Spade's card transaction enrichment API and related
    endpoints. We offer sandbox and production environments on both the east
    coast and west coast to enable ultra low latency enrichment for realtime
    applications. Each environment requires different API keys. To inquire about
    API keys, please contact your Spade representative or reach out to
    <hello@spade.com>.
  version: 2.7.3
servers:
  - url: https://east.sandbox.spade.com
    description: East coast sandbox environment
  - url: https://east.api.spade.com
    description: East coast production environment
  - url: https://west.sandbox.spade.com
    description: West coast sandbox environment
  - url: https://west.api.spade.com
    description: West coast production environment
  - url: https://sandbox.v2.spadeapi.com
    description: East coast sandbox environment (deprecated)
  - url: https://v2.spadeapi.com
    description: East coast production environment (deprecated)
  - url: https://sandbox.west.v2.spadeapi.com
    description: West coast sandbox environment (deprecated)
  - url: https://west.v2.spadeapi.com
    description: West coast production environment (deprecated)
security:
  - ApiKeyAuth: []
tags:
  - name: Card Enrichment
    description: Enrich card transactions
  - name: Transfer Enrichment
    description: Enrich transfers
  - name: Category Personalization
    description: Create custom categories and personalize enrichments
  - name: Feedback and Reporting
    description: Provide feedback on card events or report enrichment errors
  - name: Merchant Search
    description: Search for Spade merchants
  - name: Merchant Action Triggers
    description: >-
      Register merchant action triggers and receive triggered actions in
      enrichment responses
  - name: Category Action Triggers
    description: >-
      Register category action triggers and receive triggered actions in
      enrichment responses
paths:
  /enrichments/{enrichmentId}/chargeback:
    parameters:
      - in: path
        name: enrichmentId
        schema:
          type: string
        description: >-
          The `enrichmentId` of enrichment associated with the transaction where
          a chargeback occurred.
        required: true
    post:
      tags:
        - Feedback and Reporting
      summary: Report that a chargeback occurred
      description: >
        An endpoint for reporting that a chargeback process has occurred on a
        transaction. The `state` and `chargebackNotes` properties can be used to
        provide information about the chargeback. The `isFraud`, `fraudType`,
        and `fraudNotes` are used to provide information about fraud or
        suspected fraud related to this chargeback. Note that this transaction
        must previously have been enriched to report the chargeback.
      operationId: enrichmentChargeback
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  required:
                    - state
                  properties:
                    state:
                      type: string
                      description: >
                        The state of the chargeback process. You can update a
                        chargeback's `state` by submitting another request with
                        a new `state`, for example, a new request could update
                        the `state` from `chargeback_pending` to
                        `chargeback_won`.
                      enum:
                        - chargeback_won
                        - chargeback_lost
                        - chargeback_pending
                      examples:
                        - chargeback_won
                    chargebackNotes:
                      type: string
                      description: >-
                        Any additional details related to the chargeback not
                        covered by the state.
                      maxLength: 512
                      examples:
                        - Transaction was initiated in error.
                    occurredAt:
                      type: string
                      format: date-time
                      description: >
                        The time when the chargeback's state change. This could
                        be the time when the chargeback was initiated and its
                        state became `chargeback_pending` or the time when the
                        chargeback was resolved its state moved to
                        `chargeback_won` or `chargeback_lost`. Formatted as an
                        ISO 8601 date time.
                      examples:
                        - '2022-06-15 18:27:51Z'
                - $ref: '#/components/schemas/CommonFraud'
      responses:
        '200':
          description: Chargeback reported successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichmentFeedbackResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CommonFraud:
      type: object
      properties:
        isFraud:
          type: boolean
          description: >-
            A boolean indicating if this transaction was suspected to involve
            fraud.
          examples:
            - false
        fraudType:
          type: string
          description: >
            The type of fraud suspected to have occurred. This field can only be
            provided if `isFraud` is true.
          enum:
            - card_not_present
            - card_testing
            - chargeback_fraud
            - counterfeit_card
            - merchant_fraud
            - other
            - phishing
            - stolen_card
            - unknown
            - none
        fraudNotes:
          type: string
          description: >
            Any additional details related to fraud suspected to have occurred
            on the associated transaction. This field can only be provided if
            `isFraud` is true.
          maxLength: 512
          examples:
            - Merchant is believed to commonly be used for card testing.
    EnrichmentFeedbackResponse:
      type: object
      description: Response for reporting any kind of enrichment feedback.
      properties:
        details:
          type: string
          examples:
            - Chargeback successfully reported.
  responses:
    BadRequest:
      description: Invalid input
      content:
        application/json:
          schema:
            type: object
            properties:
              invalidField:
                type: array
                items:
                  type: string
                  examples:
                    - This field is required.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              details:
                type: string
                examples:
                  - Incorrect authentication credentials.
    InternalServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            type: object
            properties:
              details:
                type: string
                examples:
                  - Internal server error.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header

````