API Reference
API Reference

业务对象

发票(Invoice)业务对象字段说明

属性名类型描述
invoice_idstring发票ID
merchant_idstring商户ID
trade_idstring交易单ID
subscription_idstring订阅ID
price_idstring定价方案ID
customer_idstringSubotiz平台顾客ID
order_idstring第三方订单号
original_invoice_idstring原始发票ID,用于退款发票引用原始发票
refund_order_idstring关联的退款订单ID
amountstring支付金额,截取两位小数
currencystring币种
biz_statusstring发票状态:
  • open: 初始化
  • pending: 处理中
  • success: 支付成功
  • failed: 支付失败
  • refunded: 全额退款
  • partially_refunded: 部分退款
invoice_typestring发票类型:
  • initial: 首次支付
  • trial: 试用期
  • renewal: 订阅续费
  • refund: 退款
paid_atstring支付成功时间
cycle_indexint订阅的当前周期索引
created_atstring创建时间
metadatamap[string]string一组可附加到对象上的键值对,允许您以结构化格式存储附加信息。
discountsDiscounts发票上的折扣,包括此发票的所有折扣信息
price_version_idstring定价方案版本 ID

Discounts

属性名类型描述
current_periodCurrentPeriodDiscount[]当前时期的折扣详情

CurrentPeriodDiscount

属性名类型描述
discount_idstring折扣的唯一标识符
discount_amountstring折扣金额
discount_codestring使用的折扣代码
These developer docs retire on 2026-08-30. Visit the new docs: NEW DOCS本开发者文档将于 2026-08-30下线,请访问新版文档: 新文档