> 技术文档 > 微信小程序 发货信息录入接口 php版 对接_小程序发货接口

微信小程序 发货信息录入接口 php版 对接_小程序发货接口

官方文档地址 https://developers.weixin.qq.com/miniprogram/product/jiaoyilei/fahuoguanligongneng.html

准备工作:

1.先对接 token 接口获取access_token

接口为:请求方式为GET

https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$app_id&secret=$app_secret

 2.对接微信发货接口:https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token= 

 请求参数:

{ \"order_key\": { \"order_number_type\": \"2\", \"transaction_id\": \"xxx\" // 支付流水号 }, \"logistics_type\": 4, \"delivery_mode\": 1, \"shipping_list\": [ { \"item_desc\": \"支付订单#1212\"// 备注信息 } ], \"upload_time\": \"2024-10-18T16:50:27+08:00\", \"payer\": { \"openid\": \"xxx\"// 用户openid }}格式为:json

接口返回结果:

{\"errcode\":0,\"errmsg\":\"ok\"}

特殊说明:用于取消微信发货关闭失败情况,微信小程序支付无论业务系统是否有物流信息,微信接口都是自提模式。