0

I am facing following problem while doing stripe payment.

Uncaught exception 'Stripe\Error\Authentication' with message 'Only Stripe Connect platforms can work with other accounts. If you specified a client_id parameter, make sure it's correct

I am using the php code below:

$charge = \Stripe\Charge::create(
  array(
    "amount" => $amount*100, // amount in cents
    "currency" => $currency, // usd
    "source" => $token, 
    "description" => $description,
    "application_fee" => 123 // amount in cents
  ),
  array("stripe_account" => 'cus_7Gt1CAXXXXXX') //  CONNECTED_STRIPE_ACCOUNT_ID 
); 

And another question is that from where I can get CONNECTED_STRIPE_ACCOUNT_ID like that acct_12QkqYGSOD4XXXXXX. if possible please send code or screenshot or location to get these account id.

Can anyone please help to solve that problem?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Hemal Kachhadiya
  • 1,616
  • 2
  • 10
  • 7
  • Application Fees are only for Stripe Connect. Are you using Stripe Connect? If so the CONNECTED_STRIPE_ACCOUNT_ID is what you should be passing as stripe_account, and you would have received that when you connected or created a connected account. – Matthew Arkin Nov 01 '15 at 22:11
  • Hello Hemal I am also facing Same Problem.I am confused here.if you get solution Please Post Here asap. Thanks – user3418619 Nov 02 '15 at 04:48

1 Answers1

3
  1. You have to create 'Connect with Stripe' button in your app which will redirect user to fill form to authorize your app.

  2. After Clicking on Authorize button(by user,after filling form properly), it will redirect to 'Redirect URI(redirect URI is that URI which you fill in Platform Setting)'.

  3. After redirection stripe will add scope and authorization code to your URI

for eg. your URI: www.yoursite.com you will get www.yoursite.com?scope=read_write&authorization_code=AUTHORIZATION_CODE

  1. After That follow----> https://stackoverflow.com/a/34714859/5467417
Community
  • 1
  • 1
Akshay Phulare
  • 1,359
  • 2
  • 10
  • 15