Interface PricingPhase

Represents a pricing phase for an offer

A pricing phase defines how much and when a customer will be charged. For example, a subscription might have an initial trial phase followed by a recurring payment phase.

interface PricingPhase {
    billingPeriod: string;
    currency: string;
    paymentMode: "PayAsYouGo" | "PayUpFront";
    priceMicros: number;
    recurrenceMode: "INFINITE_RECURRING" | "NON_RECURRING" | "FINITE_RECURRING";
}

Properties

billingPeriod: string

ISO 8601 duration string representing the billing period

- 'P1M' = 1 month
- 'P1Y' = 1 year
- 'P7D' = 7 days
currency: string

ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')

paymentMode: "PayAsYouGo" | "PayUpFront"

Defines when payment is collected

  • PayAsYouGo: Payment collected at the start of each billing period
  • PayUpFront: Full payment collected at time of purchase
priceMicros: number

Price in micros (1/1,000,000 of the currency unit). For example, $1.99 = 1990000 micros

recurrenceMode: "INFINITE_RECURRING" | "NON_RECURRING" | "FINITE_RECURRING"

Defines how the subscription recurs

  • INFINITE_RECURRING: Subscription continues until explicitly cancelled
  • NON_RECURRING: One-time purchase that does not auto-renew
  • FINITE_RECURRING: Subscription that renews a fixed number of times