# 租车

# 1. 接口说明

# 1.1 接口协议

除非特殊指定,默认请求方式均为HTTPS/POST方式。

请求和响应统一规范为:application/json。

# 1.2 字符编码

除非特殊指定,默认字符编码均为UTF-8编码格式。

# 1.3 Header通用请求参数

字段名 字段类型 必填 说明
timestamp 时间戳,单位:毫秒 long 时间戳
nonce 客户端请求唯一随机字符串 string 客户端请求唯一随机字符串
accessKey 分配给请求方的唯一标识 string 分配给请求方的唯一标识
sign 签名 string 用于识别请求方和校验数据是否篡改

# 1.4 通用返回值说明

字段名 字段类型 必填 说明
code int 时间戳
message String 服务响应状态说明
data object 响应数据信息

# 1.5 鉴权说明

对请求头公共参数名(不包括sign)进行字母升序排列,组成key=value形式字符串(中间用&连接),即: accessKey=xxx&nonce=xxx&timestamp=xxx

然后,在字符串最后追加: &secretKey=xxx,得到:accessKey=xxx&nonce=xxx&timestamp=xxx&secretKey=xxx

最后,对字符串进行MD5运算,得到sign(转换为大写);

# 1.6 分配给SP的accessKey 和 secretKey

测试环境:

accessKey: 由腾讯提供

secretKey: 由腾讯提供

# 1.7 回调域名

测试环境:https://tai-rent-dev.map.qq.com

生产环境:https://aggrecb.map.qq.com

# 2. 相关接口

# 2.1 查询附近可用的门店

  • 调用方:腾讯
  • 被调方:SP
# 接口说明
  • 通过经纬度或者门店编号获取附近可用的门店
# 请求地址
  • SP提供
# 请求参数
参数名称 类型 必选 说明
pickupTime Long 预约取车时间,单位:秒
dropoffTime Long 预约还车时间,单位:秒
pickupInfo Object 取车门店信息
pickupInfo.storeId String 门店Id 预估、下单场景该字段必填
pickupInfo.storeName String 门店名称
pickupInfo.cityCode String 城市编码 国家统计局版本
pickupInfo.cityName String 城市名称
pickupInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.address String 地址 例:成府路五道⼝购物中⼼
takeCount Integer 获取门店数,默认为1
searchRange Integer 搜索范围 单位: Km, 默认10
# 返回数据
参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.stores List 门店列表
data.stores[i].storeId String 门店id
data.stores[i].storeName String 门店名称
data.stores[i].address String 门店地址
data.stores[i].contactNumber String 联系电话
data.stores[i].openingTime Long 营业开始时间,单位:秒
data.stores[i].closingTime Long 营业结束时间,单位:秒
data.stores[i].isPhysicalStore Boolean 是否为实体店
data.stores[i].distance Integer 距离 单位:米
# 返回示例
{
	"code":0,
	"data":{
		"stores":[
			{
				"address":"龙岗区布吉街道湖南路 百合星城一期A-C栋商铺120",
				"contactNumber":"18665985631",
				"distance":504,
				"isPhysicalStore":true,
				"spId":1000,
				"spName":"悟空租车",
				"storeId":"1394",
				"storeName":"布吉百合星城店"
			}
		]
	},
	"message":"成功"
}

# 2.2 检索车型数据

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 根据用户当前位置(经纬度),检索周边可用门店的车型数据

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
userPhone String 用户手机号
pickupTime Long 预约取车时间,unix时间戳,单位:秒
pickupInfo Object 取车位置信息
pickupInfo.address String 地址
pickupInfo.cityCode String 城市编码
pickupInfo.cityName String 城市名称
pickupInfo.coordType int 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度),默认为2
pickupInfo.latitude double 纬度
pickupInfo.longitude double 经度
dropoffTime Long 预约还车时间,unix时间戳,单位:秒
dropoffInfo Object 还车位置信息
dropoffInfo.address String 地址
dropoffInfo.cityCode String 城市编码
dropoffInfo.cityName String 城市名称
dropoffInfo.coordType int 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度),默认为2
dropoffInfo.latitude double 纬度
dropoffInfo.longitude double 经度
pageIndex int 当前页码,初始页码为 1
pageSize int 分页大小,默认为 20

