Repository navigation
feat(payment_terms): Wallet payment term - #6580
Draft
annvelents wants to merge 1 commit into
Draft
annvelents wants to merge 1 commit into
annvelents wants to merge 1 commit into
Conversation
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 5, 2026 12:43
0b09d51 to
a4170a5
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
2 times, most recently
from
October 5, 2026 16:38
e5b877b to
9778264
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 6, 2026 09:26
9778264 to
18a45d6
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 7, 2026 10:47
18a45d6 to
5834f99
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 7, 2026 12:39
5834f99 to
3b18c17
Compare
This was referenced Oct 8, 2026
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 26, 2026 11:42
3b18c17 to
fc671a8
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 26, 2026 11:56
fc671a8 to
bff8b33
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 26, 2026 19:22
bff8b33 to
5a2a853
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
2 times, most recently
from
October 27, 2026 17:09
68cbacf to
4df77bb
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 29, 2026 09:31
4df77bb to
820f429
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 13:52
820f429 to
782d9a0
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 14:27
782d9a0 to
737f1d7
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 14:47
737f1d7 to
588ba80
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 15:18
588ba80 to
08f4a81
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 15:22
08f4a81 to
b1f78ed
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 18:49
b1f78ed to
7648127
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
October 30, 2026 19:10
7648127 to
c62e1e6
Compare
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
2 times, most recently
from
November 3, 2026 14:06
a6d7c79 to
46948f2
Compare
BIL-522: a wallet can carry its own payment term, which every top-up invoice of that wallet follows ahead of the customer and billing entity terms. Invoices::PaidCreditService, which every top-up path goes through, snapshots the wallet term with payment_term_source "wallet" when the wallet has one, and otherwise resolves as before. Wallet create and update validate and store the normalized term; null clears it on update. The REST wallet endpoints, the wallet serializer (and so the wallet webhooks) and the wallet GraphQL type and mutations expose it. Payment-gated top-ups keep moving both dates to the payment day on finalization, as decided by product; a spec pins that behaviour.
annvelents
force-pushed
the
feat-payment-terms-wallets
branch
from
November 3, 2026 17:35
46948f2 to
b4ae309
Compare
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.
Context
Wallet top-ups produce credit invoices. A wallet can now carry its own payment term, overriding the customer and billing entity terms on every top-up invoice.
Linear: BIL-522. Unblocks the frontend work in BIL-675. The
wallets.payment_termcolumn was added in #6231.Description
Resolution. Every top-up path (manual, interval, threshold, API) goes through
Invoices::PaidCreditService.payment_term_source: "wallet".due_on_receipt.The term lives on the wallet only. Recurring rules and individual transactions have no term of their own.
Payment-gated top-ups (
invoice_requires_successful_payment) keep today's behaviour, per the product decision.FinalizeOpenCreditServicemoves both the issuing date and the due date to the payment day, and leaves the term snapshot untouched. A spec pins this.Writes and reads.
Wallets::CreateServiceandUpdateServicevalidate and store the normalizedpayment_term. On update,nullclears it.POST /api/v1/wallets,PUT /api/v1/wallets/:idand the customer-scoped wallet endpoints acceptpayment_term, throughRawPaymentTermParams.payment_term: the wallet's own term, ornullwhen it inherits. Thewallet.*webhooks gain the field.createCustomerWalletandupdateCustomerWalletmutations acceptpaymentTerm.Wallet.paymentTermresolves throughPaymentTerm.from_h.Validation
Specs cover:
🤖 Generated with Claude Code