Subscription

data class Subscription(val id: String?, val description: String?, val currentPeriodStart: Int?, val currentPeriodEnd: Int?, val livemode: Boolean?, val plan: SubscriptionPlan?, val currency: String?, val status: String?, val quantity: Int?, val customer: String?, val defaultPaymentMethod: String?, val subscriptionObject: String?, val created: Int?, val startDate: Int?)

Represents a recurring billing subscription for a customer.

Constructors

Link copied to clipboard
constructor(id: String?, description: String?, currentPeriodStart: Int?, currentPeriodEnd: Int?, livemode: Boolean?, plan: SubscriptionPlan?, currency: String?, status: String?, quantity: Int?, customer: String?, defaultPaymentMethod: String?, subscriptionObject: String?, created: Int?, startDate: Int?)

Properties

Link copied to clipboard
val created: Int?

Unix timestamp of when the subscription was created.

Link copied to clipboard

Three-letter ISO currency code used for billing.

Link copied to clipboard
@SerializedName(value = "current_period_end")
val currentPeriodEnd: Int?

Unix timestamp marking the end of the current billing period.

Link copied to clipboard
@SerializedName(value = "current_period_start")
val currentPeriodStart: Int?

Unix timestamp marking the start of the current billing period.

Link copied to clipboard

ID of the customer this subscription belongs to.

Link copied to clipboard
@SerializedName(value = "default_payment_method")
val defaultPaymentMethod: String?

ID of the payment method used for recurring charges.

Link copied to clipboard

Optional description of the subscription.

Link copied to clipboard
val id: String?

Unique identifier for the subscription.

Link copied to clipboard

Whether the subscription exists in live mode (true) or test mode (false).

Link copied to clipboard

The billing plan associated with this subscription.

Link copied to clipboard

Number of units of the plan included in this subscription.

Link copied to clipboard
@SerializedName(value = "start_date")
val startDate: Int?

Unix timestamp of when the subscription billing began.

Link copied to clipboard

Current status of the subscription (e.g., "active", "cancelled", "past_due").

Link copied to clipboard
@SerializedName(value = "object")
val subscriptionObject: String?

String identifier for the object type, always "subscription".