php - Transfer money from one stripe account to another stripe account -


how can transfer money 1 stripe account stripe account ?
following code here:

\stripe\stripe::setapikey(platform_secret_key); \stripe\transfer::create(array(   'amount' => 1000,   'currency' => "hkd",   'destination' => {connected_stripe_account_id} )); 

but getting error:

type: stripe\error\invalidrequest

message: insufficient funds in stripe account. in test mode, can add funds available balance (bypassing pending balance) creating charge 4000 0000 0000 0077 card number. can use /v1/balance endpoint view stripe balance (for more details, see stripe.com /docs/api#balance).

but in test account have transfer there around $3000 , still getting above error.

see this: test-account-balance

this happens me also. mistake was using live secret key. can check

  1. you using test connected account id (you have connect customer in test mode also. live , test connected ids different).
  2. you using test secret key testing.
  3. create 1 customer card no. 4000 0000 0000 0077 , charge it. using balance can transfer amount account.

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -