Stripe Payouts to Bank Account in Rails -


i trying automise money transfer website user's bank account. proper way it?

i tried create bank account fist js call first:

  stripe.bankaccount.createtoken({     country: 'us',     currency: 'usd',     routing_number: routing_number,     account_number: account_number,     account_holder_name: account_holder_name,     account_holder_type: account_holder_type   }, function(status, response) {     token_input.val(response.id);     form.submit();   }); 

i receive response stipe:

{id: "btok_8jtqwnyqqaealf", object: "token", bank_account: …} 

on server side tried use token ()

stripe::transfer.create(     :amount => 400,     :currency => "usd",     :destination => params['bank_account_token'],     :description => "payout"   ) 

however stripe reponse is:

no such destination: btok_8jthh75qpdnb4m 

what way transfer funds stripe bank account?


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -