cURL 示例
使用 cURL 的直接 API 示例,适用于任何语言。
创建订单
curl -X POST 'https://testnet.hashnut.io/api/v3.0.0/pay/createPayOrderOnSplitWalletWithApiKey' \
-H 'hashnut-request-uuid: <uuid>' \
-H 'hashnut-request-timestamp: <timestamp>' \
-H 'hashnut-request-sign: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"accessKeyId": "YOUR_ACCESS_KEY_ID",
"merchantOrderId": "order-123",
"chainCode": "erc20",
"coinCode": "usdt",
"amount": 0.01,
"callBackUrl": "https://your-site.com/api/webhook",
"frontendCallbackUrl": "https://your-site.com/payment/success"
}'
查询订单
curl -X POST 'https://testnet.hashnut.io/api/v3.0.0/pay/queryPayOrderWithAccessSign' \
-H 'Content-Type: application/json' \
-d '{
"merchantOrderId": "order-123",
"payOrderId": "01KBZ292SK2GKFK97916F5EC3B",
"accessSign": "D3DE7E4002057C0EAED1BE2268DA53CC9058DCFC9DCAF50D999AF270A7B033C5"
}'
获取链信息
curl -X POST 'https://testnet.hashnut.io/api/v2.0.0/config/queryAllChainInfo' \
-H 'Content-Type: application/json' \
-d '{}'
完整 API 文档请参见API 参考。
使用 cURL? 查看API 参考 →