You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Authorize.net退款交易报错:transactionRequest含无效子元素payment

解决退款请求报错问题

你提交的退款请求里多传了payment字段,这是报错的核心原因。退款交易(refundTransaction)不需要提供信用卡信息,因为通过refTransId已经关联到了原交易的支付详情,重复提交会触发 schema 校验错误。

修正后的请求数组

Array
(
    [merchantAuthentication] => Array
        (
            [name] => mytestname
            [transactionKey] => mytestkey
        )
    [refId] => 1041-352205
    [transactionRequest] => Array
        (
            [transactionType] => refundTransaction
            [amount] => 29.00
            [currencyCode] => CAD
            [refTransId] => 120053733345
        )
)

关键说明

  • 退款操作仅需指定原交易号(refTransId)、退款金额、交易类型这几个核心参数
  • 原交易的支付信息(信用卡号、有效期)已经存储在支付网关系统中,无需重复提交
  • 保留merchantAuthentication和refId用于身份验证和请求标识即可

内容的提问来源于stack exchange,提问作者Ro Bo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 20:12:02