Skip to main content
e-Buy Docs
View All
Search
Shelves
Books
Log in
Info
Content
Books
e-Buy PaaS API
线上支付API
申请退款
申请退款
基本信息
接口名称:
申请退款
状 态:
已完成
接口路径:
POST
/api/refund
更新时间:
2025-03-17 23:56:26
Mock地址:
https://apimock.e-buychina.com/mock/713/api/refund
请求参数
Headers:
参数名称
参数值
是否必填
Content-Type
application/json
是
Body:
参数名称
类型
必填
默认值
备注
其他信息
uuid
string
是
请求序列号
最大长度:50
最小长度:1
Mock:@now('yyyyMMdd')-@string('lower',32)
appId
string
是
请求AppId
最大长度:50
最小长度:1
Mock:@natural
action
string
是
交易类型
最大长度:50
最小长度:1
Mock:refund
timestamp
number
是
请求时间戳
Mock:@timestamp
signType
string
是
签名类型
最大长度:20
最小长度:1
Mock:sha256
sign
string
是
签名值
最大长度:500
最小长度:1
Mock:@natural
lang
string
是
语言
最大长度:50
最小长度:1
Mock:zh_CN
content
object
是
请求报文
outTradeNo
string
是
下单时原外部订单号
最大长度:32
最小长度:1
Mock:@string
refundTradeNo
string
是
退款交易编号,格式:YYYYMMDD+随机数
最大长度:32
最小长度:1
Mock:@string
tradeTime
string
否
交易时间,格式YYYYMMDD,不填默认当天
最大长度:8
Mock:@string
goodsDetail
object
否
退产品信息
goodsId
string
是
商品ID,外部编号
最大长度:32
最小长度:1
Mock:@string
goodsName
string
否
商品名称
最大长度:50
Mock:@string
goodsCode
string
否
商品编码,内部编号
最大长度:32
Mock:@string
goodsNum
number
是
数量
Mock:@integer
refundMethod
array
否
长度只能小于等于1,自定义退款方式和退款金额,此字段存在将不执行refundAmount
assetType
string
是
资产类型,枚举。cash电子现金支付
最大长度:20
最小长度:1
Mock:@string
refundAmount
integer
否
具体资产类型的退款金额
Mock:@integer
返回数据
参数名称
类型
必填
默认值
备注
其他信息
uuid
string
是
请求序列号
最大长度:50
最小长度:1
Mock:@now('yyyyMMdd')-@string('lower',32)
success
boolean
是
交易成功与否
Mock:@boolean
action
string
是
交易类型
最大长度:50
最小长度:1
Mock:refund
timestamp
number
是
返回时间戳
Mock:@timestamp
errorCode
string
是
错误码
最大长度:50
Mock:@word
errorMessage
string
是
错误描述
最大长度:50
Mock:@csentence
signType
string
否
签名类型
最大长度:20
Mock:sha256
sign
string
否
签名值
最大长度:500
Mock:@natural
content
object
是
返回报文
outTradeNo
string
是
流水号
最大长度:64
最小长度:1
Mock:@string
refundTime
string
是
退款时间
最大长度:19
最小长度:1
Mock:@date
refundAmount
string
是
退款金额
最大长度:11
最小长度:1
Mock:@integer
cardRefund
object
是
卡退款明细
refundAmount
string
是
退款金额
最大长度:11
最小长度:1
refundStatus
string
是
退款状态
最大长度:32
最小长度:1
useList
array
否
code
string
是
errorCode
string
是
errorMsg
string
是
paidAmount
string
是
useRule
string
是
fromGoodsIds
string
是
forGoodsIds
string
是
couponRefund
object
是
券退款明细
refundAmount
string
是
退款金额
最大长度:11
最小长度:1
refundStatus
string
是
退款状态
最大长度:32
最小长度:1
useList
array
否
code
string
是
errorCode
string
是
errorMsg
string
是
paidAmount
string
是
useRule
string
是
fromGoodsIds
string
是
forGoodsIds
string
是
pointsRefund
object
是
积分退款明细
refundAmount
string
是
退款金额
最大长度:11
最小长度:1
refundStatus
string
是
退款状态
最大长度:32
最小长度:1
useList
array
否
code
string
是
errorCode
string
是
errorMsg
string
是
paidAmount
string
是
useRule
string
是
fromGoodsIds
string
是
forGoodsIds
string
是
cashRefund
object
是
电子现金退款明细
refundAmount
string
是
退款金额
最大长度:11
最小长度:1
refundStatus
string
是
退款状态
最大长度:32
最小长度:1
备注
退款请求可以选择整单退或者单资产退款,refundMethod的长度不支持大于1。
优惠券不支持部分退款。
变更历史
变更日期
变更内容
2025-03-17
{"path":"\/refund","params":[]}
{"path":"\/refund","params":[]}
[{"required":"1","name":"Content-Type","value":"application\/json"}]
[{"required":"1","name":"Content-Type","value":"application\/json"}]
{"req_body_type":"json"}
{"req_body_type":"json"}
{"res_body_type":"json"}
{"res_body_type":"json"}
{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"uuid":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求序列号","mock":{"mock":"@now(\'yyyyMMdd\')-@string(\'lower\',32)"}},"appId":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求AppId","mock":{"mock":"@natural"}},"action":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"交易类型","mock":{"mock":"refund"}},"timestamp":{"type":"number","description":"请求时间戳","mock":{"mock":"@timestamp"}},"signType":{"type":"string","default":"","minLength":1,"maxLength":20,"description":"签名类型","mock":{"mock":"sha256"}},"sign":{"type":"string","default":"","minLength":1,"maxLength":500,"description":"签名值","mock":{"mock":"@natural"}},"lang":{"type":"string","mock":{"mock":"zh_CN"},"description":"语言","minLength":1,"maxLength":50},"content":{"type":"object","properties":{"outTradeNo":{"type":"string","description":"下单时原外部订单号","mock":{"mock":"@string"},"minLength":1,"maxLength":32},"refundTradeNo":{"type":"string","description":"退款交易编号,格式:YYYYMMDD+随机数","mock":{"mock":"@string"},"minLength":1,"maxLength":32},"tradeTime":{"type":"string","mock":{"mock":"@string"},"description":"交易时间,格式YYYYMMDD,不填默认当天","maxLength":8,"minLength":0},"goodsDetail":{"type":"object","properties":{"goodsId":{"type":"string","mock":{"mock":"@string"},"description":"商品ID,外部编号","minLength":1,"maxLength":32},"goodsName":{"type":"string","mock":{"mock":"@string"},"description":"商品名称","minLength":0,"maxLength":50},"goodsCode":{"type":"string","mock":{"mock":"@string"},"description":"商品编码,内部编号","minLength":0,"maxLength":32},"goodsNum":{"type":"number","mock":{"mock":"@integer"},"minimum":1,"exclusiveMinimum":true,"maximum":10,"exclusiveMaximum":true,"description":"数量"}},"description":"退产品信息","required":["goodsId","goodsNum"]},"refundMethod":{"type":"array","items":{"type":"object","properties":{"assetType":{"type":"string","mock":{"mock":"@string"},"description":"资产类型,枚举。cash电子现金支付,coupon优惠券,cashcard现金卡,储值卡,points积分","minLength":1,"maxLength":20},"refundAmount":{"type":"integer","description":"具体资产类型的退款金额,非券类交易部分退款必填","mock":{"mock":"@integer"},"minimum":1,"exclusiveMinimum":true,"maximum":10,"exclusiveMaximum":true}},"required":["assetType"]},"description":"长度只能小于等于1,自定义退款方式和退款金额,此字段存在将不执行refundAmount"}},"description":"请求报文","required":["outTradeNo","refundTradeNo"]}},"required":["uuid","appId","action","timestamp","signType","sign","content","lang"],"description":"ROOT"}
{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"uuid":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求序列号","mock":{"mock":"@now(\'yyyyMMdd\')-@string(\'lower\',32)"}},"appId":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求AppId","mock":{"mock":"@natural"}},"action":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"交易类型","mock":{"mock":"refund"}},"timestamp":{"type":"number","description":"请求时间戳","mock":{"mock":"@timestamp"}},"signType":{"type":"string","default":"","minLength":1,"maxLength":20,"description":"签名类型","mock":{"mock":"sha256"}},"sign":{"type":"string","default":"","minLength":1,"maxLength":500,"description":"签名值","mock":{"mock":"@natural"}},"lang":{"type":"string","mock":{"mock":"zh_CN"},"description":"语言","minLength":1,"maxLength":50},"content":{"type":"object","properties":{"outTradeNo":{"type":"string","description":"下单时原外部订单号","mock":{"mock":"@string"},"minLength":1,"maxLength":32},"refundTradeNo":{"type":"string","description":"退款交易编号,格式:YYYYMMDD+随机数","mock":{"mock":"@string"},"minLength":1,"maxLength":32},"tradeTime":{"type":"string","mock":{"mock":"@string"},"description":"交易时间,格式YYYYMMDD,不填默认当天","maxLength":8,"minLength":0},"goodsDetail":{"type":"object","properties":{"goodsId":{"type":"string","mock":{"mock":"@string"},"description":"商品ID,外部编号","minLength":1,"maxLength":32},"goodsName":{"type":"string","mock":{"mock":"@string"},"description":"商品名称","minLength":0,"maxLength":50},"goodsCode":{"type":"string","mock":{"mock":"@string"},"description":"商品编码,内部编号","minLength":0,"maxLength":32},"goodsNum":{"type":"number","mock":{"mock":"@integer"},"minimum":1,"exclusiveMinimum":true,"maximum":10,"exclusiveMaximum":true,"description":"数量"}},"description":"退产品信息","required":["goodsId","goodsNum"]},"refundMethod":{"type":"array","items":{"type":"object","properties":{"assetType":{"type":"string","mock":{"mock":"@string"},"description":"资产类型,枚举。cash电子现金支付","minLength":1,"maxLength":20},"refundAmount":{"type":"integer","description":"具体资产类型的退款金额","mock":{"mock":"@integer"},"minimum":1,"exclusiveMinimum":true,"maximum":10,"exclusiveMaximum":true}},"required":["assetType"]},"description":"长度只能小于等于1,自定义退款方式和退款金额,此字段存在将不执行refundAmount"}},"description":"请求报文","required":["outTradeNo","refundTradeNo"]}},"required":["uuid","appId","action","timestamp","signType","sign","content","lang"],"description":"ROOT"}
{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"uuid":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求序列号","mock":{"mock":"@now(\'yyyyMMdd\')-@string(\'lower\',32)"}},"success":{"type":"boolean","description":"交易成功与否","mock":{"mock":"@boolean"}},"action":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"交易类型","mock":{"mock":"refund"}},"timestamp":{"type":"number","description":"返回时间戳","mock":{"mock":"@timestamp"}},"errorCode":{"type":"string","default":"","minLength":0,"maxLength":50,"description":"错误码","mock":{"mock":"@word"}},"errorMessage":{"type":"string","default":"","minLength":0,"maxLength":50,"description":"错误描述","mock":{"mock":"@csentence"}},"signType":{"type":"string","default":"","minLength":0,"maxLength":20,"description":"签名类型","mock":{"mock":"sha256"}},"sign":{"type":"string","default":"","minLength":0,"maxLength":500,"description":"签名值","mock":{"mock":"@natural"}},"content":{"type":"object","properties":{"outTradeNo":{"type":"string","mock":{"mock":"@string"},"description":"流水号","minLength":1,"maxLength":64},"refundTime":{"type":"string","mock":{"mock":"@date"},"description":"退款时间","minLength":1,"maxLength":19},"refundAmount":{"type":"string","mock":{"mock":"@integer"},"description":"退款金额","minLength":1,"maxLength":11},"cardRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"卡退款明细","required":["refundAmount","refundStatus"]},"couponRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"券退款明细","required":["refundAmount","refundStatus"]},"pointsRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"积分退款明细","required":["refundAmount","refundStatus"]},"cashRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32}},"description":"电子现金退款明细","required":["refundAmount","refundStatus"]}},"description":"返回报文","required":["outTradeNo","refundTime","refundAmount","cardRefund","couponRefund","pointsRefund","cashRefund"]}},"required":["uuid","action","timestamp","success","errorCode","errorMessage","content"],"description":"ROOT"}
{"$schema":"http://json-schema.org/draft-04/schema#","type":"object","properties":{"uuid":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"请求序列号","mock":{"mock":"@now(\'yyyyMMdd\')-@string(\'lower\',32)"}},"success":{"type":"boolean","description":"交易成功与否","mock":{"mock":"@boolean"}},"action":{"type":"string","default":"","minLength":1,"maxLength":50,"description":"交易类型","mock":{"mock":"refund"}},"timestamp":{"type":"number","description":"返回时间戳","mock":{"mock":"@timestamp"}},"errorCode":{"type":"string","default":"","minLength":0,"maxLength":50,"description":"错误码","mock":{"mock":"@word"}},"errorMessage":{"type":"string","default":"","minLength":0,"maxLength":50,"description":"错误描述","mock":{"mock":"@csentence"}},"signType":{"type":"string","default":"","minLength":0,"maxLength":20,"description":"签名类型","mock":{"mock":"sha256"}},"sign":{"type":"string","default":"","minLength":0,"maxLength":500,"description":"签名值","mock":{"mock":"@natural"}},"content":{"type":"object","properties":{"outTradeNo":{"type":"string","mock":{"mock":"@string"},"description":"流水号","minLength":1,"maxLength":64},"refundTime":{"type":"string","mock":{"mock":"@date"},"description":"退款时间","minLength":1,"maxLength":19},"refundAmount":{"type":"string","mock":{"mock":"@integer"},"description":"退款金额","minLength":1,"maxLength":11},"cardRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"卡退款明细","required":["refundAmount","refundStatus"]},"couponRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"券退款明细","required":["refundAmount","refundStatus"]},"pointsRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32},"useList":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"errorCode":{"type":"string"},"errorMsg":{"type":"string"},"paidAmount":{"type":"string"},"useRule":{"type":"string"},"fromGoodsIds":{"type":"string"},"forGoodsIds":{"type":"string"}},"required":["code","fromGoodsIds","useRule","paidAmount","errorMsg","errorCode","forGoodsIds"]}}},"description":"积分退款明细","required":["refundAmount","refundStatus"]},"cashRefund":{"type":"object","properties":{"refundAmount":{"type":"string","description":"退款金额","minLength":1,"maxLength":11},"refundStatus":{"type":"string","description":"退款状态","minLength":1,"maxLength":32}},"description":"电子现金退款明细","required":["refundAmount","refundStatus"]}},"description":"返回报文","required":["outTradeNo","refundTime","refundAmount","cardRefund","couponRefund","pointsRefund","cashRefund"]}},"required":["uuid","action","timestamp","success","errorCode","errorMessage","content"],"description":"ROOT"}
api-id=37494
entities.pages_pointer_enter_mode
Previous
交易查询
Next
退款查询
No Comments
Add Comment
New Comment
In reply to 1234
Remove
Cancel
Save Comment
Back to top
Entity Select
No Comments