Delete Bank Account
DELETE
https://api.sfox.com/v1/user/bank
Disconnects the bank account linked to your sFOX account.
If you would like to remove a bank account, or would like to link a different bank account to an sFOX account, you would call this endpoint with the User Authentication Token for authorization.
This will disconnect the bank account completely. After completing this action, you must link another bank account to deposit or withdraw fiat.
Responses
200: OK
This status is returned when the bank is successfully disconnected. There is no body on the response.
400: Bad Request
If no bank has been linked to the sFOX account
{
"error": "User does not have an valid bank account"
}
Example Requests
curl -X DELETE \
-H "Authorization: Bearer ${USER_AUTH_TOKEN}" \
'https://api.sfox.com/v1/user/bank'
const axios = require('axios');
const config = {
method: 'delete',
url: 'https://api.sfox.com/v1/user/bank',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <USER_AUTH_TOKEN>'
}
}
axios(config)
.then((response) => {
console.log(response.status)
console.log(response.data)
})
.catch(err => {
console.error(err.response.status)
console.error(err.response.data)
});
import requests
import os
data = requests.delete(
"https://api.sfox.com/v1/user/bank",
headers={
"Authorization": f"Bearer {os.environ['USER_AUTH_TOKEN']}"
}
)
print(data.status_code)
print(data.json())
Last updated