9x Paynet OpenAPI

OpenAPI 统一入口

POST
/api/entry

Content-Type: application/json

应用 RSA2

非空字段(除 sign)按 key 排序拼 k=v&…,含 sign_type=RSA2;SHA256WithRSA → Base64。

Access Key HMAC(支付 + 强制 app)

key_sign = Base64(HMAC-SHA256(SHA-256(secret), sort_join(app_id,key_id,merchant_no,method,store_no,timestamp)))

Request Body

application/json
  1. body
app_id*string
method*string

能力名

Value in"access.key.create""access.key.list""access.key.rotate""access.key.revoke""pay.unifiedorder""order.query""order.refund.submit""order.refund.query"
format*string
charset*string
sign_type*"RSA2"
Value in"RSA2"
version*string
timestamp*string

毫秒时间戳字符串

sign*string

应用 RSA2 Base64

key_id?string

Access Key id;管理面不需要

key_sign?string

Access Key HMAC Base64

scope_id?string

create 必填

Value in"payments.read_write""payments.refund"
institution_no?string
merchant_no?string
store_no?string
include_revoked?string

list 可选,truthy 含已吊销

merchant_order_no?string
orig_trans_no?string
order_amount?string
price_currency?string
pay_method_id?string
pay_channel_id?string
terminal_sn?string
terminal_type?string
description?string
notify_url?string
Formaturi
[key: string]?any

Response Body

业务信封(HTTP 恒 200;看 code)

application/json
  1. response
code*string

0 成功;否则业务/准入错误码

msg*string
data?unknown

成功时为对象;失败常为 null

psn*string
sign?string

平台 RSA2 回签

curl -X POST 'https://api.9xnetwork.com/api/entry' \  -H 'Content-Type: application/json' \  -d '{  "app_id": "e2e_openapi_p2",  "method": "access.key.create",  "format": "JSON",  "charset": "UTF-8",  "sign_type": "RSA2",  "version": "1.0",  "timestamp": "1730000000000",  "sign": "<RSA2>",  "scope_id": "payments.read_write",  "institution_no": "100000349",  "merchant_no": "362600003447",  "store_no": "4626000005"}'
Example Response200
{  "code": "0",  "msg": "success",  "data": {    "key_id": "ak_130c25a009926ec86fcd0a37",    "app_id": "e2e_openapi_p2",    "scope_id": "payments.read_write",    "institution_no": "100000349",    "merchant_no": "362600003447",    "store_no": "4626000005",    "status": 1,    "methods": [      "order.query",      "pay.unifiedorder"    ],    "secret": "<once>"  },  "psn": "...",  "sign": "<platform RSA2>"}