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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Settle a Pre-chargeback Alert

> Tells Yuno, and through Yuno the alert network, what you did with an Ethoca or Verifi pre-chargeback alert.

When an Ethoca or Verifi alert matches one of your payments, Yuno adds a transaction of type `PRE_CHARGEBACK` in status `PENDING_REVIEW` and sends you a webhook with the alert's `deadline`. Call this endpoint before that deadline to report your outcome. See [Pre-chargeback alerts](https://docs.y.uno/docs/payouts-and-disputes/chargeback-management.md#pre-chargeback-alerts-ethoca-and-verifi) for the full flow.

The transaction must be of type `PRE_CHARGEBACK` and in status `PENDING_REVIEW`. Otherwise the API answers 400 `INVALID_TRANSACTION_TYPE` or `INVALID_STATUS`.

> [!NOTE]
>
> **Outcomes**
>
> | `reason` | Use it when | What Yuno does |
> | - | - | - |
> | `REFUNDED` | You give the cardholder the money back | Refunds whatever part of the alerted amount is not refunded yet, then answers the network. The transaction stays `PENDING_REVIEW` until the refund is confirmed. A repeated call does not refund twice |
> | `RESOLVED` | You handled it without a refund | Answers the network |
> | `CANCELLED` | The authorization or the order was cancelled | Answers the network |
> | `ORDER_STOPPED` | Intended for fraud alerts: you stopped the order | Answers the network and pauses the subscription behind the payment |
> | `SERVICE_SUSPENDED` | Intended for fraud alerts: you suspended the service | Answers the network and pauses the subscription behind the payment |
> | `DISMISS` | You decline the alert | Answers the network. A subscription paused by an alert on this payment resumes when no other alert on it is open |
>
> Any other value is refused with 400 `INVALID_RESOLUTION`. You can also send the outcome in the optional `resolution` field, which takes the same values and wins over `reason` when both are present. Send `status` as `SETTLED`.

