管理员

GET /core/v1/admin/billing/nowpayments/summary

管理员 NOWPayments 订单报价只读概览;不接受查询参数

NOWPayments 使用账户会话管理充值订单;仅 IPN 由供应商携带 x-nowpayments-sig 调用。先检查当前充值能力,USD 美分与 credit_micro 为不同单位。保留原订单和 Idempotency-Key,unknown 不重建 invoice;只有官方查询核实足额 finished 才唯一入账。签名为递归排序 JSON 的 HMAC SHA512,不能由浏览器伪造付款。

身份要求

管理员. 会话/管理写操作不在公共 Playground 执行。

接口

curl --request GET 'https://api.oneaster.ai/core/v1/admin/billing/nowpayments/summary' \
  --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"

参数

—

响应

200

管理员 NOWPayments 订单报价只读概览;不接受查询参数

{
  "application/json": {
    "schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "success": {
          "const": true
        },
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sampled_at": {
              "type": "string",
              "format": "date-time"
            },
            "total_orders": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "orders_by_state": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "creating": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "unknown": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "open": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "paid": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "expired": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "failed": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "required": [
                "creating",
                "unknown",
                "open",
                "paid",
                "expired",
                "failed"
              ]
            },
            "pending_orders": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "pending_amount_usd_cents": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "未归档、付款窗口有效的待付款订单原始美元美分报价合计,不是钱包冻结额。"
            },
            "pending_credit_micro": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "未归档、付款窗口有效的待付款订单原始积分报价合计,非钱包冻结额。"
            },
            "paid_amount_usd_cents": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "已付款订单原始美元美分报价合计,不是链上净收款。"
            },
            "paid_credit_micro": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "已付款订单原始积分报价合计,不是当前余额。"
            },
            "oldest_pending_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "oldest_pending_age_seconds": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "sampled_at",
            "total_orders",
            "orders_by_state",
            "pending_orders",
            "pending_amount_usd_cents",
            "pending_credit_micro",
            "paid_amount_usd_cents",
            "paid_credit_micro",
            "oldest_pending_at",
            "oldest_pending_age_seconds"
          ]
        }
      },
      "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"
      ]
    }
  }
}