List billing alerts
Lists billing active and inactive alerts
API Endpoint: GET /v1/billing/alerts
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.list()from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.list()Retrieve a billing alert
Retrieves a billing alert given an ID
API Endpoint: GET /v1/billing/alerts/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.get(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.get(id="string")Create a billing alert
Creates a billing alert
API Endpoint: POST /v1/billing/alerts
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.create(alert_type="usage_threshold", title="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.create(alert_type="usage_threshold", title="string")Activate a billing alert
Reactivates this alert, allowing it to trigger again.
API Endpoint: POST /v1/billing/alerts/{id}/activate
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.activate(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.activate(id="string")Archive a billing alert
Archives this alert, removing it from the list view and APIs. This is non-reversible.
API Endpoint: POST /v1/billing/alerts/{id}/archive
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.archive(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.archive(id="string")Deactivate a billing alert
Deactivates this alert, preventing it from triggering.
API Endpoint: POST /v1/billing/alerts/{id}/deactivate
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.billing.alert.deactivate(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.billing.alert.deactivate(id="string")