# 支付状态同步(享道)

# 简介

根据订单号上传订单支付状态。支付后调用,如果调用失败,调用方要适当重试。

# 服务提供方

享道

# 接口URL

/openapi/pay/status

# 请求方式

POST

# 请求频次

单次

# 请求参数

参数名称 类型 必选 说明
timestamp long 请求时间,Unix Timestamp单位毫秒
order_id string 享道订单ID
oid string 合作方订单ID
status int 支付状态,0表示失败,1表示成功
notify_type int 通知类型,0 支付 1 退款 默认为0
activity_id string 优惠券 ID
coupon_amount int 优惠券金额,单位分
amount int 实付金额
pay_detail list 支付详情
pay_detail.pay_type string 支付方式:0现金;1供应商优惠券;3平台优惠券;4积分;5其他
pay_detail.amount long 支付明细金额,单位分
coupon_details list 优惠明细
coupon_details.bearing string 成本承担方 1享道 2合作方
coupon_details.amount int 金额 分
coupon_details.type int 外部优惠类型 1=折后类型 2=券类型 3=其他
refundInfo list 退款信息 notify_type为1时使用
refundInfo.refundId string 我方退款时传入的退款ID
refundInfo.refundCost int 退款金额,单位分
refundInfo.refundStatus int 退款状态 0=失败 1=成功
refundInfo.refundTime string 发起退款时间, 例如2019-01-01 00:00:00
refundInfo.remark string 备注
refundInfo.thirdRefundId string 商户退款单号
refundInfo.details list 退款渠道及金额
refundInfo.details.channelId int 127-微信 137-支付宝
refundInfo.details.fee int 退款费用

# 响应参数

参数名称 类型 必有 说明
errCode int 服务响应状态,参见附录5
errMsg string 服务响应状态说明,参见附录5
content object
content.oid string 合作方订单id
content.order_id string 享道订单id

# 请求事例

请求

curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/pay/status' \
--header 'X-Sign: aab078dd08a60c2a2e72bbbdfca3c9f94ab40e13' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201021113700' \
--header 'X-MerchantId: open_app_OqPcV19dBV1KoBHs' \
--header 'Content-Type: application/json' \
--data-raw '{"timestamp":1603251429546,"oid":"Tess9lrv05zfmgdodrgwxlv2svhye9l26rdp","order_id":"U4b3x6n9w1b2bfbd3a148e4fec90642d50092c63fa","notify_type":0,,"status":1}'

响应

{
    "errCode":10000,
    "errMsg":"successful",
    "content":{
        "oid":"Tess9lrv05zfmgdodrgwxlv2svhye9l26rdp",
        "order_id":"U4b3x6n9w1b2bfbd3a148e4fec90642d50092c63fa"
    }
}