feat(billing): charge UK VAT on subscriptions#1560
Merged
Merged
Conversation
Switch Checkout to setup mode so the customer's billing address is captured before the first invoice is generated. The webhook then creates the Subscription server-side and attaches a UK VAT tax rate when the address country is GB, ensuring VAT appears on invoice #1. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Following Fider's switch from Paddle to Stripe (where we became the merchant of record), this adds UK VAT collection for UK-domiciled customers. Uses Stripe Tax Rates (the free legacy feature) — not the paid Stripe Tax — keeping ongoing cost at zero.
mode: setupso the customer's billing address is captured before the first invoice is generated.GB. VAT appears on invoice secure the API #1, not just from invoice configure branches and its deployment pipeline #2.STRIPE_UK_VAT_TAX_RATE_IDpoints at a Tax Rate object that needs to be created in the Stripe dashboard (live + test).Notes
mode: subscriptionwebhook path is retained to drain any in-flight Checkout sessions created before the deploy.session.IDas the Stripe idempotency key, so webhook retries are safe and won't create duplicates.custom_text.submit.messageis set so the customer still sees what they're committing to inside Checkout.Test plan
4000 0082 6000 0000and confirm first invoice has VAT line.4242 4242 4242 4242and confirm no VAT applied.checkout.session.completedevent via Stripe CLI; only one subscription created).🤖 Generated with Claude Code