Skip to content

Webhook listener for invoice.updated#1220

Merged
excid3 merged 1 commit into
pay-rails:mainfrom
BrandonCzaja:issue_1219/add_additional_listeners
Mar 31, 2026
Merged

Webhook listener for invoice.updated#1220
excid3 merged 1 commit into
pay-rails:mainfrom
BrandonCzaja:issue_1219/add_additional_listeners

Conversation

@BrandonCzaja

@BrandonCzaja BrandonCzaja commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Summary:

Original Discussion Thread

Creating a webhook listener for invoice.paid to sync local invoice records with the API to prevent stale local records.

Related Issue:
Resolving: Issue: 1219

Description:
Adding invoice.paid listener to sync local records.

Testing:
Three tests to ensure the class exits early if the correct conditions are not met. One test check the actual syncing is done correctly.

Screenshots (if applicable):

Checklist:

  • Code follows the project's coding standards
  • Tests have been added or updated to cover the changes
  • Documentation has been updated (if applicable)
  • All existing tests pass
  • Conforms to the contributing guidelines

Additional Notes:

@excid3

excid3 commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

It might make more sense to use invoice.updated so that we sync any changes to the invoice? In theory that would keep it the most up-to-date?

@BrandonCzaja

BrandonCzaja commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

It might make more sense to use invoice.updated so that we sync any changes to the invoice? In theory that would keep it the most up-to-date?

@excid3 Sorry just seeing this. I can try that, but I wasn't sure if we wanted that many changes to be checked against, or if we just cared about the status changes.

@excid3

excid3 commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

We always want the latest invoice in our local copy, so it doesn't really matter what causes the change.

@BrandonCzaja

Copy link
Copy Markdown
Contributor Author

Ok sounds good. I'll work on making the updates and the charge object this week.

@BrandonCzaja BrandonCzaja changed the title Webhook listener for invoice.paid Webhook listener for invoice.updated Mar 31, 2026
@BrandonCzaja BrandonCzaja force-pushed the issue_1219/add_additional_listeners branch from 46d97ee to 64eccec Compare March 31, 2026 01:14
@excid3 excid3 merged commit 35726cd into pay-rails:main Mar 31, 2026
36 of 37 checks passed
@excid3 excid3 linked an issue Mar 31, 2026 that may be closed by this pull request
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.

Pay::Stripe::Subscription - Add additional invoice webhook listeners

2 participants