Introduction
scanforpay APIs are using https protocol, and API request and response messages are formatted in JSON and encoded in UTF-8.
Request structure
Request must be sent by POST
method, and Content-Type
must set to be application/json
.
Request structure example:
{
"request":{
"header":{
<request header>
},
"body":{
<request body>
}
},
"signature" :"<signature>"
}
Request header
Name | Parameter | Type | Required | Description |
---|---|---|---|---|
API version | version | String (6) | Y | 1.0 |
Partner ID | partnerNo | String (15) | Y | 100XXXX03 |
Request ID | reqMsgId | String (32) | Y | 20180802100000100002 |
Requst Time | reqTime | String (25) | Y | Date time with timezone, see RFC 3339 Section 5.6 for details.2018-08-02T12:08:56+08:00 |
Signature type | signType | String (10) | N | Default:SHA256 |
Response structure
Response messages are formatted in JSON.
Response structure example:
{
"response":{
"header":{
<response header>
},
"body":{
<response body>
}
},
"signature" :"signature"
}
Response header
Name | Parameter | Type | Required | Description |
---|---|---|---|---|
API version | version | String (6) | Y | 1.0 |
Partner ID | partnerNo | String (15) | Y | 100XXXX03 |
Response ID | respMsgId | String (32) | Y | 20180802132000100002 |
Response time | respTime | String (25) | Y | Date time with timezone, see RFC 3339 Section 5.6.2018-08-02T12:10:01+08:00 |
Signature time | signType | String (10) | N | 默认 SHA256 |