Skip to main content

API Reference

HashNut provides a comprehensive RESTful API for accepting cryptocurrency payments across 164+ blockchain networks. All API endpoints use HMAC-SHA256 signature-based authentication.

Base URLs

  • Testnet: https://testnet.hashnut.io
  • Production: https://api.hashnut.io (coming soon)

API Versioning

All v3.0.0 endpoints are prefixed with /api/v3.0.0/

Current Version: v3.0.0

Authentication

All API requests require HMAC-SHA256 signature authentication. See the Authentication guide for details.

Request Format

Headers

All authenticated requests must include:

hashnut-request-uuid: <unique-uuid>
hashnut-request-timestamp: <timestamp-in-milliseconds>
hashnut-request-sign: <hmac-sha256-signature-base64>
Content-Type: application/json

Request Body

All request bodies use JSON format:

{
"accessKeyId": "string",
"merchantOrderId": "string",
"chainCode": "string",
"coinCode": "string",
"amount": 0.01
}

Response Format

Success Response

{
"code": 0,
"msg": "success",
"data": {
// Response data
}
}

Error Response

{
"code": -2,
"msg": "Invalid signature or credentials",
"data": null
}

Response Codes:

Rate Limiting

Rate Limits:

  • Standard Tier:
  • High Volume Tier:
  • Enterprise Tier:

Rate limit headers are included in responses:

  • X-RateLimit-Limit: Maximum requests per period
  • X-RateLimit-Remaining: Remaining requests in current period
  • X-RateLimit-Reset: Time when limit resets

Supported Chains

HashNut supports 164+ blockchain networks. See Multi-Chain Support for details.

Common Chain Codes:

  • erc20: Ethereum
  • polygon-erc20: Polygon
  • bsc-erc20: Binance Smart Chain
  • tron-trc20: TRON

SDK Support

Official SDKs are available for:

Getting Started

  1. Get API Credentials: Create an account and generate API keys
  2. Authenticate Requests: Learn signature generation
  3. Create Your First Order: Create a payment order
  4. Handle Webhooks: Set up payment notifications

Support

For API support and questions:

Next Steps


Ready to integrate? Start with Authentication →