API Reference
API Reference

Object


Field

Type

Desc

invoice_id

string

Invoice ID

merchant_id

string

Merchant ID

trade_id

string

Trade ID

subscription_id

string

Subscription ID

price_id

string

Pricing plan ID

customer_id

string

Subotiz platform customer_id

order_id

string

Third-party order number

original_invoice_id

string

Original invoice ID, used for refund invoices to reference the original invoice

refund_order_id

string

Associated refund order ID

amount

string

Payment amount, truncated to two decimal places

currency

string

Currency

biz_status

string

Invoice status:

  • open: Initialized
  • pending: Processing
  • success: Payment succeeded
  • failed: Payment failed
  • refunded: Fully refunded
  • partially_refunded: Partially refunded

invoice_type

string

Invoice type:

  • initial: Initial payment
  • trial: Trial period
  • renewal: Subscription renewal
  • refund: Refund

paid_at

string

Payment success time

cycle_index

int

Current cycle index of the subscription

created_at

string

Creation time

metadata

map[string]string

A set of key-value pairs that can be attached to an object, allowing you to store additional information in a structured format.

Discounts

Discounts

Discounts applied to the invoice, including all discount information for this invoice

Discounts

FieldTypeDesc
current_periodCurrentPeriodDiscount[]The current period's discount details

CurrentPeriodDiscount

FieldTypeDesc
discount_idstringThe unique identifier for the discount
discount_amountstringThe amount discounted
discount_codestringThe discount code used