Search code examples
ruby-on-railsrubyruby-on-rails-5stripe-paymentsstripe-connect

Stripe standard connect account with rails - How to apply discounts?


I have set up a standard connected account but cannot find the documentation to do the following on my platform with my buyers and sellers:

If an item cost $20 and the customer has a $5 credit given by me(the platform provider), the customer will pay $15. But I still want to pay the seller their $20. So how do I pay the seller the customers $15 + my $5 from my account?

I emailed Stripe and they responded with this: "At this time, it isn't possible to split the payment between the customer and your platform with Standard accounts since the funds go directly to the connected account. Custom and Express accounts allow for this with Separate Charges and Transfers.

One workaround for this would be to set up your Standard accounts with the destination parameter, which would have the funds go directly to your platform, and then to the connected account. This does take a lot more coding" ...

Haven't been able to figure out the "workaround". Anyone have any idea on how to approach this?


Solution

  • According to this document https://stripe.com/docs/recipes/on-demand-app, to pay a contractor (to make what is called a "payout") you can make a charge call from the API, specifying the contractor account id (E.g. acct_12QkqYGSOD4VcegJ) using the destination parameter.

    If the customer pays $15 and your application fee is $1, the contractor will get $14 from the platform. If there is no fee, the contractor will get $15.

    What you could do to pay the extra $5 to the contractor, is using the transfer API to send 5$ from the platform to the contractor account, using the same destination parameter, after the normal charge step.

    So it would be a 2-step process: first you charge the customer 15$ and then you transfer the extra 5$ to the contractor. Check "Processing payments" and "Running a promotion" sections for more details.