Account session

GET /core/v1/billing/stripe-test

Account session · GET /core/v1/billing/stripe-test

Stripe remains disabled and its routes support test mode only. The global payment_enabled flag does not establish Stripe availability. Webhooks require server verification of an official signature over unmodified raw bytes.

Authentication

Account session. Session/administrative writes are not executed in the public Playground.

Endpoint

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

Parameters

—

Responses

200

隔离环境Stripe测试支付能力;真实收款保持关闭

{
  "application/json": {
    "schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "success": {
          "const": true
        },
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "mode": {
              "const": "test"
            },
            "currency": {
              "const": "usd"
            },
            "micro_per_usd_cent": {
              "const": "10000"
            },
            "min_amount_usd_cents": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[1-9][0-9]*$",
                  "maxLength": 6,
                  "description": "USD整数美分;不是积分。1美分=10000 OneAster整数账务单位。"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_amount_usd_cents": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[1-9][0-9]*$",
                  "maxLength": 6,
                  "description": "USD整数美分;不是积分。1美分=10000 OneAster整数账务单位。"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "enabled",
            "mode",
            "currency",
            "micro_per_usd_cent",
            "min_amount_usd_cents",
            "max_amount_usd_cents"
          ]
        }
      },
      "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"
      ]
    }
  }
}