This is my stripe code in which I receive the error
The provided key does not have access to account in stripe
\Stripe\Stripe::setApiKey('sk_test_...');
$fees=($request->amount*10)/100;
$fees=$fees*100;
$withfee = \Stripe\Charge::create(
array(
"amount" => 10000,//1000, //$amount amount in cents
"currency" => "usd",
"source" => "tok_1BGovzDnnXvdHsSaayDkULRU",//'tok_18L6hjL6useUrEYbtObKz15s',
//$token
"description" => "Example charge",//"Example charge", //$title
"application_fee" => 1000 // amount in cents //$fees
),
array("stripe_account" => "cus_Be21HSwLO1XMhF" ) // $acc_token
);
To get Client ID, go to Your account - Account settings in your Stripe account. Open the Connect tab and you should see the value for client_id for development (for testing purposes) and production (to use in a live store).
If you have access to the standard Stripe dashboard, you can disconnect your financial accounts at any time by visiting your linked accounts settings page and unlinking any of the linked accounts by clicking “Manage” and selecting “Remove account".
You are passing a customer ID ("cus_..."
) in the stripe_account
field.
When processing a charge with Connect, you need to provide the ID of the account ("acct_..."
) on behalf of which you are processing the charge. Customers are payment sources (i.e. they provide funds) while accounts are payment destinations (i.e. they receive funds).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With