BillingSubscription

@Serializable
data class BillingSubscription(val id: String, val activeAt: Long? = null, val createdAt: Long, val nextPayment: BillingSubscriptionNextPayment? = null, val pastDueAt: Long? = null, val status: BillingSubscriptionStatus = BillingSubscriptionStatus.UNKNOWN, val subscriptionItems: List<BillingSubscriptionItem> = emptyList(), val updatedAt: Long? = null, val eligibleForFreeTrial: Boolean = false)

A subscription to a plan for the current user or an Organization.

Constructors

Link copied to clipboard
constructor(id: String, activeAt: Long? = null, createdAt: Long, nextPayment: BillingSubscriptionNextPayment? = null, pastDueAt: Long? = null, status: BillingSubscriptionStatus = BillingSubscriptionStatus.UNKNOWN, subscriptionItems: List<BillingSubscriptionItem> = emptyList(), updatedAt: Long? = null, eligibleForFreeTrial: Boolean = false)

Properties

Link copied to clipboard

The date when the subscription became active, as Unix milliseconds. null when FAPI has not activated the subscription yet.

Link copied to clipboard

The date when the subscription was created, as Unix milliseconds.

Link copied to clipboard

Whether the payer is eligible for a free trial.

Link copied to clipboard
val id: String

The unique identifier for the subscription.

Link copied to clipboard

Information about the next payment, including the amount and the date it is due. null if there is no upcoming payment.

Link copied to clipboard

The date when the subscription became past due, as Unix milliseconds. null if the subscription is not past due.

Link copied to clipboard

The current status of the subscription. Due to the free plan subscription item, the top-level subscription is active or past_due.

Link copied to clipboard

The list of subscription items included in this subscription.

Link copied to clipboard

The date when the subscription was last updated, as Unix milliseconds. null if it has not been updated.