Return the caller's automatic top-up policy.
curl --request GET \
--url https://api.example.com/v1/billing/auto-top-up \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/billing/auto-top-up"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/billing/auto-top-up', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Billing
Get automatic top-up
Return the automatic top-up policy for the authenticated account.
GET
/
v1
/
billing
/
auto-top-up
Return the caller's automatic top-up policy.
curl --request GET \
--url https://api.example.com/v1/billing/auto-top-up \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/billing/auto-top-up"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/billing/auto-top-up', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Returns whether automatic top-up is enabled, its balance threshold, its
recharge target, and whether a payment method is ready. When a saved card is
available,
payment_method contains its brand, last four digits, expiration,
and non-sensitive billing details. It never contains card numbers or Stripe
client secrets.
Was this page helpful?
