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

如何通过FedEx REST API设置DDU(收件人付税)发货?

问题

使用FedEx REST API发货时,DDP(发货人付税)的实现代码如下:

$rate_data ["requestedShipment"]["customsClearanceDetail"] = [ 
    'dutiesPayment' => [
        'paymentType' => 'SENDER',
        'payor' => [
            'responsibleParty' => [
                'accountNumber' => [
                    'value' => ACCOUNT_NUM
                ]
            ]
        ]
    ],
    'commodities' => $commodities,
];

但设置DDU(收件人付税)时遇到问题:原本以为只需将'paymentType'改为'RECEIVER',但操作后FedEx返回错误:

[errors] => Array
    (
        [0] => Array
            (
                [code] => RATE.PAYMENTTYPE.NOTALLOWED
                [message] => Selected Payment Type is not allowed. Only allowed payment type is SENDER. Please update and try again.
            )

    )

查阅文档发现PaymentType仅支持SENDER作为有效值,请问该如何设置让收件人支付税费?

解决方案

FedEx REST API中,DDU(收件人付税)是默认模式,不需要配置dutiesPayment节点。当你省略该节点时,系统会自动认定由收件人承担进口税费及清关费用。

修改后的代码如下:

$rate_data ["requestedShipment"]["customsClearanceDetail"] = [ 
    'commodities' => $commodities,
];

API的设计逻辑是:仅当需要发货人承担税费(DDP)时,才需配置dutiesPayment并指定paymentType为SENDER,DDU无需额外设置。

内容的提问来源于stack exchange,提问作者Scott C Wilson

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.12 11:12:36