[GH-ISSUE #2492] Stripe tax collection params in the docs #9223

Closed
opened 2026-04-13 04:38:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @cobaltwebtech on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2492

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

There is a discrepancy in the docs for the Stripe plugin on tax collection. Right now, the docs state to use the tax_id_collection params in the Stripe plugin. This is for collecting the tax ID of the user not actually calculating and applying tax to the checkout session.

Link to section in docs

Docs current example on tax collection for Stripe:

subscription: {
    // ... other options
    getCheckoutSessionParams: async ({ user, session, plan, subscription }, request) => {
        return {
            params: {
                tax_id_collection: {
                    enabled: true
                }
            }
        };
    }
}

Current vs. Expected behavior

To have Stripe perform tax calculation and collect at checkout we need to pass the params automatic_tax instead.

subscription: {
    // ... other options
    getCheckoutSessionParams: async ({ user, session, plan, subscription }, request) => {
        return {
            params: {
                automatic_tax: {
                    enabled: true
                }
            }
        };
    }
}

Of course, you need to have tax registration setup and configured in the Stripe dashboard first for this to work. Also, collecting a user's tax ID can still be an option if needed. I believe the docs should just add clarification of using automatic_tax and tax_id_collection in the Stripe checkout session.

What version of Better Auth are you using?

1.2.7

Provide environment information

- OS: macOS 15.4.1
- Browser: Chrome, Firefox, Safari
- Node: 22.14.0

Which area(s) are affected? (Select all that apply)

Documentation

Auth config (if applicable)


Additional context

Stripe docs reference on collecting tax in checkout

Originally created by @cobaltwebtech on GitHub (Apr 30, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2492 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce There is a discrepancy in the docs for the Stripe plugin on tax collection. Right now, the docs state to use the `tax_id_collection` params in the Stripe plugin. This is for collecting the tax ID of the user not actually calculating and applying tax to the checkout session. [Link to section in docs](https://www.better-auth.com/docs/plugins/stripe#tax-collection) Docs current example on tax collection for Stripe: ```ts title="auth.ts" subscription: { // ... other options getCheckoutSessionParams: async ({ user, session, plan, subscription }, request) => { return { params: { tax_id_collection: { enabled: true } } }; } } ``` ### Current vs. Expected behavior To have Stripe perform tax calculation and collect at checkout we need to pass the params `automatic_tax` instead. ```ts title="auth.ts" subscription: { // ... other options getCheckoutSessionParams: async ({ user, session, plan, subscription }, request) => { return { params: { automatic_tax: { enabled: true } } }; } } ``` Of course, you need to have tax registration setup and configured in the Stripe dashboard first for this to work. Also, collecting a user's tax ID can still be an option if needed. I believe the docs should just add clarification of using `automatic_tax` and `tax_id_collection` in the Stripe checkout session. ### What version of Better Auth are you using? 1.2.7 ### Provide environment information ```bash - OS: macOS 15.4.1 - Browser: Chrome, Firefox, Safari - Node: 22.14.0 ``` ### Which area(s) are affected? (Select all that apply) Documentation ### Auth config (if applicable) ```typescript ``` ### Additional context [Stripe docs reference on collecting tax in checkout](https://docs.stripe.com/tax/checkout?ui=stripe-hosted#new-customers)
GiteaMirror added the locked label 2026-04-13 04:38:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9223