Transfer from one profile to another - Rails and Stripe -
i write first time , glad if me.
i create rails app stripe payment , have 2 type of customers.
when customer1 logs system, needs fill payment credentials form(cardholder, cvc, cart number). form information , stripe.js generated card_token use token create customer , save database.
when customer2 logs system, use stripe connect connect system customer2 stripe account.
how can transfer money customer1 customer2`s account.i use
stripe.api_key = platform_secret_key stripe::charge.create({ :amount => 1000, :currency => "usd", :source => {token}, :destination => {connected_stripe_account_id} })
and try curl request:
curl https://api.stripe.com/v1/charges \ -u {platform_secret_key}: \ -d customer={stripe_customer_id} \ -d amount=1000 \ -d currency=usd \ -d destination={connected_stripe_account_id} \ -d application_fee=200
but both give me error:
"type": "invalid_request_error", "message": "invalid api key provided: {**_****_********************xuw}"
what doing wrong?
thanks!
Comments
Post a Comment