# Submit Ethoca alert outcome

> Submit the handling outcome and refund status for an Ethoca alert.

```yaml
openapi: 3.1.0
x-onerway-docs-version: v2
x-onerway-spec-key: payments/versions/v2/ethoca/submit-ethoca-alert-outcome
info:
  title: Submit Ethoca alert outcome
  version: v2
  description: Submit the handling outcome and refund status for an Ethoca alert.
servers:
  - url: https://sandbox-payment-api.onerway.com
    description: sandbox
  - url: https://payment-api.onerway.com
    description: production
paths:
  /ethoca/agency-cw/outcome:
    post:
      summary: Submit Ethoca alert outcome
      description: Submit the handling outcome and refund status for an Ethoca alert.
      parameters:
        - name: ApiKey
          in: header
          required: true
          description: API key for the merchant account. Send it in the `ApiKey` request
            header. See
            [Authentication](/payments/versions/v2/get-started/authentication).
          schema:
            type: string
            description: API key for the merchant account. Send it in the `ApiKey` request
              header. See
              [Authentication](/payments/versions/v2/get-started/authentication).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. It limits the outcome
                    submission to alerts under one merchant account.
                ethocaId:
                  type: string
                  description: Unique Ethoca alert identifier identifying the alert record whose
                    outcome is being submitted.
                outcome:
                  type: string
                  description: Merchant outcome for this alert, reported to Ethoca or the issuer
                    network.
                  enum:
                    - stopped
                    - partially_stopped
                    - previously_cancelled
                    - missed
                    - notfound
                    - account_suspended
                    - in_progress
                    - shipper_contacted
                    - other
                    - resolved
                    - previously_refunded
                    - unresolved_dispute
                  x-enum-descriptions:
                    stopped: Order stopped.
                    partially_stopped: Order partially stopped.
                    previously_cancelled: Transaction previously cancelled.
                    missed: Expired; the order has shipped or the service has been consumed.
                    notfound: Related order not found.
                    account_suspended: Account suspended.
                    in_progress: Request in progress.
                    shipper_contacted: Shipper contacted to attempt shipment interception.
                    other: Other situation not listed.
                    resolved: Resolved.
                    previously_refunded: Previously refunded.
                    unresolved_dispute: Unresolved dispute.
                refundStatus:
                  type: string
                  description: Refund status corresponding to this outcome, explaining whether
                    funds have been returned.
                  enum:
                    - refunded
                    - not refunded
                    - not settled
                  x-enum-descriptions:
                    refunded: Refund completed.
                    not refunded: No refund was issued.
                    not settled: Refund is processing.
              required:
                - merchantNo
                - ethocaId
                - outcome
                - refundStatus
            examples:
              submit-ethoca-alert-outcome:
                summary: Submit Ethoca alert outcome
                value:
                  ethocaId: replace_with_ethoca_id
                  merchantNo: replace_with_merchant_no
                  outcome: previously_refunded
                  refundStatus: refunded
      responses:
        "200":
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: "`20000` means the outcome submission request was processed
                      successfully. Other values are error codes. See [Response
                      codes](/payments/versions/v2/api-reference/response-codes\
                      )."
                  respMsg:
                    type: string
                    description: Human-readable message for the response code.
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: Whether this alert outcome was submitted successfully. `true` means
                          Onerway accepted this report; read the latest
                          `outcome` and `refundStatus` through [Query Ethoca
                          alerts](/payments/versions/v2/api-reference/endpoints/query-ethoca-alerts).
                      sign:
                        type: string
                        description: Response signature string for verifying response integrity.
                    description: Business data object indicating whether this alert outcome
                      submission succeeded.
      security:
        - apiKeyAuth:
            []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ApiKey
```
