Make Stripe Plugin More Generic to Support Connect and Other Use Cases #2329

Open
opened 2026-03-13 09:44:22 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @AntonVishal on GitHub (Nov 18, 2025).

Is this suited for github?

  • Yes, this is suited for github

The current Stripe plugin is tightly coupled to subscription management use cases. While this works well for SaaS applications with billing models, it excludes other important Stripe features like Stripe Connect (marketplace/payment distribution), one-time payments, invoice management, and other payment workflows.

Describe the solution you'd like

Split the plugin into feature modules that users can opt into:

stripe({
    features: {
        subscriptions: {
            enabled: true,
            plans: [...],
            // subscription-specific config
        },
        connect: {
            enabled: true,
            accountType: "standard" | "express" | "custom",
            // connect-specific config
        },
        payments: {
            enabled: true,
            // one-time payment config
        },
        invoicing: {
            enabled: true,
            // invoice config
        }
    }
})

Support multiple entity types and relationships:

stripe({
    entityAssociation: {
        user: {
            stripeId: "stripeCustomerId",
            type: "customer" // or "connect_account"
        },
        organization: {
            stripeId: "stripeConnectAccountId",
            type: "connect_account"
        },
        marketplace: {
            stripeId: "stripeConnectedAccountId",
            type: "platform_account"
        }
    }
})

Provide a cleaner hook system for different features:

stripe({
    hooks: {
        // Subscription hooks (existing)
        subscription: {
            onCreated: async (data) => { /* */ },
            onUpdated: async (data) => { /* */ },
            onCanceled: async (data) => { /* */ }
        },
        // Connect hooks
        connect: {
            onAccountCreated: async (data) => { /* */ },
            onPayoutPaid: async (data) => { /* */ },
            onVerificationUpdated: async (data) => { /* */ }
        },
        // Payment hooks
        payment: {
            onSucceeded: async (data) => { /* */ },
            onFailed: async (data) => { /* */ }
        }
    }
})

Describe alternatives you've considered

This is something new to BA, so let the maintainers decide.

Additional context

No response

Originally created by @AntonVishal on GitHub (Nov 18, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. The current Stripe plugin is tightly coupled to subscription management use cases. While this works well for SaaS applications with billing models, it excludes other important Stripe features like Stripe Connect (marketplace/payment distribution), one-time payments, invoice management, and other payment workflows. ### Describe the solution you'd like Split the plugin into feature modules that users can opt into: ``` stripe({ features: { subscriptions: { enabled: true, plans: [...], // subscription-specific config }, connect: { enabled: true, accountType: "standard" | "express" | "custom", // connect-specific config }, payments: { enabled: true, // one-time payment config }, invoicing: { enabled: true, // invoice config } } }) ``` Support multiple entity types and relationships: ``` stripe({ entityAssociation: { user: { stripeId: "stripeCustomerId", type: "customer" // or "connect_account" }, organization: { stripeId: "stripeConnectAccountId", type: "connect_account" }, marketplace: { stripeId: "stripeConnectedAccountId", type: "platform_account" } } }) ``` Provide a cleaner hook system for different features: ``` stripe({ hooks: { // Subscription hooks (existing) subscription: { onCreated: async (data) => { /* */ }, onUpdated: async (data) => { /* */ }, onCanceled: async (data) => { /* */ } }, // Connect hooks connect: { onAccountCreated: async (data) => { /* */ }, onPayoutPaid: async (data) => { /* */ }, onVerificationUpdated: async (data) => { /* */ } }, // Payment hooks payment: { onSucceeded: async (data) => { /* */ }, onFailed: async (data) => { /* */ } } } }) ``` ### Describe alternatives you've considered This is something new to BA, so let the maintainers decide. ### Additional context _No response_
GiteaMirror added the enhancement label 2026-03-13 09:44:22 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 18, 2025):

Hi there! Thanks for opening this issue. We understand you’d like to see the Stripe plugin made more generic, so it’s not limited to subscription management only but can also support features like Connect accounts, one-time payments, invoicing, and other payment workflows. Your suggestion to split the plugin into separate feature modules and provide a cleaner hook system makes sense for adapting to different use cases.

Next steps would be to review how we could modularize the existing Stripe integration while ensuring smooth backwards compatibility with current subscription flows. Our team will evaluate this enhancement and consider community feedback to prioritize work on this feature. In the meantime, could you share any additional specific use cases or examples of workflows you have in mind? tag @better-auth-agent if you would like an answer from the Agent.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 18, 2025): Hi there! Thanks for opening this issue. We understand you’d like to see the Stripe plugin made more generic, so it’s not limited to subscription management only but can also support features like Connect accounts, one-time payments, invoicing, and other payment workflows. Your suggestion to split the plugin into separate feature modules and provide a cleaner hook system makes sense for adapting to different use cases. Next steps would be to review how we could modularize the existing Stripe integration while ensuring smooth backwards compatibility with current subscription flows. Our team will evaluate this enhancement and consider community feedback to prioritize work on this feature. In the meantime, could you share any additional specific use cases or examples of workflows you have in mind? tag @better-auth-agent if you would like an answer from the Agent. <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@bytaesu commented on GitHub (Dec 11, 2025):

Thank @AntonVishal, I'm looking into this

@bytaesu commented on GitHub (Dec 11, 2025): Thank @AntonVishal, I'm looking into this
Author
Owner

@AntonVishal commented on GitHub (Dec 11, 2025):

Cool @bytaesu , whenever you start begin with stripe connect!

@AntonVishal commented on GitHub (Dec 11, 2025): Cool @bytaesu , whenever you start begin with stripe connect!
Author
Owner

@maxvaljan commented on GitHub (Jan 12, 2026):

Hi will there be support for stripe connect?

@maxvaljan commented on GitHub (Jan 12, 2026): Hi will there be support for stripe connect?
Author
Owner

@ethan-huo commented on GitHub (Feb 26, 2026):

@bytaesu Are there any updates? This feature is very important.

@ethan-huo commented on GitHub (Feb 26, 2026): @bytaesu Are there any updates? This feature is very important.
Author
Owner

@bytaesu commented on GitHub (Mar 9, 2026):

Right now everything is built around Subscriptions, and since Connect is a completely separate concept, supporting it would likely require significant structural changes.

If there's strong demand we could consider it, but it's not a high priority at the moment. For now we're focusing on improving Subscriptions so they can cover more flows.

@bytaesu commented on GitHub (Mar 9, 2026): Right now everything is built around Subscriptions, and since Connect is a completely separate concept, supporting it would likely require significant structural changes. If there's strong demand we could consider it, but it's not a high priority at the moment. For now we're focusing on improving Subscriptions so they can cover more flows.
Author
Owner

@bytaesu commented on GitHub (Mar 9, 2026):

I mean, it's nice to have, but it requires heavy work, so it's not a high priority.

@bytaesu commented on GitHub (Mar 9, 2026): I mean, it's nice to have, but it requires heavy work, so it's not a high priority.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2329