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/orders/00000000-0000-4000-8000-000000000001' \ --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"
Parameters
- id (path, Required): {"type":"string","format":"uuid"}
Responses
200
本人充值订单详情
{
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"const": true
},
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"user_id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"currency": {
"const": "usd"
},
"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整数账务单位。"
},
"credit_micro": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "整数账务单位;1 积分 = 10000 单位,1 USD = 100 积分。前端用 BigInt。"
},
"state": {
"enum": [
"creating",
"unknown",
"open",
"paid",
"expired",
"failed"
]
},
"invoice_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9]+$"
},
{
"type": "null"
}
]
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri",
"description": "仅本人未归档且付款窗口未超时的 open 订单返回托管付款链接;旧订单没有本地截止时间。"
},
{
"type": "null"
}
]
},
"latest_payment_status": {
"anyOf": [
{
"enum": [
"waiting",
"confirming",
"confirmed",
"sending",
"partially_paid",
"finished",
"failed",
"refunded",
"expired"
]
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"paid_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"pay_currency": {
"anyOf": [
{
"enum": [
"usdttrc20",
"usdtbsc",
"usdterc20",
"usdtmatic",
"usdcsol",
"usdcbsc",
"usdc",
"usdcmatic"
]
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"payment_window_expired": {
"type": "boolean"
}
},
"required": [
"id",
"user_id",
"currency",
"amount_usd_cents",
"credit_micro",
"state",
"invoice_id",
"checkout_url",
"latest_payment_status",
"created_at",
"updated_at",
"paid_at",
"archived",
"archived_at",
"pay_currency",
"expires_at",
"payment_window_expired"
]
}
},
"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"
]
}
}
}