Billing
Get paid and promotional credit balances and grants
GET
/
v1
/
account
/
wallet
Get paid and promotional credit balances and grants
curl --request GET \
--url https://console.sqwish.ai/v1/account/wallet \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/account/wallet"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/account/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"paid_usd": "<string>",
"promotional_usd": "<string>",
"available_usd": "<string>",
"reserved_usd": "<string>",
"financial_shortfall_usd": "<string>",
"grants": [
{
"id": "<string>",
"user_id": "<string>",
"source": "<string>",
"operation_key": "<string>",
"amount_usd": "<string>",
"spent_usd": "<string>",
"held_usd": "<string>",
"created_at": 123,
"expires_at": 123,
"revoked_at": 123,
"qualifying_purchase_id": "<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.
Get paid and promotional credit balances and grants
curl --request GET \
--url https://console.sqwish.ai/v1/account/wallet \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/account/wallet"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/account/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"paid_usd": "<string>",
"promotional_usd": "<string>",
"available_usd": "<string>",
"reserved_usd": "<string>",
"financial_shortfall_usd": "<string>",
"grants": [
{
"id": "<string>",
"user_id": "<string>",
"source": "<string>",
"operation_key": "<string>",
"amount_usd": "<string>",
"spent_usd": "<string>",
"held_usd": "<string>",
"created_at": 123,
"expires_at": 123,
"revoked_at": 123,
"qualifying_purchase_id": "<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>"
}
]
}
}