# 返回数据

参考swagger文档:https://tmapapidev.map.qq.com/rent/swagger/swagger-ui.html#/search-control/searchCarUsingPOST

# 2021-07-01新增返回的修改

在carInfo的车辆详情里,新增四个必返回的字段

字段名 类型 必填 描述 值枚举
carNoType int 车牌类型 1沪牌,3京牌,0默认
carPriceType int 价格相关 1经济型,2舒适型,8精英型,64豪华型,0默认
carLevelType int 车型相关 32SUV,4商务车,17跑车,18房车,19小巴士,20皮卡,0默认
carEnergyType int 油电相关 0油车默认,16电车

# 2.3 预估

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

根据用户选定的车型、取还车时间预估费用

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
estimateId String 上一次预估ID
userPhone String 用户手机号
pickupTime Long 预约取车时间,unix时间戳,单位:秒
pickupInfo Object 取车位置信息
pickupInfo.address String 地址
pickupInfo.cityCode String 城市编码
pickupInfo.cityName String 城市名称
pickupInfo.coordType int 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度),默认为2
pickupInfo.latitude double 纬度
pickupInfo.longitude double 经度
dropoffTime Long 预约还车时间,unix时间戳,单位:秒
dropoffInfo Object 还车位置信息
dropoffInfo.address String 地址
dropoffInfo.cityCode String 城市编码
dropoffInfo.cityName String 城市名称
dropoffInfo.coordType int 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度),默认为2
dropoffInfo.latitude double 纬度
dropoffInfo.longitude double 经度
couponList List 优惠券精简信息列表
couponList[i].promotionCode String 优惠活动编号
couponList[i].couponCode String 优惠券编号
addedServiceCodeList List 增值服务编码列表
addedServiceCodeList[i] String 增值服务编码
carInfo Object 车辆信息
carInfo.carTypeId String 车型Id
userInfo Object 用户信息
userInfo.userName String 用户信息
userInfo.userPhone String 用户手机号
userInfo.credentials Object 证件信息
userInfo.credentials.type Integer 证件类型
userInfo.credentials.credentialNo String 证件号
pageIndex int 当前页码,初始页码为 1
pageSize int 分页大小,默认为 20

# 返回数据

参考swagger文档:https://tmapapidev.map.qq.com/rent/swagger/swagger-ui.html#/charge-controller/estimatePriceUsingPOST

# 2.4 空缺

# 2.5 创建订单

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 查询订单明细

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
spId Integer 服务商id
orderId String 腾讯侧订单id
payFee Integer 支付金额,单位:分
estimateId String 预估ID
pickupInfo Object 取车门店信息
pickupInfo.storeId String 门店Id 预估、下单场景该字段必填
pickupInfo.storeName String 门店名称
pickupInfo.cityCode String 城市编码 国家统计局版本
pickupInfo.cityName String 城市名称
pickupInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.address String 地址 例:成府路五道⼝购物中⼼
dropoffInfo Object 还车门店信息
dropoffInfo.storeId String 门店Id 预估、下单场景该字段必填
dropoffInfo.storeName String 门店名称
dropoffInfo.cityCode String 城市编码 国家统计局版本
dropoffInfo.cityName String 城市名称
dropoffInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.address String 地址 例:成府路五道⼝购物中⼼
userInfo Object 用户信息
userInfo.userName String 用户信息
userInfo.userPhone String 用户手机号
userInfo.credentials Object 证件信息
userInfo.credentials.type Integer 证件类型
userInfo.credentials.credentialNo String 证件号
userLocation Object 用户当前位置
userLocation.latitude Double 用户当前纬度
userLocation.longitude Double 用户当前经度
couponList List 优惠券精简信息列表
couponList[i].promotionCode String 优惠活动编号
couponList[i].couponCode String 优惠券编号
addedServiceCodeList List 增值服务编码列表
addedServiceCodeList[i] String 增值服务编码
carInfo Object 车辆信息
carInfo.carTypeId String 车型Id
priceType Integer 价格计算类型,1:基本价,3:预付价,默认为1
payType Integer 支付方式, 0: 线上支付,1:线下支付,默认为线上支付

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.orderId String 腾讯侧订单id
data.orderStatus Integer 服务商订单id
data.orderType Integer 订单类型,0:正常单,1:预付单,2:静默单,3:禁止单
data.totalAmount Integer 总金额,单位:分
data.totalDiscountAmount Integer 优惠金额,单位:分
data.priceList List 价格明细
data.priceList[i].priceType Integer 价格计算类型,1:基本价,3:预付价
data.priceList[i].code String 价格编码
data.priceList[i].quantity Double 数量
data.priceList[i].amount Integer 费用,单位:分
data.priceList[i].description String 价格编码描述
data.priceList[i].descriptionDetail String 价格描述详细说明
data.priceList[i].extraAmount Object 附属价格信息
data.priceList[i].extraAmount.firstDayPrice Integer 首日租金,单位:分
data.priceList[i].extraAmount.firstDayRental Double 首日租期
data.priceList[i].extraAmount.lastDayPrice Integer 最后一天租金,单位:分
data.priceList[i].extraAmount.lastDayRental Double 最后一天租期
data.priceList[i].extraAmount.dailyAvgPrice Integer 每日平均价格