> [!NOTE]
>
> **You may not need to call this endpoint**
>
> * A refund made through the [refund endpoint](https://docs.y.uno/reference/payments/refund-payment.md) that covers the alerted amount closes the alert as `REFUNDED` and answers the network for you.
> * If the payment was already fully refunded when the alert arrived, Yuno closes the alert as soon as it arrives.
> * If nobody answers, Yuno answers the network shortly before the deadline. With a confirmed refund covering the alert it answers `REFUNDED` and the transaction moves to `SUCCEEDED`. Otherwise, including a failed or partial refund, it answers `MISSED` and the transaction moves to `EXPIRED`.
> * A refund still pending at the deadline leaves the alert open in `PENDING_REVIEW`, and Yuno sends nothing.

> [!WARNING]
>
> Pre-chargeback alerts exist only in production. There is no sandbox trigger for them today.

Note that this request requires an `X-Idempotency-Key`. Check the [Authentication](https://docs.y.uno/reference/authentication.md#idempotency) page for more information.


## OpenAPI

````yaml openapi/payments/settle-pre-chargeback.json POST /payments/{payment_id}/transactions/{transaction_id}/settle
openapi: 3.1.0
info:
  title: payment-api-settle-pre-chargeback
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
    sec2: []
paths:
  /payments/{payment_id}/transactions/{transaction_id}/settle:
    post:
      summary: Settle a pre-chargeback alert
      description: >-
        Records your outcome for an Ethoca or Verifi pre-chargeback alert and
        forwards it to the alert network. The transaction must be of type
        PRE_CHARGEBACK and in status PENDING_REVIEW. With reason REFUNDED, Yuno
        first refunds whatever part of the alerted amount is not refunded yet,
        so you do not need a separate refund call.
      operationId: settlePreChargeback
      parameters:
        - name: payment_id
          in: path
          required: true
          description: The unique identifier of the payment (UUID, 36 chars).
          schema:
            type: string
        - name: transaction_id
          in: path
          required: true
          description: >-
            The id of the PRE_CHARGEBACK transaction that the alert created
            (UUID, 36 chars). The API calls this path parameter
            transaction_code.
          schema:
            type: string
        - name: X-Idempotency-Key
          in: header
          required: true
          description: >-
            Unique identifier used in HTTP headers to ensure that a request is
            processed only once, even if it is retried due to network issues or
            timeouts.
          schema:
            type: string
            example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - description
                - status
                - reason
                - merchant_reference
              properties:
                reason:
                  type: string
                  description: >-
                    Your outcome for the alert. REFUNDED: full refund (Yuno
                    issues the missing refund). RESOLVED: handled without a
                    refund. CANCELLED: authorization or order cancelled.
                    ORDER_STOPPED and SERVICE_SUSPENDED: intended for fraud
                    alerts, and they pause the subscription behind the payment.
                    DISMISS: you decline the alert.
                  enum:
                    - REFUNDED
                    - RESOLVED
                    - CANCELLED
                    - ORDER_STOPPED
                    - SERVICE_SUSPENDED
                    - DISMISS
                resolution:
                  type: string
                  description: >-
                    Optional. Same values as reason. When you send it, Yuno uses
                    it as the outcome instead of reason.
                  enum:
                    - REFUNDED
                    - RESOLVED
                    - CANCELLED
                    - ORDER_STOPPED
                    - SERVICE_SUSPENDED
                    - DISMISS
                status:
                  type: string
                  description: Whether you settled the alert.
                  enum:
                    - SETTLED
                    - NOT_SETTLED
                description:
                  type: string
                  description: Free text describing what you did.
                merchant_reference:
                  type: string
                  description: >-
                    Your own reference for this answer, for example your case
                    id.
            examples:
              Refund and settle:
                value:
                  reason: REFUNDED
                  status: SETTLED
                  description: Refunded after Ethoca alert
                  merchant_reference: case-48211
      responses:
        '201':
          description: >-
            The outcome was recorded and sent to the alert network. The response
            describes the PRE_CHARGEBACK transaction and its payment.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The PRE_CHARGEBACK transaction after your answer. Nullable
                  fields are always present and come back as null.
                properties:
                  code:
                    type: string
                    description: The PRE_CHARGEBACK transaction id.
                  type:
                    type: string
                    description: Always PRE_CHARGEBACK.
                  status:
                    type: string
                    description: >-
                      Transaction status. With REFUNDED, PENDING_REVIEW until
                      the refund is confirmed, when the settle issues the refund
                      or one is still in flight. Otherwise, the status you sent
                      (SETTLED).
                  reason:
                    type:
                      - string
                      - 'null'
                    description: The reason you sent.
                  merchant_reference:
                    type: string
                    description: The merchant_reference you sent.
                  response_code:
                    type:
                      - string
                      - 'null'
                    description: Response code.
                  response_message:
                    type:
                      - string
                      - 'null'
                    description: Response message.
                  resolution:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The outcome recorded on the alert. null when a REFUNDED
                      settle issues the refund or waits for one in flight; the
                      outcome is then in reason.
                  category:
                    type: string
                    description: Payment method category, for example CARD.
                  amount:
                    type: object
                    properties:
                      value:
                        type: number
                        description: Amount.
                      captured:
                        type:
                          - number
                          - 'null'
                        description: Captured amount.
                      refunded:
                        type:
                          - number
                          - 'null'
                        description: Refunded amount.
                      currency:
                        type: string
                        description: ISO 4217 currency code.
                    description: Alerted amount.
                  provider_data:
                    type: object
                    description: The alert network data.
                    properties:
                      id:
                        type: string
                        description: Alert network, ETHOCA or VERIFI.
                      transaction_id:
                        type: string
                        description: The network's alert id.
                      account_id:
                        type: string
                        description: Provider account id.
                      status:
                        type:
                          - string
                          - 'null'
                        description: Provider status.
                      status_detail:
                        type:
                          - string
                          - 'null'
                        description: Provider status detail.
                      raw_response:
                        type:
                          - object
                          - 'null'
                        properties:
                          detail:
                            type: string
                            description: Detail.
                          timestamp:
                            type: string
                            description: Timestamp.
                  payment:
                    type: object
                    description: The payment the alert matched.
                    properties:
                      code:
                        type: string
                        description: Payment id.
                      account_id:
                        type: string
                        description: Account id.
                      account_code:
                        type: string
                        description: Same value as account_id.
                      description:
                        type:
                          - string
                          - 'null'
                        description: Payment description.
                      country:
                        type: string
                        description: Country code.
                      status:
                        type: string
                        description: Payment status.
                      merchant_order_id:
                        type: string
                        description: Your order id.
                      created_at:
                        type: string
                        description: Creation time.
                        format: date-time
                      updated_at:
                        type: string
                        description: Last update time.
                        format: date-time
                      amount:
                        type: object
                        properties:
                          value:
                            type: number
                            description: Amount.
                          captured:
                            type:
                              - number
                              - 'null'
                            description: Captured amount.
                          refunded:
                            type:
                              - number
                              - 'null'
                            description: Refunded amount.
                          currency:
                            type: string
                            description: ISO 4217 currency code.
                        description: Payment amount.
                  created_at:
                    type: string
                    description: Creation time.
                    format: date-time
                  updated_at:
                    type: string
                    description: Last update time.
                    format: date-time
              examples:
                Success:
                  value:
                    code: 9a3c1f62-2b7e-4d41-8f0e-4c6d2a91b7e5
                    type: PRE_CHARGEBACK
                    status: PENDING_REVIEW
                    reason: REFUNDED
                    merchant_reference: case-48211
                    response_code: PENDING
                    response_message: Notification pre chargeback
                    resolution: null
                    category: CARD
                    amount:
                      value: 29.9
                      captured: null
                      refunded: null
                      currency: EUR
                    provider_data:
                      id: ETHOCA
                      transaction_id: ALERT_ID
                      account_id: ''
                      status: null
                      status_detail: null
                      raw_response: null
                    payment:
                      code: 4f1d2c7a-8b3e-4a5f-9c6d-2e1b0a9f8c7d
                      account_id: 7c2e9d14-5a6b-4c3d-8e2f-1a0b9c8d7e6f
                      account_code: 7c2e9d14-5a6b-4c3d-8e2f-1a0b9c8d7e6f
                      description: Annual plan
                      country: ES
                      status: SUCCEEDED
                      merchant_order_id: order-77310
                      created_at: '2026-11-18T10:02:44Z'
                      updated_at: '2026-11-20T15:40:11Z'
                      amount:
                        value: 29.9
                        captured: 29.9
                        refunded: 0
                        currency: EUR
                    created_at: '2026-11-20T09:12:03Z'
                    updated_at: '2026-11-20T15:40:11Z'
        '400':
          description: >-
            The request was refused. Codes: INVALID_PARAMETERS (payment_id or
            transaction_id is not a UUID v4), INVALID_RESOLUTION (outcome not in
            the list; the message lists the allowed values),
            INVALID_TRANSACTION_TYPE (not a PRE_CHARGEBACK), INVALID_STATUS (the
            alert is not waiting for an outcome), TRANSACTION_NOT_FOUND,
            SETTLE_FAILED (the alert network did not accept the answer),
            SETTLE_REFUND_INSUFFICIENT_BALANCE, SETTLE_REFUND_CURRENCY_MISMATCH
            (the alert is in another currency than the payment, so no refund is
            issued), SETTLE_REFUND_FAILED.
          content:
            application/json:
              examples:
                Invalid outcome:
                  value:
                    code: INVALID_RESOLUTION
                    messages:
                      - >-
                        Invalid resolution. Allowed values: RESOLVED, REFUNDED,
                        CANCELLED, ORDER_STOPPED, SERVICE_SUSPENDED, DISMISS.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            OPERATION_NOT_ALLOWED_FOR_REPORTED_PAYMENT: the payment is a
            reported payment.
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      x-default: <Your public-api-key>
      name: public-api-key
    sec1:
      type: apiKey
      in: header
      x-default: <Your private-secret-key>
      name: private-secret-key
    sec2:
      type: apiKey
      in: header
      x-default: <Your X-Idempotency-Key>
      name: X-Idempotency-Key

````

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