Skip to content

Conversation

brunomiguelpinto
Copy link
Contributor

@brunomiguelpinto brunomiguelpinto commented Jun 26, 2025

Context

This PR ensures that cancelled Stripe payments (e.g. due to uncompleted 3DS authentication) correctly update the corresponding Lago payment status.

Previously, Lago only updated statuses on "failed" payments. As a result, "cancelled" Stripe payments remained stuck in a "pending" state on our side, making it impossible for users to retry them without manual intervention.

Description

Stripe webhook handling now includes logic for payment_intent.canceled events.
Cancelled payments are treated as "failed" in Lago (same as other unrecoverable errors).
This allows users to retry cancelled payments

@brunomiguelpinto brunomiguelpinto changed the title feat: handle canceled stripe payments feat: handle canceled stripe intent Jun 26, 2025
@brunomiguelpinto brunomiguelpinto self-assigned this Jun 26, 2025
Copy link
Contributor

@mariohd mariohd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@julienbourdeau julienbourdeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful 🥹

@brunomiguelpinto brunomiguelpinto merged commit 770e294 into main Jun 27, 2025
14 checks passed
@brunomiguelpinto brunomiguelpinto deleted the add-specs-cancel-intent branch June 27, 2025 10:47
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
## Context
This PR ensures that cancelled Stripe payments (e.g. due to uncompleted
3DS authentication) correctly update the corresponding Lago payment
status.

Previously, Lago only updated statuses on "failed" payments. As a
result, "cancelled" Stripe payments remained stuck in a "pending" state
on our side, making it impossible for users to retry them without manual
intervention.

## Description

Stripe webhook handling now includes logic for payment_intent.canceled
events.
Cancelled payments are treated as "failed" in Lago (same as other
unrecoverable errors).
This allows users to retry cancelled payments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants