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

# Respond to Chargeback

> Accept, contest or partially accept a chargeback, with the evidence its condition takes.

> [!NOTE]
>
> The request and response are the same whatever `X-API-Version` you send. v1, v2 and v3 integrations share these chargeback endpoints.

## Sending an answer

Send the `action` and `condition` you picked from [Get Chargeback Actions](https://docs.eximpe.com/api-reference/v1/chargebacks/actions.md), plus one `fields[<name>]` part per field of that condition:

* **Text fields:** the text.
* **True/false fields:** `true` or `false`.
* **Documents:** the file. Attach at least the condition's `min_documents`.
* **`amount`:** only with `partial_accept`, where it is required. It must be less than the disputed amount; to accept all of it, use `accept`.

> [!NOTE]
>
> **Where the keys come from.** Every key you send is read from the [Get Chargeback Actions](https://docs.eximpe.com/api-reference/v1/chargebacks/actions.md) response:
>
> | In Get Chargeback Actions | Send as |
> | - | - |
> | The key under `actions`: `accept`, `contest` or `partial_accept` | `action` |
> | The `condition` of the entry you picked under that key | `condition` |
> | Each `name` in that entry's `text_fields`, `boolean_fields` and `documents` | `fields[<name>]` |
>
> For example, the entry under `actions.contest` with `"condition": "contested"`, a text field named `remarks` and a document named `proof_of_delivery` is sent as `action=contest`, `condition=contested`, `fields[remarks]=…` and `fields[proof_of_delivery]=@file.pdf`.

```bash Contest with evidence theme={null}
curl -X POST 'https://api-pacb-uat.eximpe.com/pg/chargebacks/CB6358819770/respond/' \
  -H 'X-Client-ID: <client_id>' \
  -H 'X-Client-Secret: <client_secret>' \
  -H 'X-API-Version: 1.0.0' \
  -F 'action=contest' \
  -F 'condition=contested' \
  -F 'fields[remarks]=Delivered on 30 Oct, signed for by the customer' \
  -F 'fields[proof_of_delivery]=@signed-pod.pdf' \
  -F 'fields[shipping_proof]=@courier-receipt.pdf'
```

```bash Contest with a detailed condition theme={null}
curl -X POST 'https://api-pacb-uat.eximpe.com/pg/chargebacks/CB6358819770/respond/' \
  -H 'X-Client-ID: <client_id>' \
  -H 'X-Client-Secret: <client_secret>' \
  -H 'X-API-Version: 1.0.0' \
  -F 'action=contest' \
  -F 'condition=product_delivered' \
  -F 'fields[product_details]=1 x Blue widget, order ORDER-10422' \
  -F 'fields[courier_name]=BlueDart' \
  -F 'fields[customer_tried_to_cancel]=false' \
  -F 'fields[proof_of_delivery]=@signed-pod.pdf'
```

A field the condition doesn't take, a missing required field, or a value or file that can't be accepted comes back as a `400` keyed by that field's name. Fewer documents than `min_documents` comes back keyed `documents`. Nothing is recorded, so fix it and send the answer again.

Documents may be PDF, JPG, JPEG or PNG. Some payments also take Word files; a file type the payment can't take is refused with a `400` naming the types it does take.

## After you answer

The chargeback moves to `PENDING_DOC_REVIEW` and takes no further answers (`409`). Its status changes from there are sent in the [`DISPUTE_UPDATED`](https://docs.eximpe.com/api-reference/v1/webhooks/dispute-updated) webhook.

If EximPe needs more from you before taking your answer to the bank, the chargeback moves to `INSUFFICIENT_DOCUMENT` and you are emailed what is missing. It can then be answered again: fetch its actions and send a new answer before `respond_by`.

> [!WARNING]
>
> **`502` with code `40670`: do not resubmit.** The gateway accepted some of your documents and then failed. Your contest **is registered** and the chargeback is `PENDING_DOC_REVIEW`. `details.delivered` and `details.failed` name the documents by your field names; send the failed ones to EximPe support.
>
> Any other `502` means nothing was recorded, and you can retry.


## OpenAPI

````yaml openapi/openapi.json POST /pg/chargebacks/{chargeback_id}/respond/
openapi: 3.0.0
info:
  title: Eximpe Payment Gateway API
  description: >-
    API for payment processing and order management through Eximpe payment
    gateway. This specification includes v1, v2, and v3 API versions.
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security:
  - clientAuth: []
    clientSecretAuth: []
    apiVersionHeader: []
tags:
  - name: Card Tokens
  - name: Merchants
  - name: Orders
  - name: Payment Links
  - name: Payments
  - name: Refunds
  - name: Chargebacks
    description: >-
      Chargebacks on your payments, and your answer to them. The same request
      and response shape works whichever gateway the payment was made on.
  - name: Settlements
  - name: Subscriptions
paths:
  /pg/chargebacks/{chargeback_id}/respond/:
    post:
      tags:
        - Chargebacks
      summary: Respond to Chargeback
      description: >-
        Answer a chargeback with an action and one of its conditions. Send
        `multipart/form-data` (needed for documents); an answer with no
        documents may be sent as JSON instead. Once an answer is in, the
        chargeback moves to `PENDING_DOC_REVIEW` and a second answer is refused
        with `409`, unless EximPe sends it back to you for more information
        (`INSUFFICIENT_DOCUMENT`), when you can answer it again.
      operationId: v2_respond_to_chargeback
      parameters:
        - name: chargeback_id
          in: path
          required: true
          description: EximPe chargeback ID, e.g. `CB6358819770`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - action
                - condition
              properties:
                action:
                  type: string
                  enum:
                    - accept
                    - contest
                    - partial_accept
                  example: contest
                  description: >-
                    `accept`: accept the chargeback in full. `contest`: dispute
                    it with evidence. `partial_accept`: accept part of the
                    disputed amount.
                condition:
                  type: string
                  description: A condition listed under `action` by Get Chargeback Actions.
                  example: contested
                amount:
                  type: string
                  description: >-
                    `partial_accept` only, and required there: the amount you
                    accept, less than the disputed amount. Two decimals.
              description: >-
                Plus one `fields[<name>]` part per field of the chosen
                condition, with the names from Get Chargeback Actions: the text
                for a text field, `true` or `false` for a true/false field, and
                the file for a document. Attach at least the condition's
                `min_documents` documents. See the request examples.
            examples:
              contested:
                summary: Contest with evidence
                value:
                  action: contest
                  condition: contested
                  fields[remarks]: Delivered on 30 Oct, signed for by the customer
                  fields[proof_of_delivery]: '@signed-pod.pdf'
                  fields[shipping_proof]: '@courier-receipt.pdf'
              accepted:
                summary: Accept
                value:
                  action: accept
                  condition: accepted
              product_delivered:
                summary: Contest with a detailed condition
                value:
                  action: contest
                  condition: product_delivered
                  fields[product_details]: 1 x Blue widget, order ORDER-10422
                  fields[customer_tried_to_cancel]: 'false'
                  fields[proof_of_delivery]: '@signed-pod.pdf'
              partial_accept:
                summary: Partially accept
                value:
                  action: partial_accept
                  condition: partially_delivered
                  amount: '1000.00'
                  fields[remarks]: 2 of 3 items delivered
                  fields[supporting_document]: '@delivery-note.pdf'
              customer_cancelled:
                summary: Accept with a detailed condition
                value:
                  action: accept
                  condition: customer_cancelled
          application/json:
            schema:
              type: object
              required:
                - action
                - condition
              properties:
                action:
                  $ref: '#/components/schemas/v2_ChargebackActionType'
                condition:
                  type: string
                amount:
                  type: string
                  description: '`partial_accept` only.'
                fields:
                  type: object
                  additionalProperties:
                    oneOf:
                      - type: string
                      - type: boolean
                  description: >-
                    Text and true/false values by field name. Documents need
                    multipart.
            example:
              action: accept
              condition: other
              fields:
                reason: Duplicate charge confirmed with the customer
      responses:
        '201':
          description: >-
            Answer recorded. Where the payment's gateway takes answers directly
            it is sent there at once; otherwise EximPe takes it to the bank for
            you. Returns the chargeback, now `PENDING_DOC_REVIEW`, with your
            answer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    $ref: '#/components/schemas/v2_ChargebackDetail'
              example:
                success: true
                message: Response submitted for chargeback CB6358819770
                data:
                  chargeback_id: CB6358819770
                  payment_id: PR1400935863
                  order_id: OD8950153797
                  order_reference_id: ORDER-10422
                  amount: '2500.00'
                  status: PENDING_DOC_REVIEW
                  action: contest
                  chargeback_type: Chargeback
                  reason_description: Goods or Services Not Provided / Not Received
                  raised_on: '2026-10-26T03:47:59Z'
                  respond_by: '2026-11-02T03:47:59Z'
                  can_respond: false
                  created_at: '2026-10-26T03:47:59Z'
                  response:
                    action: contest
                    condition: contested
                    submitted_at: '2026-10-26T03:48:13Z'
        '400':
          description: >-
            The answer is invalid. `details` is keyed by the field at fault:
            `action`, `condition`, `amount`, a field name of the condition, or
            `documents` when fewer than the condition's `min_documents`
            documents are attached. Nothing was recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2_ErrorResponse'
              examples:
                invalid_fields:
                  summary: Invalid fields
                  value:
                    success: false
                    error:
                      code: 40668
                      message: The chargeback response is invalid.
                      details:
                        courier_name: >-
                          Text field 'courier_name' must not contain any of < >
                          [ ] { }
                        tracking: Not a field of this condition.
                        product_details: Required for product_delivered.
                no_document:
                  summary: No document attached
                  value:
                    success: false
                    error:
                      code: 40668
                      message: The chargeback response is invalid.
                      details:
                        documents: Attach at least one document.
        '403':
          description: >-
            The chargeback can't be answered yet because the payment's
            chargeback credentials are not configured for this merchant. Contact
            EximPe support; retrying will not help.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_SERVICE_ERROR_000
                  message: Payment gateway error
                  details:
                    chargeback: >-
                      Chargebacks on this payment cannot be answered yet: the
                      PayU chargeback credentials are not configured for this
                      merchant. Please contact support.
        '404':
          description: >-
            No chargeback with this ID on your payments (or your sub-merchants'
            payments).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2_ErrorResponse'
              example:
                success: false
                error:
                  code: 40669
                  message: Chargeback not found
                  details:
                    chargeback_id: Chargeback not found
        '409':
          description: >-
            The chargeback can no longer be answered: it has an answer already,
            is closed, or another answer to it is in progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2_ErrorResponse'
              example:
                success: false
                error:
                  code: 40666
                  message: This chargeback can no longer be responded to.
                  details: {}
        '502':
          description: >-
            Either the gateway failed and nothing was recorded
            (`ERR_PAYMENT_003`; retry), or the gateway accepted some of your
            documents and then failed (`40670`). For `40670` the contest **is
            registered** and the chargeback is `PENDING_DOC_REVIEW`: do not
            resubmit. `details.failed` names the documents that did not arrive;
            send them to EximPe support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2_ErrorResponse'
              examples:
                partially_delivered:
                  summary: Some documents did not reach the gateway
                  value:
                    success: false
                    error:
                      code: 40670
                      message: >-
                        The contest is registered, but some evidence documents
                        did not reach the gateway. Do not resubmit; the failed
                        documents are listed.
                      details:
                        chargeback: >-
                          The gateway accepted some evidence documents and then
                          failed; the contest is registered without the rest.
                        delivered:
                          - proof_of_delivery
                        failed:
                          - shipping_proof
                gateway_error:
                  summary: Gateway failed; nothing recorded
                  value:
                    success: false
                    error:
                      code: ERR_PAYMENT_003
                      message: API error
                      details:
                        chargeback: >-
                          PayU's chargeback reasons are unavailable right now;
                          please try again in a few minutes.
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v2_ChargebackActionType:
      type: string
      enum:
        - accept
        - contest
        - partial_accept
      description: >-
        `accept`: accept the chargeback in full. `contest`: dispute it with
        evidence. `partial_accept`: accept part of the disputed amount.
    v2_ChargebackDetail:
      allOf:
        - $ref: '#/components/schemas/v2_Chargeback'
        - type: object
          properties:
            response:
              $ref: '#/components/schemas/v2_ChargebackAnswer'
    v2_ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Indicates if the request was successful. Always false for error
            responses.
        error:
          $ref: '#/components/schemas/v2_ErrorDetails'
    v2_Chargeback:
      type: object
      properties:
        chargeback_id:
          type: string
          description: EximPe chargeback ID.
          example: CB6358819770
        payment_id:
          type: string
          description: The disputed payment.
          example: PR1400935863
        order_id:
          type: string
          description: EximPe order ID of the disputed payment.
          example: OD8950153797
        order_reference_id:
          type: string
          nullable: true
          description: Your own reference for the order.
          example: ORDER-10422
        amount:
          type: string
          description: Disputed amount, two decimals, in the payment's currency.
          example: '2500.00'
        status:
          $ref: '#/components/schemas/v2_ChargebackStatus'
        action:
          allOf:
            - $ref: '#/components/schemas/v2_ChargebackActionType'
          nullable: true
          description: How the chargeback was answered; `null` until it is.
        chargeback_type:
          type: string
          description: Kind of dispute raised by the customer's bank.
          example: Chargeback
        reason_description:
          type: string
          description: Why the customer disputed the payment.
          example: Goods or Services Not Provided / Not Received
        raised_on:
          type: string
          format: date-time
          description: When the dispute was raised.
        respond_by:
          type: string
          format: date-time
          nullable: true
          description: >-
            Answer before this time. With no answer by then, the dispute is
            closed in the customer's favour.
        can_respond:
          type: boolean
          description: Whether the chargeback can be answered now.
        created_at:
          type: string
          format: date-time
    v2_ChargebackAnswer:
      type: object
      nullable: true
      description: Your latest answer, or `null` if there is none.
      properties:
        action:
          $ref: '#/components/schemas/v2_ChargebackActionType'
        condition:
          type: string
          nullable: true
          description: >-
            The condition you answered with. `null` for an answer given from the
            merchant dashboard.
          example: product_delivered
        submitted_at:
          type: string
          format: date-time
    v2_ErrorDetails:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code (e.g., ERR_ORDER_002)
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Detailed validation error information with field-specific errors
          additionalProperties:
            type: string
            description: Error message for the specific field
    v2_ChargebackStatus:
      type: string
      enum:
        - NEW
        - PENDING_RESPONSE
        - PENDING_DOC_REVIEW
        - SUBMITTED_TO_BANK
        - INSUFFICIENT_DOCUMENT
        - CLOSED_CUSTOMER_FAVOUR
        - CLOSED_IN_MERCHANT_FAVOUR
        - CLOSED_UNDER_FRAUD_LIABILITY
      description: >-
        Where the chargeback is in its lifecycle. It can be answered only while
        `NEW`, `PENDING_RESPONSE` or `INSUFFICIENT_DOCUMENT` (see
        `can_respond`). `PENDING_DOC_REVIEW`: your answer is in.
        `SUBMITTED_TO_BANK`: your answer has gone to the bank. `CLOSED_*`:
        decided.
  securitySchemes:
    clientAuth:
      type: apiKey
      name: X-Client-ID
      in: header
      description: >-
        **Client Application ID** - Your unique application identifier used to
        authenticate API requests. You can find your Client ID in the Developer
        Settings section of the merchant dashboard.
      x-displayName: Client ID
      x-example: your-client-id
    clientSecretAuth:
      type: apiKey
      name: X-Client-Secret
      in: header
      description: >-
        **Client Secret Key** - Your secret key used alongside the Client ID for
        secure authentication. Keep this confidential and never expose it in
        client-side code. Available in the Developer Settings section of the
        merchant dashboard.
      x-displayName: Client Secret
      x-example: your-client-secret
    apiVersionHeader:
      type: apiKey
      name: X-API-Version
      in: header
      description: >-
        **API Version** - Specifies which version of the API to use (e.g.,
        '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which
        API version your integration uses. Default version information is
        available in the Developer Settings.
      x-displayName: API Version
      x-example: 3.0.0

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.