New Stripe API

Just wanted to contribute a tip. As you know, the old method of sending a transfer via a recipient object has been deprecated (as noted here: https://stripe.com/docs/tutorials/sending-transfers). I saw that you suggested creating an account and then using the transfer API to send the transfer afterward. It seems that the officially supported method is to use Stripe Connect. I found this article useful: http://www.munocreative.com/nerd-notes/winvoice (but note that the callback URL should actually be http://localhost:3000/users/auth/stripe_connect/callback). By using the standard Oauth flow, you can store key user credentials (e.g., access tokens, refresh tokens, etc.) in your database for later use. Also, instead of using a conditional in the view, you can use a before_action callback to redirect a user to the Stripe Connect sign-up page if the user has no Stripe account. Once you have the credentials in your database, you can (i) send the payment directly to the recipient when you create the charge just by adding the destination parameter and (ii) send a portion to the platform by adding the application_fee parameter (https://stripe.com/docs/connect/payments-fees). This is even easier than using the transfer API (which requires an additional step) and also better from a compliance perspective (since transfers should be made directly without going through the platform's account). This flow seems to work pretty well. Also, on an unrelated note, you might consider adding something like 'input_html: { rows: '10' }' to your text_field input to make the input box a little bigger and easier to use. :)

Posted almost 4 years ago by Chlump Chatkupt
Posted over 3 years ago by Zeal Caiden

Ideally the marketplace app tutorial would be updated with managed accounts, as the recipients setup was completely contained within the app that we built during that tutorial. Connect with standalone accounts is useful but if we want to control the entire UX then we need to learn how to set up rails with managed accounts. Please update!

1
Posted almost 4 years ago by Albert Pak

Thank you for the info :)

1
Posted almost 4 years ago by Alex Yang

Great tip - thanks!

1