# 返回示例

{
	"code":0,
	"data":{
		"orderId":"6897149614033928195",
		"orderType":1,
		"partnerOrderId":"1172184595",
		"spId":1000,
		"spName":"悟空租车",
		"totalAmount":31300,
		"totalDiscountAmount":5000
	},
	"message":"成功"
}

# 2.6 查询订单状态

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 获取当前订单状态

# 请求地址

  • sp提供

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯侧订单id
partnerOrderId String 服务商订单id

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.spId Integer 服务商id
data.orderId String 腾讯侧订单id
data.partnerOrderId String 服务商订单id
data.orderStatus Integer 订单状态: 100:初始状态,110:待取车,120:待还车(租赁中),130:待支付,140:已还车,150:用户(承租人)取消,160:系统(客服)取消
data.orderType Integer 订单类型,0:正常单,1:预付单,2:静默单,3:禁止单
data.statusUpdateTime Long 状态更新时间,单位:秒

# 返回示例

{
	"code":0,
	"data":{
		"spId":1000,
		"orderId":"6897153552518938628",
		"partnerOrderId":"1605874602",
		"orderStatus":130,
		"orderType":1,
		"statusUpdateTime":1605874602
	},
	"message":"成功"
}

# 2.7 预取消订单

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 预取消订单

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯侧订单id
partnerOrderId String 服务商订单id

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.spId Integer 服务商id
data.amount Integer 违约金金额 单位:分
data.friendlyTips String 违约金提示信息
data.cancelReasons List 取消原因列表
data.cancelReasons[i] String 取消原因

# 返回示例

{
	"code":0,
	"data":{
		"spId":1000,
		"amount":3500,
		"friendlyTips":"距离提车不足四小时,本次将收取35.00元取消违约金",
		"cancelReasons":[
			"时间来不及了",
			"不想租了"
		]
	},
	"message":"成功"
}

# 2.8 确定取消订单

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 预取消订单

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯侧订单id
partnerOrderId String 服务商订单id
cancelReason String 取消原因
cancelSource String 取消类型: 1用户 2 系统 3客服

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明

# 返回示例

{
	"code":0,
	"message":"成功"
}

