2
votes

Following the stripe doc https://stripe.com/docs/connect/payouts to make bank transfers/payouts to accounts from our platform, I got the next error

NameError (uninitialized constant Stripe::Payout)

I'm using gem 'rails', '~> 5.0.1' gem 'stripe', '~> 2.0'

And the code with in the controller is

transfer = Stripe::Payout.create(
{
 :amount => ((invoice.total - invoice.fee)*100).to_i,
 :currency => "usd"
},
{:stripe_account => @event.admin.stripe_user_id}
)
1

1 Answers

3
votes

You need to upgrade to at least version 2.2.0 of the Stripe Ruby library in order to use Payouts.