Skip to content

Conversation

steven-fox
Copy link
Collaborator

@steven-fox steven-fox commented May 23, 2025

Added invoice.paid to our production webhook events on Stripe.

I tested this locally for:

  • a new user performs a checkout and pays successfully (license created)
  • a new user performs a checkout, payment fails, and then payment succeeds (license created)
  • a user performs a checkout, payment fails, and then they use the billing portal to pay the invoice at a slightly later time (license created)
  • an existing user that doesn't already exist on stripe yet already has a license (old anystack contacts) performs a checkout and pays (new license created)

I can still think of some edge cases this won't handle. I will get going on those as soon as I can.

Also... definitely some refactoring that needs to be done to clean this all up once we've hit a steady state and our logic stops changing. There are a lot of code smells in here from moving fast that I'm not too happy about.

@steven-fox steven-fox merged commit 594e5ac into main May 23, 2025
2 checks passed
@steven-fox steven-fox deleted the create-licenses-from-invoice-paid branch May 23, 2025 16:57
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.

1 participant