chore(billing-platform): carry tax_transaction_code on contract create/rollover requests#319
Open
dashed wants to merge 1 commit into
Open
chore(billing-platform): carry tax_transaction_code on contract create/rollover requests#319dashed wants to merge 1 commit into
dashed wants to merge 1 commit into
Conversation
…e/rollover requests Adds an optional `tax_transaction_code` (field 7) to CreateContractRequest and RolloverContractRequest so the contract service can record the tax provider's document reference on the invoice atomically with creation. This backs getsentry's atomic tax-linkage: today the platform persists the invoice and then writes the document reference in a separate best-effort call, which can fail and leave a charged invoice with no linked tax document. Carrying the reference in the create/rollover request lets the contract service write it in the same insert as the amount, removing that window. Field 7 leaves rollover field 6 free for the independent tax_pending flag.
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
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.
This is for PR https://github.com/getsentry/getsentry/pull/20624
Adds an optional
tax_transaction_code(field 7) toCreateContractRequestandRolloverContractRequest.This backs getsentry's atomic tax-linkage: today the platform persists the invoice and then writes the tax document's reference in a separate best-effort call (
set_pending_tax_transaction), which can fail and leave a charged invoice with no linked tax document — collected-but-unremitted tax with no automated recovery. Carrying the reference in the create/rollover request lets the contract service write it in the same insert as the invoice amount, removing that window (mirroring how legacy billing links the code atomically in itsInvoice.objects.create).Field 7 leaves rollover field 6 free for the independent
tax_pendingflag (PR #287). Message-only; the generated Rust stub is regenerated here, Python stubs build at package time. Supersedes #315 (the standaloneset_pendingendpoint protos), which getsentry's atomic linkage removes.