diff --git a/crates/service/plugins/billing_artcraft/src/endpoints/webhook/stripe_artcraft_webhook_handler.rs b/crates/service/plugins/billing_artcraft/src/endpoints/webhook/stripe_artcraft_webhook_handler.rs index ffab6859cb..c791da1296 100644 --- a/crates/service/plugins/billing_artcraft/src/endpoints/webhook/stripe_artcraft_webhook_handler.rs +++ b/crates/service/plugins/billing_artcraft/src/endpoints/webhook/stripe_artcraft_webhook_handler.rs @@ -30,6 +30,19 @@ use stripe_webhook::{Event, EventObject, Webhook}; use crate::endpoints::webhook::webhook_event_handlers::customer_subscription::customer_subscription_updated_handler::customer_subscription_updated_handler; use crate::endpoints::webhook::webhook_event_handlers::handle_webhook_payload::handle_webhook_payload; +/* + +For one-off payments (eg. credits packs), we see this typical sequence of events: + + - charge.succeeded (EventId("evt_3S3gutEobp4xy4Tl15tGHk88")) -- IGNORE + - payment_intent.succeeded (EventId("evt_3S3gutEobp4xy4Tl1t19fp3Y")) -- Billing success signal + - payment_intent.created (EventId("evt_3S3gutEobp4xy4Tl1mg80Zgu")) -- IGNORE + - checkout.session.completed (EventId("evt_1S3guvEobp4xy4TlxY7TVlUs")) -- Can use, but `payment_intent.succeeded` is better + - charge.updated (EventId("evt_3S3gutEobp4xy4Tl1RgfG4NL")) -- IGNORE + + */ + + #[derive(Serialize)] pub struct StripeArtcraftWebhookSuccessResponse { pub success: bool,