# Ethoca alert webhook

> Receive Ethoca alert payloads with the alert identifier, original transaction, chargeback details, and handling status.

```yaml
openapi: 3.1.0
info:
  title: Ethoca alert webhook
  version: 1.0.0
  description: Receive Ethoca alert payloads with the alert identifier, original
    transaction, chargeback details, and handling status.
webhooks:
  ethoca.alert.created:
    post:
      summary: Ethoca alert webhook
      description: Receive Ethoca alert payloads with the alert identifier, original
        transaction, chargeback details, and handling status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: number
                  description: Onerway alert notification record ID, used to locate this alert
                    notification record.
                  x-onerway-constraints:
                    - kind: rule
                      text: This value is a large integer. JavaScript systems should preserve it as a
                        string or 64-bit integer to avoid precision loss.
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway, identifying the merchant
                    account receiving this alert.
                  x-onerway-constraints:
                    - kind: rule
                      text: The notification can return this value as a JSON number. Normalize it as a
                        string before storing or comparing it with other Onerway
                        API values.
                ethocaId:
                  type: string
                  description: Unique Ethoca alert identifier. Submit this value when reporting
                    the alert outcome.
                alertType:
                  type: string
                  description: Alert type indicating whether this notification is a customer
                    dispute alert, fraud alert, or chargeback alert.
                  enum:
                    - CustomerDispute
                    - FraudAlert
                    - ChargebackAlert
                  x-enum-descriptions:
                    CustomerDispute: Customer dispute alert.
                    FraudAlert: Fraud alert.
                    ChargebackAlert: Chargeback alert.
                alertTime:
                  type: string
                  description: Alert creation time in `yyyy-MM-dd HH:mm:ss` format.
                alertAge:
                  type:
                    - number
                    - "null"
                  description: Elapsed time between alert creation and this notification. Use it
                    to assess alert age and handling priority.
                  x-onerway-constraints:
                    - kind: rule
                      text: The unit is hours.
                  x-onerway-value:
                    nullable: true
                    when:
                      en: Can return `0` or `null`.
                      zh: 可能返回 `0`，也可能为 `null`，商户应兼容空值。
                txnTime:
                  type: string
                  description: Original transaction time in `yyyy-MM-dd HH:mm:ss` format.
                txnAmount:
                  type: number
                  description: Original transaction amount.
                txnCurrency:
                  type: string
                  description: Original transaction currency, using a three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes)
                    currency code.
                resellerSubMerchantId:
                  type:
                    - string
                    - "null"
                  description: Agency sub-merchant identifier.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Has a value for agency sub-merchant alerts. Regular merchant alerts can be
                        empty.
                      zh: 代理运营商子商户预警通知中有值；普通商户预警通知可能为空。
                billDesc:
                  type: string
                  description: Merchant billing descriptor used to match the alert to merchant
                    information shown on the cardholder statement.
                arn:
                  type: string
                  description: Acquirer Reference Number (ARN), used for reconciliation, alert
                    review, and dispute handling.
                submitOutcomeStatus:
                  type: string
                  description: Alert outcome submission status. Do not treat this field as the
                    final `outcome` value.
                  enum:
                    - PENDING_OUTCOME
                    - OUTCOME_RECEIVED
                  x-enum-descriptions:
                    PENDING_OUTCOME: Pending outcome. The alert is still waiting for outcome
                      submission.
                    OUTCOME_RECEIVED: Outcome received. The alert outcome has been accepted.
                outcome:
                  type:
                    - string
                    - "null"
                  description: Merchant outcome for this alert.
                  enum:
                    - stopped
                    - partially_stopped
                    - previously_cancelled
                    - missed
                    - notfound
                    - account_suspended
                    - in_progress
                    - shipper_contacted
                    - other
                    - resolved
                    - previously_refunded
                    - unresolved_dispute
                    - null
                  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.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returns `null` before the alert is handled or before the outcome is
                        synchronized back.
                      zh: 预警尚未处理或处理结果尚未回填时为 `null`。
                outcomeUpdatedTime:
                  type:
                    - string
                    - "null"
                  description: Alert outcome update time in `yyyy-MM-dd HH:mm:ss` format.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returns `null` before the alert outcome status is updated.
                      zh: 预警处理状态尚未更新时为 `null`。
                refundStatus:
                  type:
                    - string
                    - "null"
                  description: Refund status corresponding to this alert outcome.
                  enum:
                    - refunded
                    - not refunded
                    - not settled
                    - null
                  x-enum-descriptions:
                    refunded: Refund completed.
                    not refunded: No refund was issued.
                    not settled: Refund is processing.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returns `null` before the alert is handled or before refund status is
                        synchronized back.
                      zh: 预警尚未处理或退款状态尚未回填时为 `null`。
                createOpr:
                  type: string
                  description: "Record metadata: identifier of the account or system that created
                    the alert record. Do not use this field to determine alert
                    status or required business action."
                createTime:
                  type: string
                  description: Alert record creation time in Onerway in `yyyy-MM-dd HH:mm:ss`
                    format.
                updateOpr:
                  type: string
                  description: "Record metadata: identifier of the account or system that most
                    recently updated the alert record. Do not use this field to
                    determine alert status or required business action."
                updateTime:
                  type: string
                  description: Most recent alert record update time in Onerway in `yyyy-MM-dd
                    HH:mm:ss` format.
                issuer:
                  type: string
                  description: Issuer identifier. The value format is returned by the alert
                    network.
                cardNumber:
                  type: string
                  description: Card number information associated with the alerted transaction.
                  x-onerway-constraints:
                    - kind: rule
                      text: If the payload contains a full PAN, handle it according to PCI DSS
                        requirements and avoid storing it in logs, support
                        tickets, or ordinary databases.
                ethocaMerchantId:
                  type: string
                  description: Ethoca merchant identifier, used in the Ethoca alert network to
                    match merchants and billing descriptors.
                mcc:
                  type: string
                  description: Merchant Category Code (MCC), usually a four-digit code.
                transactionType:
                  type: string
                  description: Original transaction type or transaction scenario.
                initiatedBy:
                  type: string
                  description: Alert initiator, usually a card network, issuer, or alert network
                    identifier.
                liability:
                  type: string
                  description: Liability marker related to the alert or dispute. Treat it as
                    supporting information, not a replacement for reviewing
                    `alertType`, `outcome`, and refund status.
                authCode:
                  type: string
                  description: Authorization code of the original transaction, usually returned by
                    the issuer or acquiring network after successful
                    authorization.
                integratorMemberId:
                  type: string
                  description: Integrator member ID identifying the integration relationship on
                    the alert network side.
                transactionId:
                  type: string
                  description: Original Onerway transaction ID used to associate transaction
                    query, refund, chargeback, and alert outcome records.
                chargebackReasonCode:
                  type:
                    - string
                    - "null"
                  description: Chargeback or dispute reason code provided by the card network or
                    alert network.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Usually has a value for chargeback-related alerts. It can be empty outside a
                        chargeback context or when the alert network does not
                        provide it.
                      zh: 拒付相关预警中通常有值；非拒付语境或预警网络未提供时可能为空。
                chargebackAmount:
                  type:
                    - number
                    - "null"
                  description: Chargeback or dispute amount associated with the alert. It can be
                    less than or equal to the original transaction amount.
                  x-onerway-value:
                    nullable: true
                    when:
                      en: Usually has a value for chargeback-related alerts. It can be `null` outside
                        a chargeback context or when the alert network does not
                        provide the amount.
                      zh: 拒付相关预警中通常有值；非拒付语境或预警网络未提供金额时可能为空。
                chargebackCurrency:
                  type:
                    - string
                    - "null"
                  description: Chargeback or dispute amount currency, using a three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes)
                    currency code.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Usually has a value for chargeback-related alerts. It can be empty outside a
                        chargeback context or when the alert network does not
                        provide the currency.
                      zh: 拒付相关预警中通常有值；非拒付语境或预警网络未提供币种时可能为空。
            examples:
              ethoca_alert_created:
                summary: Ethoca alert notification
                value:
                  id: 1234567890
                  merchantNo: replace_with_merchant_no
                  ethocaId: replace_with_ethoca_id
                  alertType: ChargebackAlert
                  alertTime: 2025-04-14 14:26:21
                  alertAge: 12
                  txnTime: 2025-04-13 09:15:00
                  txnAmount: 100
                  txnCurrency: USD
                  resellerSubMerchantId: null
                  billDesc: DEMO STORE
                  arn: replace_with_acquirer_reference_number
                  submitOutcomeStatus: PENDING_OUTCOME
                  outcome: null
                  outcomeUpdatedTime: null
                  refundStatus: null
                  createOpr: SYSTEM
                  createTime: 2025-04-14 14:26:21
                  updateOpr: SYSTEM
                  updateTime: 2025-04-14 14:26:21
                  issuer: replace_with_issuer_identifier
                  cardNumber: replace_with_card_number
                  ethocaMerchantId: replace_with_ethoca_merchant_id
                  mcc: "5812"
                  transactionType: eCommerce
                  initiatedBy: replace_with_alert_initiator
                  liability: no
                  authCode: replace_with_authorization_code
                  integratorMemberId: replace_with_integrator_member_id
                  transactionId: replace_with_transaction_id
                  chargebackReasonCode: "4837"
                  chargebackAmount: 100
                  chargebackCurrency: USD
      responses:
        "200":
          description: Return HTTP 200 after the webhook is received and accepted.
```
