#IceY
1 messages · Page 1 of 1 (latest)
👋 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
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?
you can test it yourself
Is it possible to test this using test mode?
yes
you can create a connected account, make a payment (e.g. a destination charge) on that account
and call the Delete Account API
I've tried it and was able to delete account despite its balance not being zero
what's the request ID?
Give me a sec, i will execute it again and provide the request ID
ok
req_Dv0wDiKdBFAGmL
but there were funds transferred to this account, isn't it considered as balance?
they could have been already paid out
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.
the restriction doesn't apply in test mode
Ok, great.
Can you tell us what would be the respone in live mode?
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",
},
}
So the response code would be 40x, right?
400, yes
Are there any scenarios when response would be 200, but flag deleted in response set to false?
no