收钱吧 轻POS API
1.1.请求通用定义
本平台所有请求格式均采用JSON格式,请求字符集采用UTF-8编码。
所有请求均按照以下通用格式定义:
参数 | 出现 | 类型 | 约束 | 描述 |
---|---|---|---|---|
request | 1 | String | JSON格式的string字符串 | 标志一次接口请求的请求体 |
request.head | 1 | String | JSON格式的string字符串 | 标志本次请求的公共参数 |
request.body | 1 | String | JSON格式的string字符串 | 标志本次请求的业务对象 |
signature | 1 | String | 签名,RSA加密 | 本次请求的请求体的加密签名,用于接口安全性校验。签名规则见本文档目录1.3.签名 |
参数 | 出现 | 类型 | 约束 | 描述 |
---|---|---|---|---|
request.head.appid | 1 | String | 数字,最大32位 | 轻POS应用编号,商户入网后由收钱吧技术支持提供 |
request.head.sign_type | 1 | String | 签名算法 | 支持的签名算法: SHA256':SHA256withRSA |
request.head.request_time | 1 | String | 字符串,最大64位 | 发起请求时间,格式详见 1.5时间数据元素定义 |
request.head.reserve | 0-1 | String | 字符串,长度不限 | |
request.head.version | 1 | String | 字符串,最大10位 | 收钱吧应用版本号,当前版本1.0.0 |
请求体样例:
{
"request": {
"head": {
"version": "1.0.0",
"sign_type": "SHA256",
"appid": "test_appid",
"request_time": "2001-07-04T12:08:56+05:30",
"reserve": "{}"
},
"body": {
"subject": "this is request business body"
}
},
"signature": "blmSaxUF6/N2XOcz7UWRRVQ5XsVCEz1BpZl6R9Rc6TA3+IfWhJtmCsUZjtw72w1QQ8rEV6+uMh3GWbyzH02Y9dJQCW"
}