2.7支付状态查询

优质
小牛编辑
125浏览
2023-12-01
用于协议2.6付款码支付、协议2.4二维码支付、2.9多码合一二维码查询支付状态

请求参数说明

参数描述必填示例值类型最大长度
action接口参数组object
└action需要调用的接口名称cash_pay_querystring
getGET参数组,本组参数需要参与签名object
└payid支付流水号,参数payid/bzid/token三选一1827707173number
└bzid业务单号,参数payid/bzid/token三选一47302320number
└token用2.9协议token,参数payid/bzid/token三选一t_K51Qstring

请求示例

{
	"action": {
		"action": "cash_pay_query"
	},
	"get": {
		"payid": "1827707173",
		"bzid": "47302320",
		"token": "t_K51Q"
	}
}

响应参数说明

参数描述必填示例值类型最大长度
status返回状态。接口成功时为1,出错为01number
state支付状态,当status=0时,会返回WAITstring
pay_amount0.01number
buyer_id用户idstring
trid微信支付交易号4200000086201801122813790345number
type类型, wx=微信,ali=支付宝wxstring
payid支付流水号32855290number18
src来源wxstring
cate支付类型(doext=线上扫码支付,qrwxpay=微信二维码支付,qralipay=支付宝二维码支付, codewxpay=微信刷卡支付,codealipay=支付宝刷卡支付,dopay=堂吃下单支付,tao=外卖下单支付)qpaystring
doid在线点菜订单号(仅在线点菜、外卖订单支付时会有)string
bzid业务单号1234number
amt金额0.01number
discount折扣金额0.00number
payamt实际支付金额0.01
pay_co用券金额0number
pay_mc用卡金额0number
pay_pt用积分金额0number
pay_wx微信金额0.01number
pay_ali支付宝金额0number
time支付时间2018-01-12 15:16:07string
msid10021number

响应示例

{
	"status": "0",
	"state": "WAIT",
	"pay_amount": "0.01",
	"buyer_id": "",
	"trid": "4200000086201801122813790345",
	"type": "wx",
	"payid": "32855290",
	"src": "wx",
	"cate": "qpay",
	"doid": "",
	"bzid": "1234",
	"amt": "0.01",
	"discount": "0.00",
	"payamt": 0.01,
	"pay_co": 0,
	"pay_mc": 0,
	"pay_pt": 0,
	"pay_wx": "0.01",
	"pay_ali": 0,
	"time": "2018-01-12 15:16:07",
	"server_timestamp": 1515741395,
	"server_time": "2018-01-12 15:16:35",
	"server_name": "wx10",
	"msid": "10021"
}