OpenAPI 统一入口
POST
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)))
application/json- body
app_id*stringmethod*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*stringcharset*stringsign_type*"RSA2"Value in
"RSA2"version*stringtimestamp*string毫秒时间戳字符串
sign*string应用 RSA2 Base64
key_id?stringAccess Key id;管理面不需要
key_sign?stringAccess Key HMAC Base64
scope_id?stringcreate 必填
Value in
"payments.read_write""payments.refund"institution_no?stringmerchant_no?stringstore_no?stringinclude_revoked?stringlist 可选,truthy 含已吊销
merchant_order_no?stringorig_trans_no?stringorder_amount?stringprice_currency?stringpay_method_id?stringpay_channel_id?stringterminal_sn?stringterminal_type?stringdescription?stringnotify_url?stringFormat
uri[key: string]?any业务信封(HTTP 恒 200;看 code)
application/json- response
code*string0 成功;否则业务/准入错误码
msg*stringdata?unknown成功时为对象;失败常为 null
psn*stringsign?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>"}