pub enum BillingEvent {
CheckoutCompleted {
customer_id: Option<String>,
subscription_id: Option<String>,
client_reference_id: Option<String>,
},
SubscriptionChanged {
subscription_id: String,
customer_id: String,
status: String,
current_period_end: u64,
},
SubscriptionDeleted {
subscription_id: String,
customer_id: String,
},
PaymentFailed {
customer_id: String,
invoice_id: String,
},
Other {
event_type: String,
body: Value,
},
}Expand description
Subset of Stripe webhook events pylon directly supports. Apps
receiving any other event get the raw event_type string in
BillingEvent::Other and can match on it themselves.
Variants§
CheckoutCompleted
checkout.session.completed — customer finished checkout.
Attach customer_id + subscription_id to your user/org row.
Fields
SubscriptionChanged
customer.subscription.updated / created — subscription
state changed (renewed, plan changed, paused). Map status
to your app’s “is this org allowed to use the paid feature”
gate.
SubscriptionDeleted
customer.subscription.deleted — subscription canceled or
ended. Revoke paid access.
PaymentFailed
invoice.payment_failed — billing problem; usually pylon
surfaces this to the org’s billing email.
Other
Any event pylon doesn’t model. Carries the raw event type
- the full JSON body for the app to parse.
Trait Implementations§
Source§impl Clone for BillingEvent
impl Clone for BillingEvent
Source§fn clone(&self) -> BillingEvent
fn clone(&self) -> BillingEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BillingEvent
impl Debug for BillingEvent
Source§impl PartialEq for BillingEvent
impl PartialEq for BillingEvent
impl Eq for BillingEvent
impl StructuralPartialEq for BillingEvent
Auto Trait Implementations§
impl Freeze for BillingEvent
impl RefUnwindSafe for BillingEvent
impl Send for BillingEvent
impl Sync for BillingEvent
impl Unpin for BillingEvent
impl UnsafeUnpin for BillingEvent
impl UnwindSafe for BillingEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more