On this page
Environment URLsProduction NetworksSDK Configuration ExamplesREST API Base PathsDemo ShopEnvironments
HashNut provides separate environments for testing and production use.
Environment URLs
| Environment | Base URL | Description |
|---|---|---|
| Production | https://defi.hashnut.io | Live environment with real funds |
| Testnet | https://testnet.hashnut.io | Testing environment with testnet tokens |
TIP
Always develop and test against the Testnet environment first. Switch to Production only after thorough testing.
Production Networks
| Chain Code | Network Name |
|---|---|
ETH | Ethereum Mainnet |
BSC | BNB Smart Chain |
POLYGON | Polygon (Matic) |
TRON | Tron Mainnet |
SDK Configuration Examples
go
import hashnut "github.com/hashnut/hashnut-go-sdk"
client := hashnut.NewClient(
"your-access-key-id",
"your-secret-key",
)
// Default base URL: https://api.hashnut.iogo
import hashnut "github.com/hashnut/hashnut-go-sdk"
client := hashnut.NewClient(
"your-access-key-id",
"your-secret-key",
hashnut.WithTestnet(),
)
// Base URL: https://testnet.hashnut.iogo
import hashnut "github.com/hashnut/hashnut-go-sdk"
client := hashnut.NewClient(
"your-access-key-id",
"your-secret-key",
hashnut.WithBaseURL("https://your-custom-endpoint.com"),
)REST API Base Paths
All API endpoints are prefixed with the version path:
{BASE_URL}/v4.0.0/...For example:
| Environment | Full Create Order URL |
|---|---|
| Production | https://api.hashnut.io/v4.0.0/pay/orders/api |
| Testnet | https://testnet.hashnut.io/v4.0.0/pay/orders/api |
Demo Shop
A reference implementation is available at:
| Component | URL |
|---|---|
| Demo Shop (frontend) | https://demo.hashnut.io |
The demo shop demonstrates the full payment flow including order creation, payment page, webhook handling, and order status display.
