1. Registry
  2. Packages
  3. Stripe Provider
  4. API Docs
  5. BillingAlert
Viewing docs for Stripe 0.3.0
published on Friday, Aug 14, 2026 by Pulumi
Viewing docs for Stripe 0.3.0
published on Friday, Aug 14, 2026 by Pulumi

    A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.

    Create BillingAlert Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BillingAlert(name: string, args: BillingAlertArgs, opts?: CustomResourceOptions);
    @overload
    def BillingAlert(resource_name: str,
                     args: BillingAlertArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BillingAlert(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     alert_type: Optional[str] = None,
                     title: Optional[str] = None,
                     usage_threshold: Optional[BillingAlertUsageThresholdArgs] = None)
    func NewBillingAlert(ctx *Context, name string, args BillingAlertArgs, opts ...ResourceOption) (*BillingAlert, error)
    public BillingAlert(string name, BillingAlertArgs args, CustomResourceOptions? opts = null)
    public BillingAlert(String name, BillingAlertArgs args)
    public BillingAlert(String name, BillingAlertArgs args, CustomResourceOptions options)
    
    type: stripe:BillingAlert
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "stripe_billing_alert" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BillingAlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BillingAlertArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BillingAlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BillingAlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BillingAlertArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var billingAlertResource = new Stripe.BillingAlert("billingAlertResource", new()
    {
        AlertType = "string",
        Title = "string",
        UsageThreshold = new Stripe.Inputs.BillingAlertUsageThresholdArgs
        {
            Gte = 0.0,
            Meter = "string",
            Recurrence = "string",
            Filters = new[]
            {
                new Stripe.Inputs.BillingAlertUsageThresholdFilterArgs
                {
                    Type = "string",
                    Customer = "string",
                },
            },
        },
    });
    
    example, err := stripe.NewBillingAlert(ctx, "billingAlertResource", &stripe.BillingAlertArgs{
    	AlertType: pulumi.String("string"),
    	Title:     pulumi.String("string"),
    	UsageThreshold: &stripe.BillingAlertUsageThresholdArgs{
    		Gte:        pulumi.Float64(0),
    		Meter:      pulumi.String("string"),
    		Recurrence: pulumi.String("string"),
    		Filters: stripe.BillingAlertUsageThresholdFilterArray{
    			&stripe.BillingAlertUsageThresholdFilterArgs{
    				Type:     pulumi.String("string"),
    				Customer: pulumi.String("string"),
    			},
    		},
    	},
    })
    
    resource "stripe_billing_alert" "billingAlertResource" {
      lifecycle {
        create_before_destroy = true
      }
      alert_type = "string"
      title      = "string"
      usage_threshold = {
        gte        = 0
        meter      = "string"
        recurrence = "string"
        filters = [{
          type     = "string"
          customer = "string"
        }]
      }
    }
    
    var billingAlertResource = new BillingAlert("billingAlertResource", BillingAlertArgs.builder()
        .alertType("string")
        .title("string")
        .usageThreshold(BillingAlertUsageThresholdArgs.builder()
            .gte(0.0)
            .meter("string")
            .recurrence("string")
            .filters(BillingAlertUsageThresholdFilterArgs.builder()
                .type("string")
                .customer("string")
                .build())
            .build())
        .build());
    
    billing_alert_resource = stripe.BillingAlert("billingAlertResource",
        alert_type="string",
        title="string",
        usage_threshold={
            "gte": float(0),
            "meter": "string",
            "recurrence": "string",
            "filters": [{
                "type": "string",
                "customer": "string",
            }],
        })
    
    const billingAlertResource = new stripe.BillingAlert("billingAlertResource", {
        alertType: "string",
        title: "string",
        usageThreshold: {
            gte: 0,
            meter: "string",
            recurrence: "string",
            filters: [{
                type: "string",
                customer: "string",
            }],
        },
    });
    
    type: stripe:BillingAlert
    properties:
        alertType: string
        title: string
        usageThreshold:
            filters:
                - customer: string
                  type: string
            gte: 0
            meter: string
            recurrence: string
    

    BillingAlert Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BillingAlert resource accepts the following input properties:

    AlertType string
    Defines the type of the alert.
    Title string
    Title of the alert.
    UsageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    AlertType string
    Defines the type of the alert.
    Title string
    Title of the alert.
    UsageThreshold BillingAlertUsageThresholdArgs
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alert_type string
    Defines the type of the alert.
    title string
    Title of the alert.
    usage_threshold object
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType String
    Defines the type of the alert.
    title String
    Title of the alert.
    usageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType string
    Defines the type of the alert.
    title string
    Title of the alert.
    usageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alert_type str
    Defines the type of the alert.
    title str
    Title of the alert.
    usage_threshold BillingAlertUsageThresholdArgs
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType String
    Defines the type of the alert.
    title String
    Title of the alert.
    usageThreshold Property Map
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BillingAlert resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    Object string
    String representing the object's type. Objects of the same type share the same value.
    Status string
    Status of the alert. This can be active, inactive or archived.
    Id string
    The provider-assigned unique ID for this managed resource.
    Livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    Object string
    String representing the object's type. Objects of the same type share the same value.
    Status string
    Status of the alert. This can be active, inactive or archived.
    id string
    The provider-assigned unique ID for this managed resource.
    livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object string
    String representing the object's type. Objects of the same type share the same value.
    status string
    Status of the alert. This can be active, inactive or archived.
    id String
    The provider-assigned unique ID for this managed resource.
    livemode Boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object String
    String representing the object's type. Objects of the same type share the same value.
    status String
    Status of the alert. This can be active, inactive or archived.
    id string
    The provider-assigned unique ID for this managed resource.
    livemode boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object string
    String representing the object's type. Objects of the same type share the same value.
    status string
    Status of the alert. This can be active, inactive or archived.
    id str
    The provider-assigned unique ID for this managed resource.
    livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object str
    String representing the object's type. Objects of the same type share the same value.
    status str
    Status of the alert. This can be active, inactive or archived.
    id String
    The provider-assigned unique ID for this managed resource.
    livemode Boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object String
    String representing the object's type. Objects of the same type share the same value.
    status String
    Status of the alert. This can be active, inactive or archived.

    Look up Existing BillingAlert Resource

    Get an existing BillingAlert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BillingAlertState, opts?: CustomResourceOptions): BillingAlert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_type: Optional[str] = None,
            livemode: Optional[bool] = None,
            object: Optional[str] = None,
            status: Optional[str] = None,
            title: Optional[str] = None,
            usage_threshold: Optional[BillingAlertUsageThresholdArgs] = None) -> BillingAlert
    func GetBillingAlert(ctx *Context, name string, id IDInput, state *BillingAlertState, opts ...ResourceOption) (*BillingAlert, error)
    public static BillingAlert Get(string name, Input<string> id, BillingAlertState? state, CustomResourceOptions? opts = null)
    public static BillingAlert get(String name, Output<String> id, BillingAlertState state, CustomResourceOptions options)
    resources:  _:    type: stripe:BillingAlert    get:      id: ${id}
    import {
      to = stripe_billing_alert.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AlertType string
    Defines the type of the alert.
    Livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    Object string
    String representing the object's type. Objects of the same type share the same value.
    Status string
    Status of the alert. This can be active, inactive or archived.
    Title string
    Title of the alert.
    UsageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    AlertType string
    Defines the type of the alert.
    Livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    Object string
    String representing the object's type. Objects of the same type share the same value.
    Status string
    Status of the alert. This can be active, inactive or archived.
    Title string
    Title of the alert.
    UsageThreshold BillingAlertUsageThresholdArgs
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alert_type string
    Defines the type of the alert.
    livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object string
    String representing the object's type. Objects of the same type share the same value.
    status string
    Status of the alert. This can be active, inactive or archived.
    title string
    Title of the alert.
    usage_threshold object
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType String
    Defines the type of the alert.
    livemode Boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object String
    String representing the object's type. Objects of the same type share the same value.
    status String
    Status of the alert. This can be active, inactive or archived.
    title String
    Title of the alert.
    usageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType string
    Defines the type of the alert.
    livemode boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object string
    String representing the object's type. Objects of the same type share the same value.
    status string
    Status of the alert. This can be active, inactive or archived.
    title string
    Title of the alert.
    usageThreshold BillingAlertUsageThreshold
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alert_type str
    Defines the type of the alert.
    livemode bool
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object str
    String representing the object's type. Objects of the same type share the same value.
    status str
    Status of the alert. This can be active, inactive or archived.
    title str
    Title of the alert.
    usage_threshold BillingAlertUsageThresholdArgs
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.
    alertType String
    Defines the type of the alert.
    livemode Boolean
    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    object String
    String representing the object's type. Objects of the same type share the same value.
    status String
    Status of the alert. This can be active, inactive or archived.
    title String
    Title of the alert.
    usageThreshold Property Map
    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.

    Supporting Types

    BillingAlertUsageThreshold, BillingAlertUsageThresholdArgs

    Gte double
    The value at which this alert will trigger.
    Meter string
    The Billing Meter ID whose usage is monitored.
    Recurrence string
    Defines how the alert will behave.
    Filters List<BillingAlertUsageThresholdFilter>
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    Gte float64
    The value at which this alert will trigger.
    Meter string
    The Billing Meter ID whose usage is monitored.
    Recurrence string
    Defines how the alert will behave.
    Filters []BillingAlertUsageThresholdFilter
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    gte number
    The value at which this alert will trigger.
    meter string
    The Billing Meter ID whose usage is monitored.
    recurrence string
    Defines how the alert will behave.
    filters list(object)
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    gte Double
    The value at which this alert will trigger.
    meter String
    The Billing Meter ID whose usage is monitored.
    recurrence String
    Defines how the alert will behave.
    filters List<BillingAlertUsageThresholdFilter>
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    gte number
    The value at which this alert will trigger.
    meter string
    The Billing Meter ID whose usage is monitored.
    recurrence string
    Defines how the alert will behave.
    filters BillingAlertUsageThresholdFilter[]
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    gte float
    The value at which this alert will trigger.
    meter str
    The Billing Meter ID whose usage is monitored.
    recurrence str
    Defines how the alert will behave.
    filters Sequence[BillingAlertUsageThresholdFilter]
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
    gte Number
    The value at which this alert will trigger.
    meter String
    The Billing Meter ID whose usage is monitored.
    recurrence String
    Defines how the alert will behave.
    filters List<Property Map>
    The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.

    BillingAlertUsageThresholdFilter, BillingAlertUsageThresholdFilterArgs

    Type string
    Customer string
    Limit the scope of the alert to this customer ID
    Type string
    Customer string
    Limit the scope of the alert to this customer ID
    type string
    customer string
    Limit the scope of the alert to this customer ID
    type String
    customer String
    Limit the scope of the alert to this customer ID
    type string
    customer string
    Limit the scope of the alert to this customer ID
    type str
    customer str
    Limit the scope of the alert to this customer ID
    type String
    customer String
    Limit the scope of the alert to this customer ID

    Package Details

    Repository
    stripe stripe/terraform-provider-stripe
    License
    Notes
    This Pulumi package is based on the stripe Terraform Provider.
    Viewing docs for Stripe 0.3.0
    published on Friday, Aug 14, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial