# Payment result webhook

> Receive ordinary payment result notifications for successful, failed, timed-out, or canceled payment flows.

```yaml
openapi: 3.1.0
info:
  title: Payment result webhook
  version: 1.0.0
  description: Receive ordinary payment result notifications for successful,
    failed, timed-out, or canceled payment flows.
webhooks:
  payment.result:
    post:
      summary: Payment result webhook
      description: Receive ordinary payment result notifications for successful,
        failed, timed-out, or canceled payment flows.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                notifyType:
                  type: string
                  description: Notification type, identifying the webhook business category.
                  x-onerway-constraints:
                    - kind: values
                      text: Fixed to `TXN` for ordinary payment result notifications.
                  x-onerway-signature-participation: included
                transactionId:
                  type: string
                  description: Onerway transaction number generated for this transaction, used for
                    tracking, queries, and idempotent processing.
                  x-onerway-constraints:
                    - kind: rule
                      text: This value is a large-ID-style string. Preserve it as a string in
                        JavaScript systems to avoid precision loss.
                  x-onerway-signature-participation: included
                paymentId:
                  type:
                    - string
                    - "null"
                  description: Payment intent ID used to associate the same payment flow.
                  x-onerway-constraints:
                    - kind: consistency
                      text: Do not confuse it with `transactionId`; `transactionId` identifies a
                        specific transaction, while `paymentId` identifies the
                        payment intent.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returned for transactions that formed a payment intent, including succeeded,
                        failed, or timed-out payments. Checkout cancellation
                        notifications do not return it.
                      zh: 支付成功、支付失败或支付意图超时关闭等已形成支付意图的交易可返回；收银台订单取消通知不返回。
                  x-onerway-signature-participation: included
                txnType:
                  type: string
                  description: Transaction operation type represented by this notification.
                  enum:
                    - SALE
                  x-enum-descriptions:
                    SALE: Payment transaction.
                  x-onerway-constraints:
                    - kind: values
                      text: Fixed to `SALE` for ordinary payment result notifications.
                  x-onerway-signature-participation: included
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway, identifying the merchant
                    account receiving this notification.
                  x-onerway-signature-participation: included
                merchantTxnId:
                  type: string
                  description: Merchant-side transaction number, used for merchant reconciliation,
                    deduplication, and original order association.
                  x-onerway-signature-participation: included
                responseTime:
                  type: string
                  description: Time when Onerway generated this notification result in `yyyy-MM-dd
                    HH:mm:ss` format.
                  x-onerway-signature-participation: included
                txnTime:
                  type: string
                  description: Time when the transaction occurred or reached this transaction
                    state in `yyyy-MM-dd HH:mm:ss` format.
                  x-onerway-signature-participation: included
                txnTimeZone:
                  type: string
                  description: Time zone offset used by `txnTime`, in `±HH:mm` format.
                  x-onerway-signature-participation: included
                orderAmount:
                  type: string
                  description: Original order amount, expressed in `orderCurrency`.
                  x-onerway-constraints:
                    - kind: rule
                      text: Amount values are returned as decimal strings. Avoid binary floating-point
                        arithmetic for money.
                  x-onerway-signature-participation: included
                orderCurrency:
                  type: string
                  description: Original order currency, as a three-letter [ISO
                    4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes)
                    currency code.
                  x-onerway-signature-participation: included
                status:
                  type: string
                  description: Current transaction processing status.
                  enum:
                    - S
                    - F
                    - N
                  x-enum-descriptions:
                    S: Successful transaction.
                    F: Failed transaction.
                    N: Canceled transaction. The transaction was closed because it was not paid
                      within its validity window — for example, the checkout
                      session timed out.
                  x-onerway-constraints:
                    - kind: rule
                      text: "`S` means the transaction succeeded, `F` means it failed or was declined,
                        and `N` means it was canceled. Use this field to
                        determine the result of the current `transactionId`,
                        together with `paymentStatus` for payment-intent state."
                  x-onerway-signature-participation: included
                paymentStatus:
                  type:
                    - string
                    - "null"
                  description: Payment-intent-level status used to read the lifecycle state of the
                    payment intent under the same `paymentId`.
                  enum:
                    - S
                    - O
                    - N
                    - null
                  x-enum-descriptions:
                    S: Payment intent succeeded.
                    O: Payment intent remains open and can be retried.
                    N: Payment intent is closed. It timed out without a successful payment — either
                      no attempt was made or all attempts failed.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Has a value when the payment-intent state is returned. Succeeded payments
                        can return `S`; failed attempts where the payment intent
                        remains retryable can return `O`; timed-out payment
                        intents can return `N`. Checkout cancellation
                        notifications do not return it.
                      zh: 返回支付意图状态时有值；普通成功可返回 `S`，失败后支付意图仍可继续尝试时可返回 `O`，支付意图超时关闭时可返回 `N`；收银台订单取消通知不返回。
                  x-onerway-signature-participation: included
                eci:
                  type:
                    - string
                    - "null"
                  description: Electronic Commerce Indicator (ECI), indicating the 3DS
                    authentication state related to the transaction.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Has a value when card, 3DS, or wallet transactions return ECI.
                      zh: 卡交易或 3DS / wallet 交易返回 ECI 时有值。
                  x-onerway-signature-participation: included
                cardBinCountry:
                  type:
                    - string
                    - "null"
                  description: Card BIN country or region, as an [ISO 3166-1
                    alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
                    two-letter code.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Has a value when this is a card transaction and the card BIN country or
                        region can be identified. Local payments or flows with
                        no selected card may omit it.
                      zh: 卡交易且可识别卡 BIN 所属国家 / 地区时有值；本地支付或未选定卡时可能不返回。
                  x-onerway-signature-participation: included
                reason:
                  type: string
                  description: Transaction result reason object, carried as a JSON string in the
                    notification.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      respCode:
                        type: string
                        description: Result code. `20000` means success, failure result codes represent
                          failure reasons, and `50030` represents checkout
                          cancellation.
                      respMsg:
                        type: string
                        description: Human-readable message for the result code.
                  x-onerway-format: json_string
                  x-onerway-signature-participation: included
                sign:
                  type: string
                  description: Legacy signature string kept for compatibility. It is computed with
                    only the first enabled key and can mismatch your configured
                    key during key rotation; verify notifications with the
                    `X-Rh-Signature` header instead.
                  x-onerway-constraints:
                    - kind: rule
                      text: Exclude `sign` itself from the canonical string when verifying this
                        webhook.
                  x-onerway-signature-participation: signature-field
                paymentMethod:
                  type:
                    - string
                    - "null"
                  description: Payment method or card brand used by this transaction.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returned when a payment method has been selected. Checkout cancellation
                        notifications do not return it.
                      zh: 已选定支付方式时返回；收银台订单取消通知不返回。
                  x-onerway-signature-participation: excluded
                metaData:
                  type:
                    - string
                    - "null"
                  description: Merchant-defined transaction metadata returned according to the
                    request value.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returned when `metaData` was provided in the payment request. It can be
                        empty or omitted when no value is available.
                      zh: 支付请求传入 `metaData` 时返回；未传入或无可返回数据时可能为空或不返回。
                  x-onerway-signature-participation: included
                walletTypeName:
                  type:
                    - string
                    - "null"
                  description: Wallet type name.
                  enum:
                    - GooglePay
                    - ApplePay
                    - EXPR
                    - JIOU
                    - XJK
                    - null
                  x-enum-descriptions:
                    GooglePay: Google Pay wallet.
                    ApplePay: Apple Pay wallet.
                    EXPR: "Wallet funding source: bank card."
                    JIOU: "Wallet funding source: Baitiao."
                    XJK: "Wallet funding source: Xiaojinku."
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returned for wallet payment scenarios. Non-wallet payments do not return it.
                      zh: 钱包支付场景返回；非钱包支付不返回。
                  x-onerway-signature-participation: excluded
                channelRequestId:
                  type:
                    - string
                    - "null"
                  description: Payment channel or processor request identifier, used for
                    channel-side reconciliation or troubleshooting.
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Returned after the transaction enters channel processing and a channel
                        request identifier is generated. Checkout cancellation
                        notifications do not return it.
                      zh: 交易进入支付渠道处理并生成渠道请求标识后返回；收银台订单取消通知不返回。
                  x-onerway-signature-participation: included
                products:
                  type:
                    - string
                    - "null"
                  description: Order product list, carried as a JSON string in the notification.
                  contentMediaType: application/json
                  contentSchema:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Product name.
                        price:
                          type: string
                          description: Product unit price as a decimal string.
                          x-onerway-constraints:
                            - kind: rule
                              text: Amount values are returned as decimal strings. Avoid binary floating-point
                                arithmetic for money.
                        num:
                          type: string
                          description: Product quantity.
                          x-onerway-constraints:
                            - kind: rule
                              text: This value can be returned as either a string or a JSON number. Normalize
                                it before downstream reconciliation.
                        currency:
                          type: string
                          description: Product currency, as 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: Has a value when checkout order product information is returned with the
                        notification. Ordinary card or local-payment
                        notifications may omit it.
                      zh: 收银台订单商品信息随通知返回时有值；普通卡支付 / 本地支付通知可能不返回。
                  x-onerway-format: json_string
                  x-onerway-signature-participation: included
                paymentMethodDetails:
                  type:
                    - string
                    - "null"
                  description: Payment method details object. Card transaction details are under
                    the `card` child object.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      card:
                        type:
                          - object
                          - "null"
                        properties:
                          checks:
                            type:
                              - object
                              - "null"
                            properties:
                              addressCheck:
                                type:
                                  - string
                                  - "null"
                                description: AVS street-address check result.
                                enum:
                                  - pass
                                  - fail
                                  - unavailable
                                  - unchecked
                                  - notProvided
                                  - unsupported
                                  - null
                                x-enum-descriptions:
                                  pass: The information submitted for verification matches issuer records.
                                  fail: The information submitted for verification does not match issuer records.
                                  unavailable: The issuer does not support this verification.
                                  unchecked: Verification was not performed.
                                  notProvided: The information required for this verification was not provided.
                                  unsupported: AVS is not supported for this transaction.
                                x-onerway-value:
                                  nullable: true
                                  when:
                                    en: Has a value when AVS street-address verification was performed.
                                    zh: 执行 AVS 街道地址校验时有值。
                              postalCodeCheck:
                                type:
                                  - string
                                  - "null"
                                description: AVS postal-code check result.
                                enum:
                                  - pass
                                  - fail
                                  - unavailable
                                  - unchecked
                                  - notProvided
                                  - unsupported
                                  - null
                                x-enum-descriptions:
                                  pass: The information submitted for verification matches issuer records.
                                  fail: The information submitted for verification does not match issuer records.
                                  unavailable: The issuer does not support this verification.
                                  unchecked: Verification was not performed.
                                  notProvided: The information required for this verification was not provided.
                                  unsupported: AVS is not supported for this transaction.
                                x-onerway-value:
                                  nullable: true
                                  when:
                                    en: Has a value when AVS postal-code verification was performed.
                                    zh: 执行 AVS 邮编校验时有值。
                              cardholderNameCheck:
                                type:
                                  - string
                                  - "null"
                                description: American Express AVS result indicating whether the cardholder name
                                  matches issuer records.
                                enum:
                                  - pass
                                  - fail
                                  - unavailable
                                  - unchecked
                                  - notProvided
                                  - unsupported
                                  - null
                                x-enum-descriptions:
                                  pass: The information submitted for verification matches issuer records.
                                  fail: The information submitted for verification does not match issuer records.
                                  unavailable: The issuer does not support this verification.
                                  unchecked: Verification was not performed.
                                  notProvided: The information required for this verification was not provided.
                                  unsupported: AVS is not supported for this transaction.
                                x-onerway-value:
                                  nullable: true
                                  when:
                                    en: Returns the result when American Express cardholder name verification is
                                      performed, or `null` if it is not
                                      performed.
                                    zh: 执行 American Express 持卡人姓名验证时返回验证结果；未执行时返回 `null`。
                              avsResultRawCode:
                                type:
                                  - string
                                  - "null"
                                description: Raw AVS result code returned by the card network.
                                enum:
                                  - N
                                  - S
                                  - U
                                  - R
                                  - W
                                  - Z
                                  - X
                                  - Y
                                  - M
                                  - F
                                  - D
                                  - A
                                  - B
                                  - P
                                  - G
                                  - I
                                  - C
                                  - FD
                                  - NP
                                  - null
                                x-enum-descriptions:
                                  N: Postal code and street address both do not match.
                                  S: AVS is not supported.
                                  U: Verification service unavailable.
                                  R: System unable to perform verification.
                                  W: Nine-digit postal code matches; address does not match.
                                  Z: Five-digit postal code matches; address does not match.
                                  X: Nine-digit postal code and address both match.
                                  Y: Five-digit postal code and address both match.
                                  M: Address and postal code match for an international transaction.
                                  F: Address and postal code match for a United Kingdom transaction.
                                  D: Address and postal code match for an international transaction.
                                  A: Address matches; postal code does not match.
                                  B: Address matches; postal code was not verified.
                                  P: Postal code matches; address was not verified.
                                  G: Non-US AVS participant.
                                  I: International address was not verified.
                                  C: Address and postal code were not verified for a non-US Visa card.
                                  FD: AVS verification unavailable in Onerway.
                                  NP: Address and postal code were not provided.
                                x-onerway-value:
                                  nullable: true
                                  when:
                                    en: Has a value when the card network or Onerway returns a raw AVS result code.
                                    zh: 卡组织或 Onerway 返回原始 AVS 结果码时有值。
                              threeDSecureResult:
                                type:
                                  - object
                                  - "null"
                                properties:
                                  version:
                                    type: string
                                    description: 3D Secure protocol version or `UNKNOWN`.
                                  authenticationFlow:
                                    type:
                                      - string
                                      - "null"
                                    description: 3DS authentication flow type.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the 3DS authentication flow can be identified.
                                        zh: 可识别 3DS 认证流程时有值。
                                  chargebackLiability:
                                    type: string
                                    description: 3DS chargeback liability party or `UNKNOWN`.
                                  transStatus:
                                    type:
                                      - string
                                      - "null"
                                    description: 3DS authentication result.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when ACS returns an authentication status.
                                        zh: ACS 返回认证状态时有值。
                                  transStatusReason:
                                    type:
                                      - string
                                      - "null"
                                    description: Detailed reason for the 3DS authentication status.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the authentication status includes a detailed reason.
                                        zh: 需要补充说明 3DS 认证状态时有值。
                                  veresEnrolled:
                                    type:
                                      - string
                                      - "null"
                                    description: 3DS enrollment result.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the 3DS enrollment result is returned.
                                        zh: 3DS enrollment 结果返回时有值。
                                  eci:
                                    type:
                                      - string
                                      - "null"
                                    description: Electronic Commerce Indicator (ECI).
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the 3DS result returns ECI.
                                        zh: 3DS 结果返回 ECI 时有值。
                                  cvvResult:
                                    type:
                                      - string
                                      - "null"
                                    description: CVV security-code check result.
                                    enum:
                                      - M
                                      - N
                                      - P
                                      - S
                                      - U
                                      - I
                                      - null
                                    x-enum-descriptions:
                                      M: CVV matched issuer records.
                                      N: CVV did not match issuer records.
                                      P: CVV processing error.
                                      S: CVV was not provided.
                                      U: Verification service unavailable or unknown.
                                      I: CVV format invalid.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the CVV check result is returned.
                                        zh: CVV 校验结果返回时有值。
                                  avsFullResult:
                                    type:
                                      - string
                                      - "null"
                                    description: AVS full address verification result.
                                    enum:
                                      - Y
                                      - N
                                      - A
                                      - Z
                                      - U
                                      - null
                                    x-enum-descriptions:
                                      Y: Postal code and street address both match.
                                      N: Postal code and street address both do not match.
                                      A: Street address matches; postal code does not match.
                                      Z: Postal code matches; street address does not match.
                                      U: Address verification service unavailable.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when the AVS full-result value is returned.
                                        zh: AVS 综合校验结果返回时有值。
                                  cavvResult:
                                    type:
                                      - string
                                      - "null"
                                    description: CAVV cryptogram returned by 3DS authentication.
                                    x-onerway-value:
                                      nullable: true
                                      when:
                                        en: Has a value when 3DS authentication returns CAVV.
                                        zh: 3DS 认证返回 CAVV 时有值。
                                description: 3D Secure verification result.
                                x-onerway-value:
                                  nullable: true
                                  when:
                                    en: Has a value when 3DS verification results are returned.
                                    zh: 返回 3DS 验证结果时有值。
                            description: Verification check results, including AVS and 3DS results.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when the payment channel returns AVS, 3DS, or CVV verification
                                  results.
                                zh: 支付渠道返回 AVS / 3DS / CVV 验证结果时有值；未执行或未返回验证结果时可为 `null`。
                          holderName:
                            type:
                              - string
                              - "null"
                            description: Cardholder name.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when cardholder name is returned; wallet transactions can return
                                  `null`.
                                zh: 支付方式详情返回持卡人姓名时有值；钱包交易可能为 `null`。
                          year:
                            type:
                              - string
                              - "null"
                            description: Card expiry year, four digits.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when card expiry year is returned.
                                zh: 返回卡有效期时有值。
                          month:
                            type:
                              - string
                              - "null"
                            description: Card expiry month, two digits (`01`-`12`).
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when card expiry month is returned.
                                zh: 返回卡有效期时有值。
                          cardType:
                            type:
                              - string
                              - "null"
                            description: Card brand or card network.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when the card network returns the card brand.
                                zh: 卡组织返回卡类型时有值。
                          productCategory:
                            type:
                              - string
                              - "null"
                            description: Card product category.
                            enum:
                              - D
                              - P
                              - C
                              - H
                              - R
                              - N
                              - null
                            x-enum-descriptions:
                              D: Debit
                              P: Prepaid
                              C: Credit
                              H: Charge Card
                              R: Deferred Debit
                              N: Unknown
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when the card network returns the product category.
                                zh: 卡组织返回卡产品类别时有值。
                          issuer:
                            type:
                              - string
                              - "null"
                            description: Issuer name.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when the issuer can be identified.
                                zh: 可识别发卡行时有值。
                          cardBinCountry:
                            type:
                              - string
                              - "null"
                            description: Card BIN country or region.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when the card BIN country or region can be identified.
                                zh: 可识别卡 BIN 所属国家 / 地区时有值。
                          authorizationCode:
                            type:
                              - string
                              - "null"
                            description: Issuer or acquiring-side authorization code, used for
                              reconciliation and dispute handling.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when a card transaction is authorized successfully and an
                                  authorization code is returned.
                                zh: 卡交易授权成功并返回授权码时有值。
                          cardNumber:
                            type:
                              - string
                              - "null"
                            description: Masked card number, keeping only the first 6 and last 4 digits.
                            x-onerway-value:
                              nullable: true
                              when:
                                en: Has a value when masked card number is returned.
                                zh: 返回脱敏卡号时有值。
                        description: Card payment method details.
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Has a value when card or wallet-card details are returned.
                            zh: 卡支付或钱包卡交易返回卡详情时有值。
                  x-onerway-value:
                    nullable: true
                    empty: true
                    when:
                      en: Has a value when payment method details are returned. Card payment success,
                        failure, and payment-intent timeout notifications can
                        return it; local payments, simplified wallet
                        notifications, or order cancellations may omit it.
                      zh: 返回支付方式详情时有值；卡支付成功、支付失败或支付意图超时关闭均可能返回；本地支付、钱包简化通知或订单取消等场景可能不返回。
                  x-onerway-format: json_string
                  x-onerway-signature-participation: included
            examples:
              payment_result_success:
                summary: Payment succeeded
                value:
                  notifyType: TXN
                  transactionId: replace_with_transaction_id
                  paymentId: replace_with_payment_id
                  txnType: SALE
                  merchantNo: replace_with_merchant_no
                  merchantTxnId: replace_with_merchant_transaction_id
                  responseTime: 2026-06-25 13:52:23
                  txnTime: 2026-06-25 13:51:10
                  txnTimeZone: +08:00
                  orderAmount: "9.99"
                  orderCurrency: USD
                  status: S
                  paymentStatus: S
                  eci: "5"
                  cardBinCountry: US
                  reason: '{"respCode":"20000","respMsg":"Success"}'
                  sign: replace_with_sha256_signature
                  paymentMethod: MASTERCARD
                  metaData: '{"orderSource":"web","campaignId":"spring_sale"}'
                  channelRequestId: replace_with_channel_request_id
              payment_result_checkout_cancelled:
                summary: Checkout canceled
                value:
                  notifyType: TXN
                  transactionId: replace_with_transaction_id
                  txnType: SALE
                  merchantNo: replace_with_merchant_no
                  merchantTxnId: replace_with_merchant_transaction_id
                  responseTime: 2026-06-25 13:52:23
                  txnTime: 2026-06-25 13:51:10
                  txnTimeZone: +08:00
                  orderAmount: "9.99"
                  orderCurrency: USD
                  status: N
                  reason: '{"respCode":"50030","respMsg":"Order canceled"}'
                  sign: replace_with_sha256_signature
      responses:
        "200":
          description: Return HTTP 200 with the received `transactionId` as the raw
            response body after the payment result webhook is received and
            accepted.
          content:
            text/plain:
              schema:
                type: string
              examples:
                return_transaction_id:
                  summary: Return transactionId
                  description: Use a `text/plain` response whose body is the `transactionId` from
                    the received webhook payload. Do not return the fixed
                    example value.
                  value: replace_with_transaction_id
```
