NOWPayments orders require an account session; the provider alone calls IPN with x-nowpayments-sig. Check current capabilities and distinguish USD cents from credit_micro. Preserve the original order and Idempotency-Key; unknown does not recreate invoices. Only a verified, sufficiently paid finished payment is credited once. IPN uses recursively sorted JSON HMAC SHA512, not browser-supplied proof.
Authentication
Account session. Session/administrative writes are not executed in the public Playground.
Endpoint
curl --request GET 'https://api.oneaster.ai/core/v1/billing/nowpayments' \ --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"
Parameters
—
Responses
200
NOWPayments 充值能力、USD 报价范围与精度
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": true
},
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"currency": {
"const": "usd"
},
"micro_per_usd_cent": {
"const": "10000"
},
"min_amount_usd_cents": {
"type": "string",
"pattern": "^(?:[1-9][0-9]{2,5}|1000000)$",
"maxLength": 7,
"description": "NOWPayments USD整数美分,100–1000000($1–$10000);1美分=10000 OneAster整数账务单位。"
},
"max_amount_usd_cents": {
"type": "string",
"pattern": "^(?:[1-9][0-9]{2,5}|1000000)$",
"maxLength": 7,
"description": "NOWPayments USD整数美分,100–1000000($1–$10000);1美分=10000 OneAster整数账务单位。"
},
"max_pending_orders": {
"const": 50
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pay_currency": {
"enum": [
"usdttrc20",
"usdtbsc",
"usdterc20",
"usdtmatic",
"usdcsol",
"usdcbsc",
"usdc",
"usdcmatic"
]
},
"asset": {
"enum": [
"USDT",
"USDC"
]
},
"network": {
"enum": [
"tron",
"bsc",
"ethereum",
"polygon",
"solana"
]
},
"label": {
"type": "string"
}
},
"required": [
"pay_currency",
"asset",
"network",
"label"
]
}
},
"default_pay_currency": {
"const": "usdttrc20"
},
"payment_window_seconds": {
"const": 900
},
"archive_enabled": {
"type": "boolean",
"description": "管理员归档开关,默认关闭。"
},
"cancellation_enabled": {
"const": false
},
"pending_order_count": {
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"description": "Current Session account snapshot of unarchived creating/unknown/open orders with an unexpired checkout window, plus legacy orders without a deadline; available even when new orders are disabled. Not an admission guarantee."
},
"pending_order_states": {
"type": "array",
"prefixItems": [
{
"const": "creating"
},
{
"const": "unknown"
},
{
"const": "open"
}
],
"minItems": 3,
"maxItems": 3
}
},
"required": [
"enabled",
"currency",
"micro_per_usd_cent",
"min_amount_usd_cents",
"max_amount_usd_cents",
"max_pending_orders",
"payment_options",
"default_pay_currency",
"payment_window_seconds",
"archive_enabled",
"cancellation_enabled",
"pending_order_count",
"pending_order_states"
]
}
},
"required": [
"success",
"data"
]
}
}
}
default
错误代码见 core-api.md;供应商/数据库错误已隐藏。
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": false
},
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"const": "oneaster_error"
}
},
"required": [
"code",
"message",
"type"
]
},
"data": {
"type": "null"
}
},
"required": [
"success",
"error",
"data"
]
}
}
}