智能桌面对接计费接口-1.0版本

By sxzcache at 2019-11-26 • 0人收藏 • 4942人看过

智能桌面计费接口-1.0版本

简介,对接采用http1.1 POST协议,计费通过http请求查询到IPTV的区域和用户组,选择一个用户组作为开户用户资料通过POST请求发送给IPTV后台开户,发送用户名和过期时间作为续费请求数据,计费端停机,复机,销户发送用户名给IPTV后台作为用户标识。  

 

协议约定

消息发起方:XXX计费

消息接收方:神行者IPTV

接口请求方法:HTTP GET POST 支持标准http1.1协议

消息报文编码:UTF-8 注意对参数进行 urlencode 编码

 

用户组查询

API 接口地址http://ip:9901/iptv/charging/groupquery

Iptv后台响应数据:{data:[groupid:1000,groupname:”用户组名称]}

 

计费开户请求

API接口地址:http://ip:9901/iptv/charging/openaccount

POST/iptv/charging/openaccount HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

org : 1,

group : 1000,

account : ldj,

“expire” : 2019-02-21 12:45

}

 

计费续费请求:

API接口地址:http://0.0.0.0:9901/iptv/renew

POST/iptv/charging/renew HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

account : ldj,

“expire” : 2019-02-21 12:45

}

 

计费停机请求:

API接口地址:http://0.0.0.0:9901/iptv/pause

POST/iptv/charging/pause HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

account : ldj,

}

 

计费请求:

API接口地址:http://0.0.0.0:9901/iptv/charging/resume

POST/iptv/charging/resume HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

account : ldj,

}

 

计费销户请求:

API接口地址:http://0.0.0.0:9901/iptv/charging/cancel

POST/iptv/charging/cancel HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

account : ldj,

}

 

1,回复信息状态code :0 成功,其他失败。

HTTP/1.1 200 OK

Accept-Ranges: bytes

Content-Type: application/json; charset=utf-8

Content-Length: 52

{"code": 0,"msg": "成功/失败原因"}

 

 

 


1 个回复 | 最后更新于 2020-06-03
2020-06-03   #1

计费续费请求:

API接口地址:http://0.0.0.0:9901/iptv/renew

POST/iptv/charging/renew HTTP/1.1

Host: iptv.xspeeder.com

Connection: close

Content-Length: 133

Content-Type: application/json;

Accept: application/json

{

account : ldj,

“expire” : 2019-02-21 12:45

}

这个接口加个mac字段可以把mac更新掉

登录后方可回帖

Loading...