#IceY

1 messages · Page 1 of 1 (latest)

humble gyroBOT
wide jungle
#

👋 happy to help

#

you can't delete a connected account if their balance isn't zero

#

you need to create a manual payout to empty their account balance first

agile belfry
#

Could you please provide error and response of api call when balance isn't zero?

#

in the documentation there is response with "deleted" object set to true, in which case can we expect this object being set to false?

wide jungle
#

you can test it yourself

agile belfry
#

Is it possible to test this using test mode?

wide jungle
#

yes

#

you can create a connected account, make a payment (e.g. a destination charge) on that account

#

and call the Delete Account API

agile belfry
#

I've tried it and was able to delete account despite its balance not being zero

wide jungle
#

what's the request ID?

agile belfry
#

Give me a sec, i will execute it again and provide the request ID

wide jungle
#

ok

agile belfry
#

req_Dv0wDiKdBFAGmL

wide jungle
#

they don't have any balance

#

that's why you were able to delete them

agile belfry
#

but there were funds transferred to this account, isn't it considered as balance?

wide jungle
#

they could have been already paid out

jovial wind
#

Hello @wide jungle
That's the response for current balance for a connected account:
{ "object": "balance", "available": [ { "amount": 15000, "currency": "pln", "source_types": { "card": 15000 } } ], "livemode": false, "pending": [ { "amount": 0, "currency": "pln", "source_types": { "card": 0 } } ] }
When we delete this account, that's the response we get:
{ "id": "acct_1NsMBhECh5dCDwDn", "object": "account", "deleted": true }
request id - req_M6ADCkEimagWAe

#

That sounds like we can delete account when balance is not zero.

humble gyroBOT
strong depot
#

the restriction doesn't apply in test mode

jovial wind
#

Ok, great.
Can you tell us what would be the respone in live mode?

strong depot
#

not sure off the top of my head

#

I'll look and get back to you later

#

something like this

{
  error: {
    message: "For an account created with your live-mode key, you cannot delete the account when the balance in any currency is non-zero. Currencies with non-zero balances: usd.",
    request_log_url: "https://dashboard.stripe.com/xxxxx",
    type: "invalid_request_error",
  },
}
jovial wind
#

So the response code would be 40x, right?

strong depot
#

400, yes

jovial wind
#

Are there any scenarios when response would be 200, but flag deleted in response set to false?

strong depot
#

no