POST /apiv2/time/order
为TRON地址(主机模式)购买特定的能量委托周期。
概述
时间顺序端点允许您为已处于主机模式的地址购买特定数量的能量委托周期。每个周期提供 131,000 个能量,持续 24 小时。此端点非常适合精确控制能量分配和预算管理,允许您仅购买操作所需数量的周期。
端点 URL
POST https://netts.io/apiv2/time/order
身份验证
此端点使用JSON主体身份验证(而非标头)。您的API密钥、目标地址和所需的循环计数都将提供在请求主体中。
身份验证流程
- API Key Validation: System verifies the API key exists and is active
- IP Whitelist Check: Request IP must match configured whitelist
- Ownership Verification: API key must own the specified address
- Balance Check: Account must have sufficient balance for the cycles
- Status Verification: Address must be in Host Mode and not in infinity mode
请求头
Header | Required | Description |
---|---|---|
Content-Type | Yes | application/json |
请求体
json
{
"api_key": "your_api_key",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"cycles": 10
}
参数
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
api_key | string | Yes | Must exist in system | Your API key for authentication and billing |
address | string | Yes | TRC-20 format | TRON address to purchase cycles for (must start with 'T' and be 34 characters) |
cycles | integer | Yes | 1-1000 | Number of 24-hour energy cycles to purchase |
参数验证
api_key:
- Must be a valid 32-character hexadecimal string
- Must be associated with an active account
- Must have ownership of the specified address
- Account must not be suspended or restricted
- Balance must cover cycle cost
address:
- Must match TRC-20 format
^T[1-9A-HJ-NP-Za-km-z]{33}$
- Must be currently in Host Mode under your account
- Cannot be in infinity mode (use standard mode only)
- Cannot have pending cycle orders
- Must have completed initial activation
- Must match TRC-20 format
cycles:
- Must be a positive integer between 1 and 1000
- Total cycles (existing + new) cannot exceed 10,000
- Minimum order: 1 cycle
- Maximum single order: 1000 cycles
- Bulk orders >1000 require special approval
IP Address:
- Your request IP must be in the whitelist associated with your API key
- Maximum 5 IP addresses per API key
- IPv4 and IPv6 supported
示例请求
cURL
bash
curl -X POST https://netts.io/apiv2/time/order \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY_HERE",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"cycles": 10
}'
Python
python
import requests
import json
from typing import Dict, Optional
def order_cycles(api_key: str, address: str, cycles: int) -> Dict:
"""
Purchase energy delegation cycles for a TRON address in Host Mode.
Args:
api_key: Your API authentication key
address: TRON address to purchase cycles for
cycles: Number of cycles to purchase (1-1000)
Returns:
API response dictionary
"""
url = "https://netts.io/apiv2/time/order"
# Validate address format
if not address.startswith('T') or len(address) != 34:
raise ValueError(f"Invalid TRON address format: {address}")
# Validate cycle count
if not 1 <= cycles <= 1000:
raise ValueError(f"Invalid cycle count: {cycles}. Must be between 1 and 1000")
data = {
"api_key": api_key,
"address": address,
"cycles": cycles
}
try:
response = requests.post(url, json=data, verify=True, timeout=30)
response.raise_for_status()
result = response.json()
if result['code'] == 0:
print(f"✅ Successfully purchased {result['data']['cycles_purchased']} cycles")
print(f"Address: {result['data']['address']}")
print(f"Total cycles: {result['data']['total_cycles']}")
print(f"Total cost: {result['data']['total_cost']} TRX")
print(f"Next delegation: {result['data'].get('next_delegation_time', 'N/A')}")
else:
print(f"❌ Error: {result['msg']}")
return result
except requests.exceptions.RequestException as e:
print(f"❌ Request failed: {str(e)}")
raise
except json.JSONDecodeError as e:
print(f"❌ Invalid JSON response: {str(e)}")
raise
# Example usage
if __name__ == "__main__":
API_KEY = "YOUR_API_KEY_HERE"
ADDRESS = "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
CYCLES = 10
result = order_cycles(API_KEY, ADDRESS, CYCLES)
Node.js
javascript
const axios = require('axios');
/**
* Purchase energy delegation cycles for a TRON address in Host Mode
* @param {string} apiKey - Your API authentication key
* @param {string} address - TRON address to purchase cycles for
* @param {number} cycles - Number of cycles to purchase (1-1000)
* @returns {Promise<Object>} API response
*/
async function orderCycles(apiKey, address, cycles) {
const url = 'https://netts.io/apiv2/time/order';
// Validate address format
if (!address.startsWith('T') || address.length !== 34) {
throw new Error(`Invalid TRON address format: ${address}`);
}
// Validate cycle count
if (!Number.isInteger(cycles) || cycles < 1 || cycles > 1000) {
throw new Error(`Invalid cycle count: ${cycles}. Must be between 1 and 1000`);
}
const data = {
api_key: apiKey,
address: address,
cycles: cycles
};
try {
const response = await axios.post(url, data, {
headers: {
'Content-Type': 'application/json'
},
timeout: 30000
});
const result = response.data;
if (result.code === 0) {
console.log(`✅ Successfully purchased ${result.data.cycles_purchased} cycles`);
console.log(`Address: ${result.data.address}`);
console.log(`Total cycles: ${result.data.total_cycles}`);
console.log(`Total cost: ${result.data.total_cost} TRX`);
console.log(`Next delegation: ${result.data.next_delegation_time || 'N/A'}`);
} else {
console.error(`❌ Error: ${result.msg}`);
}
return result;
} catch (error) {
if (error.response) {
console.error(`❌ API Error: ${error.response.status} - ${error.response.data?.msg || error.message}`);
} else if (error.request) {
console.error('❌ No response from server');
} else {
console.error(`❌ Request failed: ${error.message}`);
}
throw error;
}
}
// Example usage
(async () => {
const API_KEY = 'YOUR_API_KEY_HERE';
const ADDRESS = 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE';
const CYCLES = 10;
try {
const result = await orderCycles(API_KEY, ADDRESS, CYCLES);
console.log('Result:', result);
} catch (error) {
console.error('Failed to order cycles:', error.message);
}
})();
PHP
php
<?php
/**
* Purchase energy delegation cycles for a TRON address in Host Mode
*
* @param string $apiKey Your API authentication key
* @param string $address TRON address to purchase cycles for
* @param int $cycles Number of cycles to purchase (1-1000)
* @return array API response
*/
function orderCycles($apiKey, $address, $cycles) {
$url = 'https://netts.io/apiv2/time/order';
// Validate address format
if (!preg_match('/^T[1-9A-HJ-NP-Za-km-z]{33}$/', $address)) {
throw new InvalidArgumentException("Invalid TRON address format: $address");
}
// Validate cycle count
if (!is_int($cycles) || $cycles < 1 || $cycles > 1000) {
throw new InvalidArgumentException("Invalid cycle count: $cycles. Must be between 1 and 1000");
}
$data = [
'api_key' => $apiKey,
'address' => $address,
'cycles' => $cycles
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data),
'timeout' => 30
]
];
$context = stream_context_create($options);
$response = @file_get_contents($url, false, $context);
if ($response === false) {
$error = error_get_last();
throw new RuntimeException('Request failed: ' . $error['message']);
}
$result = json_decode($response, true);
if ($result['code'] == 0) {
echo "✅ Successfully purchased {$result['data']['cycles_purchased']} cycles\n";
echo "Address: {$result['data']['address']}\n";
echo "Total cycles: {$result['data']['total_cycles']}\n";
echo "Total cost: {$result['data']['total_cost']} TRX\n";
} else {
echo "❌ Error: {$result['msg']}\n";
}
return $result;
}
// Example usage
$API_KEY = 'YOUR_API_KEY_HERE';
$ADDRESS = 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE';
$CYCLES = 10;
try {
$result = orderCycles($API_KEY, $ADDRESS, $CYCLES);
print_r($result);
} catch (Exception $e) {
echo "Failed to order cycles: " . $e->getMessage() . "\n";
}
?>
Go
go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"time"
)
// OrderRequest represents the API request structure
type OrderRequest struct {
APIKey string `json:"api_key"`
Address string `json:"address"`
Cycles int `json:"cycles"`
}
// OrderResponse represents the API response structure
type OrderResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Address string `json:"address"`
CyclesPurchased int `json:"cycles_purchased"`
TotalCycles int `json:"total_cycles"`
TotalCost float64 `json:"total_cost"`
PricePerCycle float64 `json:"price_per_cycle"`
OrderID string `json:"order_id"`
TransactionHash string `json:"transaction_hash"`
NextDelegation int64 `json:"next_delegation_time"`
} `json:"data"`
}
// OrderCycles purchases energy delegation cycles for a TRON address
func OrderCycles(apiKey, address string, cycles int) (*OrderResponse, error) {
url := "https://netts.io/apiv2/time/order"
// Validate address format
if len(address) != 34 || address[0] != 'T' {
return nil, fmt.Errorf("invalid TRON address format: %s", address)
}
// Validate cycle count
if cycles < 1 || cycles > 1000 {
return nil, fmt.Errorf("invalid cycle count: %d. Must be between 1 and 1000", cycles)
}
// Create request
reqData := OrderRequest{
APIKey: apiKey,
Address: address,
Cycles: cycles,
}
jsonData, err := json.Marshal(reqData)
if err != nil {
return nil, err
}
// Make HTTP request
client := &http.Client{Timeout: 30 * time.Second}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
// Read response
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
// Parse response
var result OrderResponse
if err := json.Unmarshal(body, &result); err != nil {
return nil, err
}
if result.Code == 0 {
fmt.Printf("✅ Successfully purchased %d cycles\n", result.Data.CyclesPurchased)
fmt.Printf("Address: %s\n", result.Data.Address)
fmt.Printf("Total cycles: %d\n", result.Data.TotalCycles)
fmt.Printf("Total cost: %.2f TRX\n", result.Data.TotalCost)
} else {
fmt.Printf("❌ Error: %s\n", result.Msg)
}
return &result, nil
}
func main() {
apiKey := "YOUR_API_KEY_HERE"
address := "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
cycles := 10
result, err := OrderCycles(apiKey, address, cycles)
if err != nil {
fmt.Printf("Failed to order cycles: %v\n", err)
return
}
fmt.Printf("Order ID: %s\n", result.Data.OrderID)
}
响应
成功响应 (200 OK)
json
{
"code": 0,
"msg": "Cycles successfully purchased",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"cycles_purchased": 10,
"total_cycles": 25,
"previous_cycles": 15,
"total_cost": 30.0,
"price_per_cycle": 3.0,
"discount_applied": 0,
"order_id": "ORD-20231109-A7C9F2B3",
"transaction_hash": "b8d4f1a2c7e9b3d5f8a1c4e7b9d2f5a8c1e4f8b2d5f8c1e4b7d2f5a8c1e4f8b2",
"payment_method": "account_balance",
"balance_after": 470.0,
"next_delegation_time": 1699615200,
"expiry_time": 1701475200,
"status": "confirmed"
}
}
响应字段
Field | Type | Description |
---|---|---|
code | integer | Status code (0 for success, -1 for error) |
msg | string | Human-readable status message |
data | object | Response data object |
data.address | string | The TRON address cycles were purchased for |
data.cycles_purchased | integer | Number of cycles purchased in this order |
data.total_cycles | integer | Total cycles now available for the address |
data.previous_cycles | integer | Number of cycles before this purchase |
data.total_cost | number | Total cost in TRX for this order |
data.price_per_cycle | number | Price per cycle in TRX |
data.discount_applied | number | Discount amount applied (if any) |
data.order_id | string | Unique order identifier for tracking |
data.transaction_hash | string | TRON blockchain transaction hash |
data.payment_method | string | Payment method used ("account_balance", "card", "crypto") |
data.balance_after | number | Account balance after purchase |
data.next_delegation_time | integer | Unix timestamp for next energy delegation |
data.expiry_time | integer | Unix timestamp when last cycle expires |
data.status | string | Order status ("confirmed", "pending", "processing") |
错误响应
身份验证错误 (401)
json
{
"code": -1,
"msg": "Invalid API key",
"data": null
}
Causes:
- Invalid or expired API key
- API key not found in system
- Account suspended or terminated
Resolution:
- Verify API key is correct
- Check account status in dashboard
- Contact support if key should be valid
地址未找到 (404)
json
{
"code": -1,
"msg": "Address not found in Host Mode",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"suggestion": "Use /time/add to add this address to Host Mode first"
}
}
Causes:
- Address not in Host Mode
- Address was deleted from Host Mode
- Address belongs to different API key
Resolution:
- Add address to Host Mode using
/time/add
first - Verify address ownership
- Check address status with
/time/status
余额不足 (402)
json
{
"code": -1,
"msg": "Insufficient balance to purchase cycles",
"data": {
"required_amount": 30.0,
"current_balance": 10.0,
"deficit": 20.0,
"cycles_requested": 10,
"price_per_cycle": 3.0
}
}
Causes:
- Account balance too low for purchase
- Credit limit exceeded
- Payment method declined
Resolution:
- Add funds to your account
- Reduce number of cycles requested
- Check payment method status
- Contact support for credit increase
无效循环计数 (400)
json
{
"code": -1,
"msg": "Invalid cycle count",
"data": {
"requested": 1500,
"minimum": 1,
"maximum": 1000,
"suggestion": "For bulk orders over 1000 cycles, contact support"
}
}
Causes:
- Cycles less than 1 or greater than 1000
- Non-integer value provided
- Exceeds account limits
Resolution:
- Ensure cycles between 1 and 1000
- Use integer values only
- Contact support for bulk orders
- Check account cycle limits
Infinity模式下的地址 (409)
json
{
"code": -1,
"msg": "Cannot purchase cycles for address in infinity mode",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"mode": "infinity",
"suggestion": "Infinity mode provides unlimited cycles automatically"
}
}
Causes:
- Address has infinity mode enabled
- Infinity mode incompatible with cycle purchases
- Mode conflict detected
Resolution:
- No action needed - infinity mode provides unlimited cycles
- Disable infinity mode if you prefer manual cycle purchases
- Use
/time/status
to check current mode
最大循环次数已超过 (409)
json
{
"code": -1,
"msg": "Maximum cycle limit exceeded",
"data": {
"current_cycles": 9500,
"requested_cycles": 600,
"total_would_be": 10100,
"maximum_allowed": 10000,
"available_to_purchase": 500
}
}
Causes:
- Total cycles would exceed 10,000 limit
- Account has cycle cap restrictions
- Safety limit reached
Resolution:
- Purchase fewer cycles (max available shown)
- Use existing cycles before purchasing more
- Consider infinity mode for unlimited cycles
- Contact support to increase limits
存在未完成订单 (409)
json
{
"code": -1,
"msg": "Pending order already exists for this address",
"data": {
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"pending_order_id": "ORD-20231109-X3D5F7A9",
"status": "processing",
"retry_after": 60
}
}
Causes:
- Previous order still processing
- Duplicate order attempt
- Transaction not yet confirmed
Resolution:
- Wait for pending order to complete
- Check order status with order ID
- Retry after specified time
- Contact support if order stuck
速率限制
Period | Limit | Description |
---|---|---|
1 minute | 6 requests | Maximum 6 requests per minute per API key |
1 hour | 100 requests | Maximum 100 requests per hour per API key |
1 day | 1000 requests | Maximum 1000 requests per day per API key |
速率限制报头
http
X-RateLimit-Limit-Minute: 6
X-RateLimit-Remaining-Minute: 5
X-RateLimit-Reset-Minute: 1699528860
X-RateLimit-Limit-Hour: 100
X-RateLimit-Remaining-Hour: 98
X-RateLimit-Reset-Hour: 1699532400
X-RateLimit-Limit-Day: 1000
X-RateLimit-Remaining-Day: 995
X-RateLimit-Reset-Day: 1699574400
速率限制超出响应 (429)
json
{
"code": -1,
"msg": "API rate limit exceeded",
"data": {
"retry_after": 45,
"limit": "6 per minute",
"reset_at": 1699528860
}
}
理解周期
什么是周期?
一个周期代表 24 小时能量委托期,提供:
- Energy Amount: 131,000 energy units
- Duration: 24 hours from activation
- Auto-activation: Next cycle starts automatically when current expires
- Stackable: Multiple cycles queue sequentially
周期生命周期
- Purchase: Cycles added to address queue
- Activation: First cycle starts immediately or when current expires
- Delegation: Energy delegated to address on blockchain
- Usage: Address can use energy for transactions
- Expiration: After 24 hours, cycle ends
- Next Cycle: If available, next cycle auto-starts
周期定价
Quantity | Price per Cycle | Total Cost | Discount |
---|---|---|---|
1-9 | 3.0 TRX | Qty × 3.0 | 0% |
10-49 | 2.8 TRX | Qty × 2.8 | 7% |
50-99 | 2.6 TRX | Qty × 2.6 | 13% |
100-499 | 2.4 TRX | Qty × 2.4 | 20% |
500-999 | 2.2 TRX | Qty × 2.2 | 27% |
1000+ | Contact Support | Custom | 30%+ |
周期管理
- Queue System: Cycles queue in order of purchase
- No Overlap: Cycles don't run simultaneously
- No Waste: Unused energy doesn't carry over
- Refills: Can purchase more cycles anytime
- Maximum: 10,000 cycles per address
主机模式影响
主机模式下的循环工作原理
- Automatic Management: Host Mode handles cycle activation
- Sequential Processing: Cycles activate one after another
- No Manual Intervention: System manages everything
- Energy Guarantee: 131,000 energy per cycle guaranteed
- Continuous Operation: No gaps between cycles
周期模式与无限模式
Feature | Cycle Mode | Infinity Mode |
---|---|---|
Purchase Method | Buy specific quantity | Unlimited auto-renew |
Billing | Prepaid per cycle | Daily subscription |
Flexibility | Full control | Set and forget |
Best For | Variable usage | Constant usage |
Minimum Commitment | 1 cycle | Daily billing |
Price Predictability | Fixed prepaid | Fixed daily rate |
计费和支付
支付流程
- Calculation: System calculates total cost with discounts
- Balance Check: Verifies sufficient account balance
- Deduction: Amount deducted from account
- Confirmation: Order confirmed and cycles added
- Receipt: Email receipt sent with details
支付方式
- Account Balance: Primary payment method
- Auto-recharge: Automatic top-up when low
- Credit Card: Stored cards for quick payment
- Cryptocurrency: Bitcoin, Ethereum, USDT accepted
- Wire Transfer: For enterprise accounts
计费详情
- Immediate Charge: Payment processed instantly
- No Recurring: One-time payment per order
- Volume Discounts: Automatic for larger orders
- Tax Included: Prices include applicable taxes
- Invoicing: Available for business accounts
安全注意事项
身份验证安全
- API Key Storage: Never expose API keys in client-side code
- HTTPS Only: All requests must use HTTPS
- IP Whitelist: Configure IP whitelist for production use
- Key Rotation: Rotate API keys regularly
订单安全
- Duplicate Prevention: System prevents duplicate orders
- Idempotency: Same request won't create multiple orders
- Transaction Verification: Blockchain confirmation required
- Audit Trail: All orders logged with details
验证检查
API 密钥验证
- Key exists and is active
- Account has sufficient balance
- Not exceeded rate limits
地址验证
- Address in Host Mode
- Owned by API key account
- Not in infinity mode
循环验证
- Valid integer range
- Within account limits
- Total doesn't exceed maximum
请求完整性
- Valid JSON format
- Required fields present
- No injection attempts
技术架构
服务组件
API 网关
- Request validation and routing
- Rate limiting enforcement
- IP whitelist checking
订单处理服务
- Order validation and creation
- Pricing calculation
- Discount application
支付服务
- Balance verification
- Payment processing
- Receipt generation
周期管理服务
- Cycle queue management
- Activation scheduling
- Expiry tracking
区块链服务
- Energy delegation execution
- Transaction confirmation
- On-chain verification
数据库层
- PostgreSQL for order data
- Redis for caching and queues
- Time-series for usage tracking
请求流程
- Client sends POST request with API key, address, and cycles
- API Gateway validates request format and rate limits
- Authentication Service verifies API key and permissions
- Order Processing Service calculates pricing with discounts
- Payment Service processes payment from account balance
- Cycle Management Service adds cycles to address queue
- Blockchain Service prepares delegation transactions
- Response sent to client with order details
订单处理流程
验证阶段
- Input validation
- Business rule checks
- Fraud detection
定价阶段
- Base price calculation
- Discount application
- Tax calculation
支付阶段
- Balance verification
- Payment execution
- Transaction recording
履行阶段
- Cycle allocation
- Queue update
- Notification dispatch
相关端点
- POST /apiv2/time/add - Add address to Host Mode (required first)
- POST /apiv2/time/status - Check current cycles and status
- POST /apiv2/time/infinitystart - Switch to unlimited cycles
- POST /apiv2/time/stop - Pause cycle consumption
- POST /apiv2/time/delete - Remove from Host Mode
最佳实践
何时订购周期
- Regular Usage: Order weekly/monthly batches
- Project-Based: Order cycles for project duration
- Testing: Start with small quantities
- Production: Maintain buffer of cycles
最佳订单数量
- Small Projects: 10-50 cycles
- Medium Usage: 100-500 cycles
- High Usage: 500-1000 cycles
- Enterprise: Custom bulk orders
成本优化
- Bulk Purchases: Take advantage of volume discounts
- Plan Ahead: Order larger quantities for better rates
- Monitor Usage: Track consumption patterns
- Consider Infinity: For constant usage, infinity mode may be cheaper
订单管理
- Track Orders: Save order IDs for reference
- Monitor Balance: Ensure sufficient funds
- Set Alerts: Configure low cycle warnings
- Review Usage: Analyze cycle consumption
故障排除
常见问题
“余额不足”
问题: 余额不足以购买所需周期
Solutions:
- Check account balance in dashboard
- Add funds to account
- Reduce number of cycles
- Check for pending charges
“地址未处于主机模式”
问题: 尝试为非主机模式地址订购周期
Solutions:
- Add address using
/time/add
endpoint first - Verify address status with
/time/status
- Check using correct API key
- Ensure address format is correct
“最大循环次数已超过”
问题: 订单将超过10,000个周期的限制
Solutions:
- Check current cycle count with
/time/status
- Calculate available capacity
- Use some cycles before ordering more
- Consider infinity mode for unlimited
“无效循环计数”
问题: 循环参数超出有效范围
Solutions:
- Ensure cycles between 1 and 1000
- Use integer values only
- Check for typos in request
- Validate input before sending
订单问题
订单处理卡住
症状: 订单状态保持“处理中”
Solutions:
- Wait up to 5 minutes for confirmation
- Check blockchain transaction status
- Verify network isn't congested
- Contact support with order ID
周期未显示
症状: 已购买周期未显示在状态中
Solutions:
- Allow 1-2 minutes for update
- Check order confirmation response
- Verify correct address was used
- Use
/time/status
to refresh
支付失败
症状: 订单因支付问题被拒绝
Solutions:
- Verify account balance sufficient
- Check payment method valid
- Ensure no account restrictions
- Contact support for payment help
获取帮助
如果您遇到此处未涵盖的问题:
- Check Documentation: Review this guide and related endpoints
- API Status: Check https://status.netts.io for service status
- Order History: Review orders in dashboard
- Support Ticket: Submit ticket with order ID
- Emergency: Use emergency contact for urgent issues
Webhook
可用的Webhook事件
order.created
: New order placedorder.confirmed
: Order payment confirmedorder.fulfilled
: Cycles added to addressorder.failed
: Order failed to processcycle.activated
: New cycle startedcycle.expiring
: Cycle about to expirecycles.low
: Running low on cycles
Webhook 配置
json
{
"url": "https://your-server.com/webhooks",
"events": ["order.confirmed", "cycles.low"],
"secret": "your_webhook_secret"
}
Webhook有效负载示例
json
{
"event": "order.confirmed",
"timestamp": 1699528800,
"data": {
"order_id": "ORD-20231109-A7C9F2B3",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"cycles": 10,
"total_cost": 30.0,
"api_key_id": "key_123***"
},
"signature": "sha256=abc123..."
}
备注
- Prerequisites: Address must be in Host Mode via
/time/add
first - Immediate Processing: Orders are processed instantly upon payment
- No Cancellation: Purchased cycles cannot be cancelled or refunded
- Transferability: Cycles cannot be transferred between addresses
- Expiry: Unused cycles don't expire but remain queued
- Stacking: Multiple orders stack sequentially, not concurrently
- Price Changes: Prices locked at time of purchase
- Bulk Orders: Contact support for orders over 1000 cycles
- API Versioning: This is v2 API; v1 uses different pricing
- Maintenance: Orders continue processing during maintenance
- Network Issues: Orders retry automatically if network issues occur
- Order History: Full order history available in dashboard
- Tax Invoices: Available for business accounts on request
- Discounts: Volume discounts applied automatically
- Monitoring: Real-time cycle usage monitoring in dashboard