# 2.9 查询订单明细

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 查询订单明细

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯侧订单id
partnerOrderId String 服务商订单id
pickupTime Long 预约取车时间,单位:秒
pdropoffTime Long 预约还车时间,单位:秒
pickupInfo Object 取车门店信息

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.payType Integer 支付方式,0:线上支付,1:线下支付
data.totalAmount Integer 订单总金额 单位:分
data.carTypeId String 车型Id
data.createTime Long 订单创建时间,单位:秒
data.pickupTime Long 预约取车时间,单位:秒
data.dropoffTime Long 预约还车时间,单位:秒
data.pickupInfo.storeId String 取车门店Id
data.pickupInfo.storeName String 取车门店名称
data.pickupInfo.cityCode String 城市编码 国家统计局版本
data.pickupInfo.cityName String 城市名称
data.pickupInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
data.pickupInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
data.pickupInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
data.pickupInfo.address String 取车地址 例:成府路五道⼝购物中⼼
data.dropoffInfo.storeId String 还车门店Id
data.dropoffInfo.storeName String 还车门店名称
data.dropoffInfo.cityCode String 城市编码 国家统计局版本
data.dropoffInfo.cityName String 城市名称
data.dropoffInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
data.dropoffInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
data.dropoffInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
data.dropoffInfo.address String 还车地址 例:成府路五道⼝购物中⼼
data.addedServiceList List 增值服务列表
data.addedServiceList[i].addedServiceCode String 增值服务标识
data.addedServiceList[i].amount Integer 价格,单位:分
data.addedServiceList[i].originAmount Integer 原价,单位:分
data.addedServiceList[i].description String 描述
data.addedServiceList[i].descriptionDetail String 描述明细
data.addedServiceList[i].unit Integer 单位,0: 未定义,1: 天,2: 小时,3: 次
data.addedServiceList[i].isShow Boolean 是否展示
data.addedServiceList[i].rentalDay Double 租期
data.priceList List 价格汇总明细列表
data.priceList[i].priceType Integer 价格计算类型,1:基本价,3:预付价
data.priceList[i].code String 价格编码
data.priceList[i].quantity Double 数量
data.priceList[i].amount Integer 费用,单位:分
data.priceList[i].description String 价格编码描述
data.priceList[i].descriptionDetail String 价格描述详细说明
data.priceList[i].extraAmount Object 附属价格信息
data.priceList[i].extraAmount.firstDayPrice Integer 首日租金,单位:分
data.priceList[i].extraAmount.firstDayRental Double 首日租期
data.priceList[i].extraAmount.lastDayPrice Integer 最后一天租金,单位:分
data.priceList[i].extraAmount.lastDayRental Double 最后一天租期
data.priceList[i].extraAmount.dailyAvgPrice Integer 每日平均价格
data.priceDetailList List 价格分项明细
data.priceDetailList[i].priceType Integer 价格计算类型,1:基本价,3:预付价
data.priceDetailList[i].code String 价格编码
data.priceDetailList[i].quantity Double 数量
data.priceDetailList[i].amount Integer 费用,单位:分
data.priceDetailList[i].description String 价格编码描述
data.priceDetailList[i].descriptionDetail String 价格描述详细说明
data.priceDetailList[i].extraAmount Object 附属价格信息
data.priceDetailList[i].extraAmount.firstDayPrice Integer 首日租金,单位:分
data.priceDetailList[i].extraAmount.firstDayRental Double 首日租期
data.priceDetailList[i].extraAmount.lastDayPrice Integer 最后一天租金,单位:分
data.priceDetailList[i].extraAmount.lastDayRental Double 最后一天租期
data.priceDetailList[i].extraAmount.dailyAvgPrice Integer 每日平均价格
data.deductionList List 优惠明细
data.deductionList[i].id Integer 优惠标识
data.deductionList[i].name String 优惠描述
data.deductionList[i].amount Integer 优惠金额 单位:分
data.carInfo Object 车辆信息
data.carInfo.carTypeId String 车型Id
data.carInfo.carTypeName String 车型名称
data.carInfo.isHighVehicle Boolean 是否高端车型
data.carInfo.brandName String 品牌名称
data.carInfo.series String 系列名称
data.carInfo.englishBrandName String 英文品牌名称
data.carInfo.englishSeriesName String 英文系列名称
data.carInfo.carTypeDesc String 车型描述
data.carInfo.carImagePath String 车型图片
data.carInfo.carLevel String 车型等级
data.carInfo.carLevelId String 车型等级Id
data.carInfo.maxPassenger String 最大乘坐人数
data.carInfo.userLevel String 用户爱车指数等级
data.carInfo.gearName String 排挡类型
data.carInfo.structureName String 厢型结构
data.carInfo.emission String 车型排量
data.carInfo.emissionUnit String 排量单位
data.carInfo.carNoType String 号牌种类
data.carInfo.isRearCamera String 是否有倒车影像
data.carInfo.isParkSensor String 是否有倒车雷达
data.carInfo.isSnowTire String 是否有雪地胎
data.carInfo.isVipCar String 是否尊享车型

# 返回示例

