# Close a dispute

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/disputes/{id}/close:
    post:
      summary: Close a dispute
      deprecated: false
      description: ''
      tags:
        - API Reference/Disputes
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apifox-refs:
                  01GJZ91XT1YVVKNHGWRQPESKR8:
                    $ref: '#/components/schemas/Dispute'
                    x-apifox-overrides:
                      balance_transactions: null
                      is_charge_refundable: null
                      reason: null
                x-apifox-orders:
                  - 01GJZ91XT1YVVKNHGWRQPESKR8
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  object:
                    type: string
                    description: '"dispute"'
                  amount:
                    type: integer
                    description: >-
                      Disputed amount. Usually the amount of the charge, but can
                      differ (usually because of currency fluctuation or because
                      only part of the order is disputed).
                  charge:
                    type: string
                    description: ID of the charge that was disputed.
                  created:
                    type: integer
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  currency:
                    type: string
                    description: >-
                      Three-letter ISO currency code, in lowercase. Must be a
                      supported currency.
                  evidence: &ref_0
                    description: >-
                      Evidence provided to respond to a dispute. Updating any
                      field in the hash will submit all fields in the hash for
                      review.
                    $ref: '#/components/schemas/Dispute%20Evidence'
                  evidence_details:
                    type: object
                    properties:
                      due_by:
                        type: integer
                        description: >-
                          Date by which evidence must be submitted in order to
                          successfully challenge dispute. Will be null if the
                          customer’s bank or credit card company doesn’t allow a
                          response for this particular dispute. 
                      has_evidence:
                        type: boolean
                        description: 'Whether evidence has been staged for this dispute. '
                      past_due:
                        type: boolean
                        description: >-
                          Whether the last evidence submission was submitted
                          past the due date. Defaults to false if no evidence
                          submissions have occurred. If true, then delivery of
                          the latest evidence is not guaranteed. 
                      submission_count:
                        type: integer
                        description: >-
                          The number of times evidence has been submitted.
                          Typically, you may only submit evidence once.
                    x-apifox-orders:
                      - due_by
                      - has_evidence
                      - past_due
                      - submission_count
                    x-apifox-ignore-properties: []
                  livemode:
                    type: boolean
                    description: >-
                      Has the value true if the object exists in live mode or
                      the value false if the object exists in test mode.
                  metadata:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                    x-apifox-ignore-properties: []
                  payment_intent:
                    type: string
                    description: ID of the PaymentIntent that was disputed.
                  status:
                    type: string
                    description: >-
                      Current status of dispute. Possible values are
                      warning_needs_response, warning_under_review,
                      warning_closed, needs_response, under_review,
                      charge_refunded, won, or lost.
                    enum:
                      - warning_needs_response
                      - warning_under_review
                      - warning_closed
                      - needs_response
                      - under_review
                      - charge_refunded
                      - won
                      - lost
                      - early_dispute_warning
                      - early_dispute_resolved
                    x-apifox-enum:
                      - value: warning_needs_response
                        name: ''
                        description: ''
                      - value: warning_under_review
                        name: ''
                        description: ''
                      - value: warning_closed
                        name: ''
                        description: ''
                      - value: needs_response
                        name: ''
                        description: ''
                      - value: under_review
                        name: ''
                        description: ''
                      - value: charge_refunded
                        name: ''
                        description: ''
                      - value: won
                        name: ''
                        description: ''
                      - value: lost
                        name: ''
                        description: ''
                      - value: early_dispute_warning
                        name: ''
                        description: ''
                      - value: early_dispute_resolved
                        name: ''
                        description: ''
                  reason_type:
                    type: string
                    description: >-
                      Visa and MasterCard organized their reason codes into four
                      categories. While American Express and Discover each use
                      additional categories to help categorize their reason
                      codes, customer dispute categorization is moving towards
                      the four category standard.
                  reason_description:
                    type: string
                    description: The detailed description of the dispute reason.
                  reason_code:
                    type: string
                    description: >-
                      Reason codes are alphanumeric strings of text provided in
                      a chargeback notification as a means of explaining the
                      cause for the dispute.
                x-apifox-ignore-properties:
                  - id
                  - object
                  - amount
                  - charge
                  - created
                  - currency
                  - evidence
                  - evidence_details
                  - livemode
                  - metadata
                  - payment_intent
                  - status
                  - reason_type
                  - reason_description
                  - reason_code
              example:
                id: dp_xxxxxxxxxxxxxxxxxx
                object: dispute
                amount: 1000
                balance_transactions: []
                created: 1669643926
                currency: eur
                evidence:
                  access_activity_log: null
                  billing_address: null
                  cancellation_policy: null
                  cancellation_policy_disclosure: null
                  cancellation_rebuttal: null
                  customer_communication: null
                  customer_email_address: null
                  customer_name: null
                  customer_purchase_ip: null
                  customer_signature: null
                  duplicate_charge_documentation: null
                  duplicate_charge_explanation: null
                  duplicate_charge_id: null
                  product_description: null
                  receipt: null
                  refund_policy: null
                  refund_policy_disclosure: null
                  refund_refusal_explanation: null
                  service_date: null
                  service_documentation: null
                  shipping_address: null
                  shipping_carrier: null
                  shipping_date: null
                  shipping_documentation: null
                  shipping_tracking_number: null
                  uncategorized_file: null
                  uncategorized_text: null
                evidence_details:
                  due_by: 1671321599
                  has_evidence: false
                  past_due: false
                  submission_count: 0
                livemode: false
                metadata: {}
                status: lost
          headers: {}
          x-apifox-name: OK
      security:
        - basic: []
      x-apifox-folder: API Reference/Disputes
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-44453397-run
components:
  schemas:
    Dispute Evidence:
      type: object
      properties:
        access_activity_log:
          type: string
          description: ' Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.'
        billing_address:
          type: string
          description: The billing address provided by the customer.
        cancellation_policy:
          type: string
          description: >-
            (ID of a file upload) Your subscription cancellation policy, as
            shown to the customer.
        cancellation_policy_disclosure:
          type: string
          description: >-
            An explanation of how and when the customer was shown your refund
            policy prior to purchase.
        cancellation_rebuttal:
          type: string
          description: >-
            A justification for why the customer’s subscription was not
            canceled.
        customer_communication:
          type: string
          description: >-
            (ID of a file upload) Any communication with the customer that you
            feel is relevant to your case. Examples include emails proving that
            the customer received the product or service, or demonstrating their
            use of or satisfaction with the product or service.
        customer_email_address:
          type: string
          description: The email address of the customer.
        customer_name:
          type: string
          description: Customer name.
        customer_purchase_ip:
          type: string
          description: The IP address that the customer used when making the purchase.
        customer_signature:
          type: string
          description: >-
            (ID of a file upload) A relevant document or contract showing the
            customer’s signature.
        duplicate_charge_documentation:
          type: string
          description: >-
            (ID of a file upload) Documentation for the prior charge that can
            uniquely identify the charge, such as a receipt, shipping label,
            work order, etc. This document should be paired with a similar
            document from the disputed payment that proves the two payments are
            separate.
        duplicate_charge_explanation:
          type: string
          description: >-
            An explanation of the difference between the disputed charge versus
            the prior charge that appears to be a duplicate.
        duplicate_charge_id:
          type: string
          description: >-
            The ID for the prior charge which appears to be a duplicate of the
            disputed charge.
        product_description:
          type: string
          description: A description of the product or service that was sold.
        receipt:
          type: string
          description: >-
            (ID of a file upload) Any receipt or message sent to the customer
            notifying them of the charge.
        refund_policy:
          type: string
          description: (ID of a file upload) Your refund policy, as shown to the customer.
        refund_policy_disclosure:
          type: string
          description: >-
            Documentation demonstrating that the customer was shown your refund
            policy prior to purchase.
        refund_refusal_explanation:
          type: string
          description: A justification for why the customer is not entitled to a refund.
        service_date:
          type: string
          description: >-
            The date on which the customer received or began receiving the
            purchased service, in a clear human-readable format.
        service_documentation:
          type: string
          description: >-
            (ID of a file upload) Documentation showing proof that a service was
            provided to the customer. This could include a copy of a signed
            contract, work order, or other form of written agreement.
        shipping_address:
          type: string
          description: >-
            The address to which a physical product was shipped. You should try
            to include as complete address information as possible.
        shipping_carrier:
          type: string
          description: >-
            The delivery service that shipped a physical product, such as Fedex,
            UPS, USPS, etc. If multiple carriers were used for this purchase,
            please separate them with commas.
        shipping_date:
          type: string
          description: >-
            The date on which a physical product began its route to the shipping
            address, in a clear human-readable format.
        shipping_documentation:
          type: string
          description: >-
            (ID of a file upload) Documentation showing proof that a product was
            shipped to the customer at the same address the customer provided to
            you. This could include a copy of the shipment receipt, shipping
            label, etc. It should show the customer’s full shipping address, if
            possible.
        shipping_tracking_number:
          type: string
          description: >-
            The tracking number for a physical product, obtained from the
            delivery service. If multiple tracking numbers were generated for
            this purchase, please separate them with commas.
        uncategorized_file:
          type: string
          description: (ID of a file upload) Any additional evidence or statements.
        uncategorized_text:
          type: string
          description: Any additional evidence or statements.
      x-apifox-orders:
        - access_activity_log
        - billing_address
        - cancellation_policy
        - cancellation_policy_disclosure
        - cancellation_rebuttal
        - customer_communication
        - customer_email_address
        - customer_name
        - customer_purchase_ip
        - customer_signature
        - duplicate_charge_documentation
        - duplicate_charge_explanation
        - duplicate_charge_id
        - product_description
        - receipt
        - refund_policy
        - refund_policy_disclosure
        - refund_refusal_explanation
        - service_date
        - service_documentation
        - shipping_address
        - shipping_carrier
        - shipping_date
        - shipping_documentation
        - shipping_tracking_number
        - uncategorized_file
        - uncategorized_text
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Dispute:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        object:
          type: string
          description: '"dispute"'
        amount:
          type: integer
          description: >-
            Disputed amount. Usually the amount of the charge, but can differ
            (usually because of currency fluctuation or because only part of the
            order is disputed).
        balance_transactions:
          type: array
          items:
            type: string
          description: （未实现）
        charge:
          type: string
          description: ID of the charge that was disputed.
        created:
          type: integer
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in lowercase. Must be a supported
            currency.
        evidence: *ref_0
        evidence_details:
          type: object
          properties:
            due_by:
              type: integer
              description: >-
                Date by which evidence must be submitted in order to
                successfully challenge dispute. Will be null if the customer’s
                bank or credit card company doesn’t allow a response for this
                particular dispute. 
            has_evidence:
              type: boolean
              description: 'Whether evidence has been staged for this dispute. '
            past_due:
              type: boolean
              description: >-
                Whether the last evidence submission was submitted past the due
                date. Defaults to false if no evidence submissions have
                occurred. If true, then delivery of the latest evidence is not
                guaranteed. 
            submission_count:
              type: integer
              description: >-
                The number of times evidence has been submitted. Typically, you
                may only submit evidence once.
          x-apifox-orders:
            - due_by
            - has_evidence
            - past_due
            - submission_count
          x-apifox-ignore-properties: []
        is_charge_refundable:
          type: boolean
          description: （未实现）
        livemode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: []
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          x-apifox-ignore-properties: []
        payment_intent:
          type: string
          description: ID of the PaymentIntent that was disputed.
        reason:
          type: string
          description: (未实现)
        status:
          type: string
          description: >-
            Current status of dispute. Possible values are
            warning_needs_response, warning_under_review, warning_closed,
            needs_response, under_review, charge_refunded, won, or lost.
          enum:
            - warning_needs_response
            - warning_under_review
            - warning_closed
            - needs_response
            - under_review
            - charge_refunded
            - won
            - lost
            - early_dispute_warning
            - early_dispute_resolved
          x-apifox-enum:
            - value: warning_needs_response
              name: ''
              description: ''
            - value: warning_under_review
              name: ''
              description: ''
            - value: warning_closed
              name: ''
              description: ''
            - value: needs_response
              name: ''
              description: ''
            - value: under_review
              name: ''
              description: ''
            - value: charge_refunded
              name: ''
              description: ''
            - value: won
              name: ''
              description: ''
            - value: lost
              name: ''
              description: ''
            - value: early_dispute_warning
              name: ''
              description: ''
            - value: early_dispute_resolved
              name: ''
              description: ''
        reason_type:
          type: string
          description: >-
            Visa and MasterCard organized their reason codes into four
            categories. While American Express and Discover each use additional
            categories to help categorize their reason codes, customer dispute
            categorization is moving towards the four category standard.
        reason_description:
          type: string
          description: The detailed description of the dispute reason.
        reason_code:
          type: string
          description: >-
            Reason codes are alphanumeric strings of text provided in a
            chargeback notification as a means of explaining the cause for the
            dispute.
      x-apifox-orders:
        - id
        - object
        - amount
        - balance_transactions
        - charge
        - created
        - currency
        - evidence
        - evidence_details
        - is_charge_refundable
        - livemode
        - metadata
        - payment_intent
        - reason
        - status
        - reason_type
        - reason_description
        - reason_code
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://apitest.wooshpay.com
    description: 官网测试
security:
  - basic: []

```
