获取单笔退款详情
获取单笔退款详情
1.请求参数:
请求URL:
参数名 | 类型 | 说明 | 示例 |
---|---|---|---|
appid | String | 合作伙伴AppId | uwkahf@jfs92 |
timestamp | String | 当前时间戳 | |
tb_seller_nick | String | 淘宝卖家店铺登录账号,非店铺名称 | kingdo |
sign | String | 接口签名 | 如何计算生成见示例代码 |
refund_id | String | 必填, 退款单号 | 比如106322832633563058 |
sysid | String | 代表不同的应用,具体请咨询客服,否则接口会调用失败 | 100 |
2. 请求示例代码(Java)
@Test
public void getRefundDtail() throws Exception {
String tb_seller_nick = Config.TBSellerNick ;
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("tb_seller_nick", tb_seller_nick);
// 退款单号
data.put("refund_id", "106322832633563058");
// 签名
data.put("sign", Utils.Sign(data,Config.AppSecret));
// 调用服务API
doHttpRequest(Config.TaoBaoRefundDetailUrl ,data);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": {
"refund": {
"address": "陈海霞, 13816228822, 上海上海市浦东新区博华路1号2号, 201204",
"advance_status": 0,
"alipay_no": "2021092322001164271454601524",
"attribute": ";reason:403676;bizCode:taobao.general.refund;leavesCat:50015766;apply_reason_text:拍错/多拍;itemBuyAmount:1;interceptItemListResult:[{\"subBizOrderId\"#3B2130415454315565830,\"logisticInterceptEnum\"#3B\"INTERCEPT_NOT_APPLY\"}];seller_batch:true;logisticsCompanyName:顺丰速运;clj_zero_second_refund:1;freezeGoodsOutId:132032916631563058;sku:3977338583163|尺码#3B36#3A颜色#3Bred;sgr:1;bgmtc:2021-09-23 18#3B46#3B41;sellerDoRefundNick:百鞋馆;shop_name:百鞋馆;ttid:201200@taobao_iphone_10.3.0;rp3:1;seller_agreed_refund_fee:1000;afterlast:1;isVirtual:0;EXmrf:1000;refundFrom:2;enfunddetail:1;gaia:2;lastOrder:500;tod:604800000;newRefund:rp2;logisticsOrderCode:SF1303262056675;intentReturnGoodsType:RETURN_BY_SELF;opRole:seller;apply_init_refund_fee:1000;freezeChannel:35;apply_text_id:403676;userCredit:0;sdkCode:ali.china.taobao;interceptStatus:0;restartForXiaoer:1;rootCat:50026555;tos:1;ol_tf:500;ability:1;appName:tradeapi;payMode:alipay;freezeGoodsFee:1000;workflowName:return_and_refund;rightsSuspend:1;seller_audit:0;adlock:1;itemPrice:500;",
"buyer_nick": "superme",
"buyer_open_uid": "AAGM90gYAAjcqSrFKsJi7Izh",
"created": "2021-10-09 17:14:28",
"cs_status": 1,
"desc": "",
"good_status": "BUYER_RECEIVED",
"has_good_return": true,
"modified": "2021-10-09 17:20:13",
"num": 1,
"num_iid": 544876335798,
"oid": "2130415454315565830",
"operation_contraint": "null",
"order_status": "TRADE_FINISHED",
"outer_id": "lianhua007",
"payment": "0.00",
"price": "5.00",
"reason": "拍错/多拍",
"refund_fee": "10.00",
"refund_id": "132032916631563058",
"refund_phase": "aftersale",
"refund_remind_timeout": {
"exist_timeout": true,
"timeout": "2021-10-16 17:20:13"
},
"refund_version": 1633770868971,
"seller_nick": "百鞋馆",
"sku": "3977338583163|尺码:36;颜色:red",
"status": "WAIT_BUYER_RETURN_GOODS",
"tid": "2130415454315565830",
"title": "联华超市提取货券xx",
"total_fee": "10.00"
},
"request_id": "1085kn1f7fk5t"
},
"trace_id": ""
}
说明:
- code为0表示成功,非0为失败,message会包含失败原因。
- 上述部分字段比如,company_name退回物流公司和sid退回物流单号,只有买家退回货物时才会有此字段名(注意不是值,是字段名称),因此调用方程序处理时要注意避坑,建议用JSON反序列化处理。
- data字段包含退款的数据,查看退款字段的业务含义说明
4. 常见问题:
- 如何获取退款单中开票给平台的金额?
A: 有些订单支付时使用了积分等平台承担费用,发生退款时这部分钱需要退还给平台,而不是买家,现在需要从售后接口中识别并解析出这部分金额。但是分账给淘宝的钱 split_taobao_fee、分账给卖家的钱 split_seller_fee 这两个字段调用接口不返回的。退款单中开票给平台的金额取退款单 attribute 中会包含返回的 apply_subsidy_refund_fee (单位:分)。 apply_subsidy_refund_fee 是在 attribute字段里面的一个拓展字段。
文档更新时间: 2023-11-15 15:58 作者:admin