{
	"code":0,
	"message":"成功",
	"data":{
		"spId":1000,
		"spName":"一嗨租车",
		"orderId":"6897149614033928195",
		"partnerOrderId":"1172184595",
		"orderStatus":160,
		"statusUpdateTime":1605874602,
		"totalAmount":36300,
		"carTypeId":"421",
		"createTime":1605867785,
		"pickupTime":1606356000,
		"dropoffTime":1606528800,
		"pickupInfo":{
			"cityName":"深圳",
			"coordType":2,
			"address":"龙岗区布吉街道湖南路 百合星城一期A-C栋商铺120",
			"storeId":"1394",
			"storeName":"布吉百合星城店"
		},
		"dropoffInfo":{
			"cityName":"深圳",
			"coordType":2,
			"address":"龙岗区布吉街道湖南路 百合星城一期A-C栋商铺120",
			"storeId":"1394",
			"storeName":"布吉百合星城店"
		},
		"priceList":[
			{
				"code":"101",
				"quantity":2,
				"amount":26300,
				"description":"车辆租赁费及门店服务费"
			},
			{
				"code":"103",
				"quantity":1,
				"amount":2000,
				"description":"手续费"
			},
			{
				"code":"105",
				"quantity":2,
				"amount":8000,
				"description":"基本保障服务费"
			}
		],
		"priceDetailList":[
			{
				"code":"101",
				"quantity":2,
				"amount":26300,
				"description":"车辆租赁费及门店服务费"
			},
			{
				"code":"103",
				"quantity":1,
				"amount":2000,
				"description":"手续费"
			},
			{
				"code":"105",
				"quantity":2,
				"amount":8000,
				"description":"基本保障服务费"
			}
		],
		"carInfo":{
			"carTypeId":"421",
			"carTypeName":"大众朗逸",
			"isHighVehicle":false,
			"brandName":"大众",
			"carImagePath":"https://externalimage.1hai.cn/cartype/ea953fb306b970b9a435e426909c3a67.png",
			"maxPassenger":5,
			"userLevel":0,
			"gearName":"自动",
			"structureName":"三厢",
			"emission":"1.60",
			"emissionUnit":"L"
		}
	}
}

# 2.10 获取订单待支付信息

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 获取当前订单待支付信息详情

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯侧订单id
partnerOrderId String 服务商订单id

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.payStatus Integer 支付结果,0:无需付款,1:未付款,2:支付中,3:已付款,4:支付失败,5:线下支付,7:已关闭,8:未知场景
data.billBasic Object 账单信息
data.billBasic.totalFee Integer 总费用金额(最小货币单位),单位:分
data.billBasic.shouldPayFee Integer 需支付金额,单位:分
data.billBasic.deductionFee Integer 优惠金额,单位:分
data.billBasic.currency String 币种
data.billDetail Object 支付明细
data.billDetail.deductionList List 抵扣列表
data.billDetail.deductionList[i].channelId String 支付渠道
data.billDetail.deductionList[i].type Integer 抵扣类型 1-优惠券
data.billDetail.deductionList[i].couponCode String 优惠券编号
data.billDetail.deductionList[i].cost Integer 抵扣金额,单位:分
data.billDetail.deductionList[i].name String 渠道名称

# 返回示例

{
	"code":0,
	"data":{
		"billBasic":{
			"shouldPayFee":31300,
			"totalFee":31300
		},
		"billDetail":{
			"deductionList":[
				{
					"cost":5000,
					"couponCode":"2581",
					"name":"满2天减50元优惠券-腾讯出行sss"
				}
			]
		}
	},
	"message":"成功"
} 

# 2.11 订单状态回调接口

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 订单状态发生变化时回调,同步订单状态到腾讯侧

# 请求地址

  • /rent/gateway/v1/callback/syncOrderStatus

# 请求参数

