8000 🚀 Feature Request: Add `STRIPE_CONNECTED_ACCOUNT` Support for Payment Routing · Issue #86 · yournextstore/yournextstore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🚀 Feature Request: Add STRIPE_CONNECTED_ACCOUNT Support for Payment Routing #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LeroySteding opened this issue Jan 8, 2025 · 0 comments

Comments

@LeroySteding
Copy link

🚀 Feature Request: Add STRIPE_CONNECTED_ACCOUNT Support for Payment Routing

Problem Statement

Currently, there is no way to dynamically manage payments using shop-specific Stripe connected accounts. The on_behalf_of parameter is not being utilized.


Proposed Solution

Enhance Stripe integration to dynamically handle shop-specific connected accounts using the on_behalf_of parameter.

Implementation Steps

  1. Store Stripe Account IDs:

    • Add a stripe_connected_account field to the shop configuration.
    • Example:
      {
        "shop_id": "shop_123",
        "stripe_connected_account": "acct_1ABCDXYZ12345"
      }
  2. Update Payment Logic:

    • Use the on_behalf_of parameter in Stripe API calls:
      const shopAccountId = await getStripeAccountIdForShop(process.env.SHOP_ID);
      
      const paymentIntent = await stripe.paymentIntents.create({
        amount: 2000,
        currency: 'usd',
        payment_method_types: ['card'],
        on_behalf_of: shopAccountId,
      });
  3. Environment Variable Support:

    • Add support for setting stripe_connected_account via environment variables:
      SHOP_ID=shop_123
      STRIPE_CONNECTED_ACCOUNT=acct_1ABCDXYZ12345
  4. Testing:

    • Validate payments are routed to the correct connected accounts.
    • Handle errors for invalid or missing stripe_connected_account values.

🎯 Expected Benefits

  • Improved Payment Management: Ensures payments are properly routed to shop-specific connected accounts.
  • Scalability: Simplifies managing multiple shops under a single Stripe account.

📚 References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0