feat(payments): include invoice number in overdue payment reference - #6050
Merged
annvelents merged 2 commits intoAug 7, 2026
Merged
Conversation
## Context When Lago retries an overdue payment off-session, the reference sent to the payment provider was hardcoded to "<billing entity> - Overdue invoices" and never carried an invoice number, even when the payment request covered a single invoice. Reconciling a payment back to an invoice from a provider report therefore meant looking each one up in Lago by hand. ## Description The auto-charge path now appends the invoice number when the payment request covers exactly one invoice, so it produces the same reference the checkout-link path already produces. Payment requests covering several invoices keep the existing reference. Signed-off-by: lago-claude-ai-agent[bot] <297187938+lago-claude-ai-agent[bot]@users.noreply.github.com>
Contributor
Author
|
PASS — the auto-charge path now builds the same reference as Verified: Non-blocking notes for the human reviewer:
|
annvelents
approved these changes
Aug 6, 2026
annvelents
deleted the
feat/claude-overdue-payment-reference-invoice-number
branch
August 7, 2026 08:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Lago auto-charges an overdue payment request off-session, the reference sent to the payment provider was hardcoded to
<billing entity> - Overdue invoiceswith no invoice number, so reconciling a payment back to an invoice from a provider report meant looking it up in Lago. The checkout-link path (PaymentRequests::Payments::StripeService#description) already appends the number when there is a single invoice; the auto-charge path now does the same, so both paths send the same reference.Payment requests covering several invoices are deliberately unchanged: listing every number needs a per-provider truncation budget (Adyen caps
referenceat 80 chars) that has no precedent in the codebase.