参数名称 类型 必选 说明
eventId String 事件唯一ID(随机字符串,用于区分唯一的一个事件)
timestamp Long 事件发生时间 单位:秒
event Object 订单事件信息
event.orderId String 平台订单编号(腾讯订单号)
event.partnerOrderId String 合作方订单编号(一嗨订单号)
event.spId Integer 服务商 (EHI(1000, "ehi", "一嗨"),服务商相关需要Integer类型时传1000,String类型传"一嗨")
event.orderStatus String 订单状态( 100,init, 初始状态; 110, WaitingCar, 待取车; 120, Renting, 待还车(租赁中); 130, Unpaid, 待支付; 140, Returned, 已还车; 150, UserCancelled, 用户(承租人)取消; 160, ServiceCancelled, 系统(客服)取消;)
event.partnerOrderStatus String 服务商订单状态( 用于校验服务商订单状态和腾讯内部订单状态是否正确)

# 返回数据

参数名称 类型 必选 说明
code int 服务响应状态
message String 服务响应状态说明

# 返回数据示例

{
    "code": 0,
    "message": "成功"
}

# 2.12 支付状态查询

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 依据订单号及支付流水号查询支付状态

# 请求地址

  • /rent/gateway/v1/callback/getPayStatus

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯方订单号
partnerOrderId String 合作方订单编号
transactionId String 支付流水号

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.orderId String 平台订单号
data.partnerOrderId String 合作方订单号
data.transactionId String 支付流水号
data.payStatus Integer 支付结果,0:无需付款,1:未付款,2:支付中,3:已付款,4:支付失败,5:线下支付,7:已关闭,8:未知场景

# 返回数据示例

{
	"code":0,
	"message":"成功",
	"data":{
		"orderId":"6803225886191845397",
		"partnerOrderId":"6803225886191845392",
		"transactionId":"dd59180083716bac68b1773662a3835a265f974b",
			"payStatus":3
	}
}

# 2.13 申请退款接口

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 退款接口,对于某一个transactionId发起全部退款或部分退款,每笔支付记录只能申请一笔退款,且申请退款的金额不得大于支付金额。

# 请求地址

  • /rent/gateway/v1/callback/applyRefund

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯方订单号
partnerOrderId String 合作方订单编号
transactionId String 支付流水号
refundReason String 退款原因
refundAmount Integer 退款金额(单位:分)

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.orderId String 腾讯方订单号
data.partnerOrderId String 合作方订单编号
data.refundId String 退款流水号
data.refundTime Long 申请退款时间(单位:秒)
data.refundAmount Integer 退款金额(单位:分)
data.applyStatus Integer 申请状态1,成功,2申请记录已存在

# 返回数据示例

{
	"code":0,
	"message":"成功",
	"data":{
		"orderId":"6803225886191845397",
		"partnerOrderId":"6803225886191845392",
		"transactionId":"dd59180083716bac68b1773662a3835a265f974b",
		"refundId":"c3dbbdb8016c0b1566263831405486f2",
		"refundTime":1599450020499,
		"refundAmount":1500,
		" applyStatus ":1
	}
}

# 2.14 查询退款状态接口

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 查询退款状态接口,按照refundId查询某笔退款状态.

# 请求地址

  • /rent/gateway/v1/callback/queryRefund

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯方订单号
partnerOrderId String 合作方订单编号
refundId String 退款流水号

# 返回数据

参数名称 类型 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.orderId String 腾讯方订单号
data.partnerOrderId String 合作方订单编号
data.refundId String 退款流水号
data.refundTime Long 申请退款时间(单位:秒)
data.refundAmount Integer 退款金额(单位:分)
data.refundStatus Integer 退款状态,0,初始化 1,退款中 2,退款成功 3,退款异常

# 返回数据示例

{
	"code":0,
	"message":"成功",
	"data":{
		"orderId":"6803225886191845397",
		"partnerOrderId":"6803225886191845392",
		"transactionId":"dd59180083716bac68b1773662a3835a265f974b",
		"refundId":"c3dbbdb8016c0b1566263831405486f2",
		"refundTime":1599450020499,
		"refundAmount":1500,
		"refundStatus":1
	}
}

# 2.15 同步优惠券状态接口

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 同步优惠券状态接口,同步优惠券状态

# 请求地址

  • /rent/gateway/v1/callback/syncCouponStatus

# 请求参数

参数名称 类型 必选 说明
promotionCode String 优惠活动码
couponCode String 优惠券编号
userPhone String 用户手机号码
couponStatus Integer 优惠券状态 UNUSED(1, "可用"), USED(2, "已使用"), EXPIRED(3, "已过期");
usageTime String 优惠券使用时间 单位: 秒
extra String 附加信息

