统一支付平台接口文档
  1. 支付接口
统一支付平台接口文档
  • 支付接口
    • 统一下单接口
      POST
    • 窗口条码付支付接口
      POST
    • 二维码扫码支付接口
      POST
    • 获取支付宝医保支付户付款码
      POST
  • 功能接口
    • 支付查询接口
      POST
    • 退费查询接口
      POST
    • 退费接口
      POST
    • 撤销接口
      POST
    • 账单下载接口
      POST
    • 获取支付平台appid
      POST
  • 医保一码付
    • 签约查询接口
      POST
    • 一码付支付
      POST
  • 签名
  • 支付流程
  • 对账试图标准
  1. 支付接口

统一下单接口

开发中
POST
/realpay/gateway
非窗口、自助机等终端。如微信公众号、微信小程序、支付宝生活号等终端可用。

请求参数

Body 参数application/json
appId
string 
appid
必需
appId (平台统一下发)
method
string 
方法名
必需
rop.trade.union.create
reqDate
string 
日期
必需
20230404
charset
string 
编码
必需
UTF-8
bizContent
object 
业务集合
必需
请求参数的集合,json字符串形式
orderNo
string 
订单号
必需
订单号
orderType
string 
订单类型
必需
订单类型1 住院 2门诊 4处方
payWayType
string 
支付方式
必需
32 微信公众号。35微信小程序。。(具体支付平台提供)
amount
string 
金额
必需
订单金额 。0.01
notifyUrl
string 
回调地址
必需
支付成功后支付平台回调第三方接口 例:http://127.0.0.1/payNotify
attach
string 
扩展参数
可选
调用方附加参数,回调通知时原样回传 例如 “12235” 回调获取requet. getParameter (“attach”) 返回“12345” 例如 {“name”:“用户名”} 回调获取requet. getParameter (“attach”) 返回“{“name”:“用户名”}”
spbillCreateIp
string 
使用方ip
可选
必须传正确的用户端IP 微信H5必传
hisBiz
object  | null 
his业务集合
必需
无特殊要求可不添加,字符串类型,JSON数据格式 例子:{‘clinicCode’: ‘22211323’}
insuranceParam
object 
医保集合
必需
字符串类型,JSON数据格式,如有需要支付平台提供
sign
string 
签名
必需
signType
string 
签名类型
必需
extras
string 
扩展参数
必需
注:有些支付渠道需要特殊参数 各支付渠道特定的扩展参数。JSON数据格式,例:{ 'xxx':'aaa', 'yyy':'bbb'} 支付宝前台回调:{'frontUrl': 'http:…… '} 32:微信公众号支付:{'openid':'aaa' }
version
string 
版本号
必需
例:1.0
示例
{
    "charset": "UTF-8",
    "method": "rop.trade.union.create",
    "reqDate": "20220921134407",
    "appId": "测试",
    "bizContent": "{\"orderNo\":\"cs10000000001\",\"orderType\":1,\"payWayType\":32,\"amount\":0.01,\"notifyUrl\":\"http://127.0.0.1:9090/rawTransNotify\",\"currencyType\":156,\"attach\":\"123\",\"operatorName\":null,\"wapUrl\":null,\"spbillCreateIp\":\"47.92.41.24\",\"overTime\":null,\"timeoutExpress\":null,\"hisBiz\":null,\"clientType\":null,\"operatorCode\":null}",
    "sign": "Or5t1vu1PmNVuekvg4I23TPRF7IGVgu/ZHMD6mybo8KmGDoTTng4e0hG0x5W4AeMHRz4eUVfy1w8oSPq90N57LXBpxU0Lqu5jtvpQaHEFQo5uJ8iHCw1p8li1W1SIkqlRvlfvbDic5/rcDY8mcPx7zKO3mlg7QSTep7pTVgZV6I=",
    "signType": "RSA",
    "extras": "{\"trmId\":null,\"trmBchNo\":null,\"trmPosNo\":null,\"macKey\":null,\"subPayType\":null,\"clinicCode\":null,\"recipeNos\":null,\"inpatientSeriNo\":null,\"markNo\":null,\"markType\":null,\"passWord\":null,\"openid\":\"oTasLj92pwCrXsVb9LHYR-VkdskQ\",\"phone\":null,\"userId\":null,\"authCode\":null,\"subject\":null,\"tradeId\":null,\"cyberSourceCardType\":null,\"cyberSourceCardNumber\":null,\"cyberSourceCardExpiryDate\":null,\"frontUrl\":null,\"cancelUrl\":null,\"locale\":null,\"payChannel\":null,\"productCode\":null,\"outTradeNo\":null,\"scene\":null,\"industry\":null,\"payAuthNo\":null,\"sellerId\":null,\"totalAmount\":null,\"insurancePayScene\":null,\"body\":null,\"timeoutExpress\":null,\"orgNo\":null,\"orgName\":null,\"serialNo\":null,\"billNo\":null,\"requestContent\":null,\"gmtOutCreate\":null,\"patientName\":null,\"isInsurance\":null,\"medicalCardInstId\":null,\"medicalCardId\":null,\"medicalRequesCotennt\":null,\"patientId\":null,\"patienName\":null,\"hisOperNum\":null,\"refundAmount\":null,\"hisRefundTime\":null,\"orgPowerTranId\":null,\"referUrl\":null}",
    "version": "1.0"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://test-cn.your-api-server.com/realpay/gateway' \
--header 'Content-Type: application/json' \
--data-raw '{
    "charset": "UTF-8",
    "method": "rop.trade.union.create",
    "reqDate": "20220921134407",
    "appId": "测试",
    "bizContent": "{\"orderNo\":\"cs10000000001\",\"orderType\":1,\"payWayType\":32,\"amount\":0.01,\"notifyUrl\":\"http://127.0.0.1:9090/rawTransNotify\",\"currencyType\":156,\"attach\":\"123\",\"operatorName\":null,\"wapUrl\":null,\"spbillCreateIp\":\"47.92.41.24\",\"overTime\":null,\"timeoutExpress\":null,\"hisBiz\":null,\"clientType\":null,\"operatorCode\":null}",
    "sign": "Or5t1vu1PmNVuekvg4I23TPRF7IGVgu/ZHMD6mybo8KmGDoTTng4e0hG0x5W4AeMHRz4eUVfy1w8oSPq90N57LXBpxU0Lqu5jtvpQaHEFQo5uJ8iHCw1p8li1W1SIkqlRvlfvbDic5/rcDY8mcPx7zKO3mlg7QSTep7pTVgZV6I=",
    "signType": "RSA",
    "extras": "{\"trmId\":null,\"trmBchNo\":null,\"trmPosNo\":null,\"macKey\":null,\"subPayType\":null,\"clinicCode\":null,\"recipeNos\":null,\"inpatientSeriNo\":null,\"markNo\":null,\"markType\":null,\"passWord\":null,\"openid\":\"oTasLj92pwCrXsVb9LHYR-VkdskQ\",\"phone\":null,\"userId\":null,\"authCode\":null,\"subject\":null,\"tradeId\":null,\"cyberSourceCardType\":null,\"cyberSourceCardNumber\":null,\"cyberSourceCardExpiryDate\":null,\"frontUrl\":null,\"cancelUrl\":null,\"locale\":null,\"payChannel\":null,\"productCode\":null,\"outTradeNo\":null,\"scene\":null,\"industry\":null,\"payAuthNo\":null,\"sellerId\":null,\"totalAmount\":null,\"insurancePayScene\":null,\"body\":null,\"timeoutExpress\":null,\"orgNo\":null,\"orgName\":null,\"serialNo\":null,\"billNo\":null,\"requestContent\":null,\"gmtOutCreate\":null,\"patientName\":null,\"isInsurance\":null,\"medicalCardInstId\":null,\"medicalCardId\":null,\"medicalRequesCotennt\":null,\"patientId\":null,\"patienName\":null,\"hisOperNum\":null,\"refundAmount\":null,\"hisRefundTime\":null,\"orgPowerTranId\":null,\"referUrl\":null}",
    "version": "1.0"
}'

返回响应

🟢200成功
application/json
Body
msgCode
string 
接口code
必需
msg
string 
接口描述
必需
charset
string 
编码
必需
signType
string 
编码格式
必需
sign
string 
签名
必需
data
object 
业务集合
必需
payInfo
string 
业务参数
必需
支付不同返回业务参数不同,具体支付平台提供
insurancePayResult
string 
医保参数
可选
无特殊情况可不用
payAppid
string 
支付appid
可选
无特殊情况可不用
示例
{
    "msgCode": "string",
    "msg": "string",
    "charset": "string",
    "signType": "string",
    "sign": "string",
    "data": {
        "payInfo": "string",
        "insurancePayResult": "string",
        "payAppid": "string"
    }
}
修改于 2023-06-05 06:44:33
下一页
窗口条码付支付接口
Built with