Billing
Get automatic top-up
Whether automatic top-ups are on, their threshold, amount and monthly limit, the saved card, and how much of the limit this month has used.
GET
/
v1
/
account
/
automatic-topup
Get automatic top-up
curl --request GET \
--url https://api.sqwish.ai/v1/account/automatic-topup \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/account/automatic-topup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/account/automatic-topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"enabled": true,
"revision": 123,
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"monthly_used_usd": "<string>",
"resets_at": 123,
"card": {
"brand": "<string>",
"last4": "<string>",
"exp_month": 123,
"exp_year": 123
},
"status": "<string>",
"available": true,
"pending_purchase_id": "<string>",
"setup": {
"id": "<string>",
"status": "<string>",
"url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Get automatic top-up
curl --request GET \
--url https://api.sqwish.ai/v1/account/automatic-topup \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/account/automatic-topup"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/account/automatic-topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"enabled": true,
"revision": 123,
"threshold_usd": "<string>",
"amount_usd": "<string>",
"monthly_limit_usd": "<string>",
"monthly_used_usd": "<string>",
"resets_at": 123,
"card": {
"brand": "<string>",
"last4": "<string>",
"exp_month": 123,
"exp_year": 123
},
"status": "<string>",
"available": true,
"pending_purchase_id": "<string>",
"setup": {
"id": "<string>",
"status": "<string>",
"url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}