# 返回数据

参数名称 类型 必选 说明
code int 服务响应状态
message String 服务响应状态说明

# 返回数据示例

{
    "code": 0,
    "message": "成功"
}

# 2.16 同步优惠券信息接口

  • 调用方:SP
  • 被调方:腾讯

# 接口说明

  • 同步优惠券信息,自主发券途径通过该接口,将信息展示在出行服务

# 请求地址

  • /rent/gateway/v1/callback/syncCouponInfo

# 请求参数

参数名称 类型 必选 说明
promotionCode String 优惠活动码
couponCode String 优惠券编号
userPhone String 用户手机号码
requestId String 请求ID(随机字符串)
status Integer 优惠券状态 UNUSED(1, "可用"), USED(2, "已使用"), EXPIRED(3, "已过期");
spId Integer 1000
promotionBeginTime Long 优惠券活动开始时间 单位: 秒
promotionEndTime Long 优惠券活动结束时间 单位: 秒
expireTime Long 优惠券过期时间 单位: 秒
createTime Long 优惠券创建时间 单位: 秒
boundTime Long 优惠券绑定时间 单位: 秒

# 返回数据

参数名称 类型 必选 说明
code int 服务响应状态
message String 服务响应状态说明

# 返回数据示例

{
    "code": 0,
    "message": "成功"
}

# 2.17 订单可用优惠券列表接口

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 列出当前条件可用优惠券

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
spId Integer 服务商id
orderId String 腾讯侧订单id
payFee Integer 支付金额,单位:分
estimateId String 预估ID
pickupInfo Object 取车门店信息
pickupInfo.storeId String 门店Id 预估、下单场景该字段必填
pickupInfo.storeName String 门店名称
pickupInfo.cityCode String 城市编码 国家统计局版本
pickupInfo.cityName String 城市名称
pickupInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
pickupInfo.address String 地址 例:成府路五道⼝购物中⼼
dropoffInfo Object 还车门店信息
dropoffInfo.storeId String 门店Id 预估、下单场景该字段必填
dropoffInfo.storeName String 门店名称
dropoffInfo.cityCode String 城市编码 国家统计局版本
dropoffInfo.cityName String 城市名称
dropoffInfo.latitude Double 纬度 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.longitude Double 经度 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.coordType Integer 坐标类型,1:WGS84ll(GPS经纬度),2:GCJ02ll(国测局经纬度),3:BD09ll(百度经纬度), 默认: GCJ02ll 国测局经纬度坐标
dropoffInfo.address String 地址 例:成府路五道⼝购物中⼼
userInfo Object 用户信息
userInfo.userName String 用户信息
userInfo.userPhone String 用户手机号
userInfo.credentials Object 证件信息
userInfo.credentials.type Integer 证件类型
userInfo.credentials.credentialNo String 证件号
userLocation Object 用户当前位置
userLocation.latitude Double 用户当前纬度
userLocation.longitude Double 用户当前经度
couponList List 优惠券精简信息列表
couponList[i].promotionCode String 优惠活动编号
couponList[i].couponCode String 优惠券编号
addedServiceCodeList List 增值服务编码列表
addedServiceCodeList[i] String 增值服务编码

# 返回数据

参数名称 类型 必选 说明
code int 服务响应状态
message String 服务响应状态说明
couponList List 优惠券列表
couponList[i].promotionCode String 优惠券活动编号
couponList[i].couponCode String 优惠券编号
couponList[i].title String 优惠券标题
couponList[i].rule String 规则描述
couponList[i].freeAmount Integr 优惠金额,单位:分
couponList[i].freeDays Integr 优惠天数
couponList[i].freeDiscount Integr 优惠折扣
couponList[i].status Integr 优惠券状态
couponList[i].promotionBeginTime Long 优惠活动开始时间-unix时间戳,单位:秒
couponList[i].promotionEndTime Long 优惠活动结束时间-unix时间戳,单位:秒
couponList[i].expireTime Long 优惠券过期时间-unix时间戳,单位:秒
couponList[i].createTime Long 优惠券创建时间-unix时间戳,单位:秒
couponList[i].boundTime Long 优惠券绑定时间

