This I think will be a killer feature because I couldn't find other payment gateways easily supporting this kind of "reverse" functionality.

For reference, I found this relevant info in Stripe docs:
https://stripe.com/docs/connect/shared-customers
https://stripe.com/docs/tutorials/sending-transfers#collecting-recipient...
https://support.stripe.com/questions/can-i-enable-my-users-to-receive-pa...

Do you think is possible (easy) to do integrate this functionality?

Example:

  1. I have a Stripe account (maybe attached to admin user or whatever).
  2. Some user earn points for tasks on my site.
  3. He set his bank account or debit card on his account on my site (thanks to Stripe integration).
  4. I schedule a Rules component to pay from my (admin) Stripe account to the user every week/month whatever.
  5. Voila, we have a real market, with of course many other implementations (even a new eBay).

I made the question on Stackexchange too: http://drupal.stackexchange.com/questions/141668/how-to-pay-users-paymen...

Any useful info is appreciated as well!
Thanks

Comments

kopeboy’s picture

Issue summary: View changes
kopeboy’s picture

Issue summary: View changes
kopeboy’s picture

Issue summary: View changes
aviindub’s picture

Status: Active » Postponed

thats a cool feature, and it probably *could* be rolled in to this module, but i'm not sure it should be. This is distinct enough from the core functionality we are trying to support that it might warrant a whole new module of its own, or at least a submodule underneath this one.

the concept you are describing is also something that is not very well supported in other commerce modules, especially the core module. The company i work for actually has a system like this that we wrote ourselves on top of commerce, but its so convoluted and specialized that its not something that would be useful outside of our application. so there would be some major architecture questions that would have to be addressed beyond just the payment gateway integration.

and then the biggest hurdle -- someone to actually do the work. i know there is zero chance i will personally have the time to write this feature, so unless someone else wants to volunteer to write it, it aint gonna happen. i would not object to including this functionality as a submodule if someone extremely competent wants to step up and write/test it.

I'll leave this open as "postponed" for a while so others can see it.

Sequencing.com’s picture

I'd also like to +1 this topic - creating a submodule that enables payments to users will be an excellent addition to Commerce Stripe's functionality. Both Stripe and Dwolla's functionality at the non-drupal level already supports this so adding a submodule that will enable this functionality (at least for Stripe) will be great.

torgospizza’s picture

This sounds like Stripe Connect? There was an issue created for that here: #1927694: Stripe Connect but it looks like it kind of dropped off. Seems like that might be the most obvious route.

aviindub’s picture

Title: Ability to pay users from my site » Stripe Connect: pay users from my site

i closed the old ticket as duplicate. lets keep the discussion here. you are correct that nothing has happened with it so far.

artusamak’s picture

Status: Postponed » Needs review
StatusFileSize
new4.17 KB

I just want to bring your attention on this, i managed to have the Standalone accounts working with fairly minor changes. It actually just cares about having a potential destination attribute sent to Stripe (and using another key). I just didn't handle the Connect accounts link feature as part of the scope of the Connect change (i did it manually).
Would you be ready to move in this direction to merge something like the attached patch or will we have to duplicate most of the code to create a submodule?

Thanks for your feedback.

artusamak’s picture

Fix for the users paying with a credit card that they don't want to store.

goz’s picture

StatusFileSize
new3.28 KB

Re-roll patch and remove destination part.
Destination should be implemented by hook_commerce_stripe_order_charge_alter() which is added by https://www.drupal.org/node/2545400 in 7.x-1.1

torgospizza’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev

I like this idea and am a fan of this functionality. This could be a good first step in getting it implemented.

I'll move to 3.x and we can start to play with it there.

torgospizza’s picture

I'll be building the actual "add your bank account" functionality to core Stripe modules for Connect Standalone accounts at #2821521: Connect integration.

I will see if the maintainer of Stripe Managed Accounts would like to potentially integrate with the Stripe module, because I think combining our efforts will result in a better set of modules.

sebastien m.’s picture

StatusFileSize
new2.29 KB

Patch adapted to match 7.x-3.x-dev branch

goz’s picture

