pub struct Subscription {Show 22 fields
pub id: String,
pub entity: String,
pub plan_id: String,
pub status: SubscriptionStatus,
pub customer_id: Option<String>,
pub total_count: u32,
pub paid_count: u32,
pub remaining_count: u32,
pub auth_attempts: u32,
pub quantity: u32,
pub short_url: Option<String>,
pub customer_notify: bool,
pub current_start: Option<i64>,
pub current_end: Option<i64>,
pub start_at: Option<i64>,
pub end_at: Option<i64>,
pub ended_at: Option<i64>,
pub expire_by: Option<i64>,
pub charge_at: Option<i64>,
pub addons: Vec<Value>,
pub notes: Notes,
pub created_at: i64,
}Expand description
A subscription returned by the API.
Fields§
§id: StringUnique identifier, e.g. sub_00000000000001.
entity: StringAlways "subscription".
plan_id: StringThe plan being billed.
status: SubscriptionStatusCurrent lifecycle state.
customer_id: Option<String>The customer being billed.
total_count: u32Total billing cycles scheduled.
paid_count: u32Cycles billed so far.
remaining_count: u32Cycles remaining.
auth_attempts: u32How many charges have failed.
quantity: u32Quantity of the plan being billed each cycle.
short_url: Option<String>URL where the customer authorizes the subscription.
customer_notify: boolWhether Razorpay sends the customer notifications.
current_start: Option<i64>Start of the current billing cycle, Unix seconds.
current_end: Option<i64>End of the current billing cycle, Unix seconds.
start_at: Option<i64>When the subscription began, Unix seconds.
end_at: Option<i64>When the subscription is scheduled to end, Unix seconds.
ended_at: Option<i64>When it was actually ended, Unix seconds.
expire_by: Option<i64>When the trial period ends, Unix seconds.
charge_at: Option<i64>When it was charged most recently, Unix seconds.
addons: Vec<Value>Any one-off charges added on top of the plan.
notes: NotesYour metadata.
created_at: i64Creation time as a Unix timestamp in seconds.