# 2.18 主动过期/无效优惠券接口

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • 按照活动Id和优惠券码,使对应优惠券无效,如果成功置无效,如果SP底层逻辑为置券为过期,则返回expireCoupons,置为无效则返回deactivateCoupons,如果存在已过期/已使用/已无效券导致不能成功退款,则返回illegalCoupons, illegalCoupons/deactivateCoupons/expireCoupons不能同时出现。

# 请求地址

  • SP提供

# 请求参数

参数名称 类型 必选 说明
promotionCode String 优惠活动码
coupons List 优惠券列表
coupons[i].promotionCode String 优惠券活动编号
coupons[i].couponCode String 优惠券编号
userPhone String 用户手机号码
couponStatus Integer 优惠券状态 UNUSED(1, "可用"), USED(2, "已使用"), EXPIRED(3, "已过期"),DEACTIVATED(4, "已失效");
spId Integer 1000
extra String 附加信息
reason String 原因

# 返回数据

参数名称 类型 必选 说明
code int 服务响应状态
message String 服务响应状态说明
data Object 响应结构体
data.spId Integer 服务商id
expireCoupons List 优惠券列表-返回成功过期优惠券列表
expireCoupons[i].promotionCode String 优惠活动码
expireCoupons[i].couponCode String 优惠券编号
expireCoupons[i].status String 优惠券编号
expireCoupons[i].expireTime Long 优惠券过期时间-unix时间戳,单位:秒
expireCoupons[i].deactivateTime Long 优惠券失效时间-unix时间戳,单位:秒
deactivateCoupons List 优惠券列表-返回成功无效优惠券列表
deactivateCoupons[i].promotionCode String 优惠活动码
deactivateCoupons[i].couponCode String 优惠券编号
deactivateCoupons[i].status String 优惠券编号
deactivateCoupons[i].expireTime Long 优惠券过期时间-unix时间戳,单位:秒
deactivateCoupons[i].deactivateTime Long 优惠券失效时间-unix时间戳,单位:秒
illegalCoupons List 非法优惠券列表-返回不可置为过期的优惠券列表
illegalCoupons[i].promotionCode String 优惠活动码
illegalCoupons[i].couponCode String 优惠券编号
illegalCoupons[i].status String 优惠券编号
illegalCoupons[i].expireTime Long 优惠券过期时间-unix时间戳,单位:秒
illegalCoupons[i].deactivateTime Long 优惠券失效时间-unix时间戳,单位:秒

# 2.19 订单支付/退款通知接口

  • 调用方:腾讯
  • 被调方:SP

# 接口说明

  • SP提供接口用于腾讯侧同步支付状态

# 请求参数

参数名称 类型 必选 说明
orderId String 腾讯方订单号
partnerOrderId String 合作方订单编号
wxOrderId String 微信支付订单编号(不一定有)
orderType Integer 订单支付类型 0:后付款,1:预付款
status Integer 支付状态类型 0:失败,1:成功
type Integer 同步类型 0:支付,1:退款
transaction Object 支付流水信息,type=0时不为空
transaction.channel Integer 支付渠道: 1:支付宝-直连 2:微信-直连 3:余额 4:企业 2x:工行聚合支付相
transaction.transactionId String 交易流水号
transaction.outTradeNo Sring 内部流水单号,内部唯一交易订单号
transaction.totalAmount Integer 支付金额,单位: 分
transaction.payTime String 支付时间:2019-05-07 18:01:02
transaction.reason Object 支付流水 变更原因 1:账户充值 2:订单支付 3:订单退款 4:人工赠送 5:人工扣减 6:注册赠送 7:礼品码赠送 8:礼品券赠送 9:调整订单金额 100:开发票 101:驳回
refundTransactionDto Object 退款流水信息,type=1时不为空
refundTransactionDto.timestamp Long 推送时间戳,单位秒
refundTransactionDto.refundId String 退款申请号
refundTransactionDto.refundTransactionId String 退款申请流水号
refundTransactionDto.refundType Integer 退款申请类型:1:全额退款 2:部分退款
refundTransactionDto.refundStatus Integer 退款状态:0:初始化 1:退款中 2:退款成功 3:退款失败
refundTransactionDto.refundFee Integer 退款金额, 单位: 分