StatusFileSize
new2.64 KB
+++ b/commerce_stripe.module
@@ -495,7 +511,14 @@ function commerce_stripe_submit_form_submit($payment_method, $pane_form, $pane_v
+  // Select the appropriate API key if we charge for an account or with Connect
+  // and if the user wants to store its credit card.
+  if ($payment_method['settings']['stripe_charge_mode'] == 'platform' && $pane_values['cardonfile'] !== 'new') {
+    _commerce_stripe_set_api_key($payment_method);
+  }
+  else {
+    _commerce_stripe_set_api_key($payment_method);

Something was wrong during the patch adaptation for 3.x branch. platform_key is no more used and condition set the same api.

In any case, this does not apply anymore on 3.x branch.

Reroll the patch

Donit’s picture

Does this work?

Donit’s picture

Has anyone tried this in production?

torgospizza’s picture

I haven't gotten a chance to test it yet. Sorry - been focused on other things. I'll try to get to it soon, but it probably won't be until next week sometime.

Donit’s picture

Alright. Thanks, torgosPizza. I'd be really nice to have a smooth implementation of Connect in the module.

rszrama’s picture

fwiw, I think this issue is outdated and the patch is non-functional, at least as it compares to my expectation for how Stripe Connect should work. Fortunately, I have someone looking for Stripe Connect functionality that I've broken down into three primary areas:

  1. Platform configuration (enter your platform client_id, configure the application_fee calculation process, etc.)
  2. Standard account connection (click a Connect button, authorize your account, store credentials for later use)
  3. Direct charge processing (using the connected account credentials instead of site-wide credentials, collecting fees)

I don't see anything in the most recent patch that addresses any of the above besides adding a bit of extra config to the payment method form but never using it. I'm tempted to close this out so we can start the conversation over, but I think the best approach will be to leave this open for now and create separate issues against our client requirements instead. We can then close this out if resolving those issues deprecates it.

I'll use a "Connect" tag to group all the issues together for now.

torgospizza’s picture

@Ryan: I agree. I am open to converting this into a [meta] task and attaching child issues, or just closing this one out and referencing it from a new one if that's preferable.

We have a need for this too, I just haven't been able to set aside the time to handle it properly. But your approach sounds like what we are after too, so I'm looking forward to tackling this, and can test as needed.

Donit’s picture

That's great news, Ryan! The requirements sound like full Connect functionality. I'd be more than happy to test it.

Do you have any timeline, client-wise or otherwise, for that task?

Agree: let's move to new issues.

rszrama’s picture

Our goal is by the end of DrupalCon Nashville being able to support a global site connection to a platform. This won't get us all the way toward full marketplace functionality where individual users could connect their accounts and the site would select the credentials per user, but it would be a start.

We'd have to have a conversation about which other module(s) we'd want to depend on for individual users connecting, but Commerce Marketplace combined with the new hook in Commerce 1.14 for altering payment method info could do the trick. That's out of scope for our particular engagement, but we'll try to keep the broader goal in mind.

Donit’s picture

I've tested both marketplace modules, Commerce-Marketplace and Commerce Marketplace; the latter offers a better, commerce-compatible logic, but I wasn't able to implement the module successfully in an existing site without getting fatal errors during the checkout. It works in its own ecosystem (installation path), though. My point being: it may be better to bypass a sandbox module.

torgospizza’s picture

We have used Organic Groups in the past, but that might be unnecessary; instead, we might simply go with using Commerce License Role to sell access (or at least, track access through things like Stripe Subscriptions, which avoids having to use Commerce Recurring and the like). So with that in mind I'd be more than happy to test and provide feedback based on our own use case.

farhadhf’s picture

Hey guys, I've resumed working on commerce_marketplace for D7 again and I was looking into writing a module for withdrawals through Stripe Connect and just saw this. Has there been any updates? I can take up the development of the D7 version if you guys haven't worked on it yet, and if you have, I can help make sure it works with commerce_marketplace too.

Donit’s picture

Hi farhadhf, I have a few bits and pieces on this, but I need to resume the work as well and find what I have left. I'd pass it to you. For now: take a look into the Stripe issues tagged with "connect".

tomtech’s picture

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.