No such destination

Viewed 3028

I am using Stripe method in my website. user purchase product from my site and payment done through stripe. I want to charge my commission and send rest of money to Service Provider. When i try to use transfer method in stripe it shows me Error Message.

"message": "No such destination: acct_1###############",

Even my account added with providers account.

I am using the code below for this

$transfer = \Stripe\Transfer::create(array(
     "amount" => 50,
     "currency" => "eur",
     "destination" => "acct_180W54CRJ51SjjGi",
     "transfer_group" => "ORDER_95"
));

Please help me in this.

1 Answers

I had this problem because I was using different Stripe api test keys across the app (I'd copied a test key from somewhere else on SO).

So when I went to create a payment, stripe couldn't find that connected user on the platform account.

To correct this, I simply ensured the Stripe test key was consistent throughout (I'll make it an env variable when it ships to production)

Stripe.api_key = 'sk_test_51HYHSFGtUKse83O9J4QeAib3cp8sHzGKHAL8JdkshEzuYQKUCKEP3CHE3AIUb7fdevMK7TVAUCyJU0ADSwIUoX00qxZmBI9r'

Related