Skip to content

Stripe

Stripe resources (products, webhook endpoints) for Sanoma, read through the OpenTofu provider.

Package @sanoma-ai/connector-stripe, version 0.11.24. Its README, with how to install and connect it, is on GitHub.

Resource types, which a data file under resources/ declares: stripe.product, stripe.webhook_endpoint.

product

import

stripe.product.importreadsafe to retry

Find a product by its binding id and read it; gone when there is none

Input

  • idstringrequired

    at least 1 character

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • activeboolean | null

      Whether the product is currently available for purchase.

    • creatednumber | null

      Time at which the object was created. Measured in seconds since the Unix epoch.

    • default_pricestring | null

      The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product.

    • descriptionstring | null

      The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

    • idstring | null

      Unique identifier for the object.

    • imagesstring[] | null

      A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

    • livemodeboolean | null

      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

    • metadatarecord of string | null

      Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

    • namestringrequired

      The product's name, meant to be displayable to the customer.

    • objectstring | null

      String representing the object's type. Objects of the same type share the same value.

    • shippableboolean | null

      Whether this product is shipped (i.e., physical goods).

    • statement_descriptorstring | null

      Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.

    • tax_codestring | null

      A [tax code](https://docs.stripe.com/tax/tax-categories) ID.

    • typestring | null

      The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.

    • unit_labelstring | null

      A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.

    • updatednumber | null

      Time at which the object was last updated. Measured in seconds since the Unix epoch.

    • urlstring | null

      A URL of a publicly-accessible webpage for this product.

    • default_price_dataobject[] | null

      Data used to generate a new [Price](https://docs.stripe.com/api/prices) object. This Price will be set as the default price for this product.

      Each item
      • currencystringrequired

        Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).

      • metadatarecord of string | null

        Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

      • tax_behaviorstring | null

        Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.

      • unit_amountnumber | null

        A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of unit_amount, unit_amount_decimal, or custom_unit_amount is required.

      • unit_amount_decimalstring | null

        Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

      • currency_optionsobject[] | null

        Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

        Each item
        • keystringrequired

          Key for this entry.

        • tax_behaviorstring | null

          Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.

        • tiersobject[] | null

          Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.

          Each item
          • flat_amountnumber | null

            The flat billing amount for an entire tier, regardless of the number of units in the tier.

          • flat_amount_decimalstring | null

            Same as flat_amount, but accepts a decimal value representing an integer in the minor units of the currency. Only one of flat_amount and flat_amount_decimal can be set.

          • unit_amountnumber | null

            The per unit billing amount for each individual unit for which this tier applies.

          • unit_amount_decimalstring | null

            Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

          • up_tonumberrequired

            Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use inf to define a fallback tier.

        • unit_amountnumber | null

          A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.

        • unit_amount_decimalstring | null

          Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

        • custom_unit_amountobject[] | null

          When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

          Each item
          • enabledbooleanrequired

            Pass in true to enable custom_unit_amount, otherwise omit custom_unit_amount.

          • maximumnumber | null

            The maximum unit amount the customer can specify for this item.

          • minimumnumber | null

            The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.

          • presetnumber | null

            The starting unit amount which can be updated by the customer.

      • custom_unit_amountobject[] | null

        When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

        Each item
        • enabledbooleanrequired

          Pass in true to enable custom_unit_amount, otherwise omit custom_unit_amount.

        • maximumnumber | null

          The maximum unit amount the customer can specify for this item.

        • minimumnumber | null

          The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.

        • presetnumber | null

          The starting unit amount which can be updated by the customer.

      • recurringobject[] | null

        The recurring components of a price such as interval and interval_count.

        Each item
        • intervalstringrequired

          Specifies billing frequency. Either day, week, month or year.

        • interval_countnumber | null

          The number of intervals between subscription billings. For example, interval=month and interval_count=3 bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).

    • marketing_featuresobject[] | null

      A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table).

      Each item
      • namestringrequired

        The marketing feature name. Up to 80 characters long.

    • package_dimensionsobject[] | null

      The dimensions of this product for shipping purposes.

      Each item
      • heightnumberrequired

        Height, in inches.

      • lengthnumberrequired

        Length, in inches.

      • weightnumberrequired

        Weight, in ounces.

      • widthnumberrequired

        Width, in inches.

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

read

stripe.product.readreadsafe to retry

Read a product as it is now; gone when it no longer exists

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • activeboolean | null

      Whether the product is currently available for purchase.

    • creatednumber | null

      Time at which the object was created. Measured in seconds since the Unix epoch.

    • default_pricestring | null

      The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product.

    • descriptionstring | null

      The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

    • idstring | null

      Unique identifier for the object.

    • imagesstring[] | null

      A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

    • livemodeboolean | null

      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

    • metadatarecord of string | null

      Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

    • namestringrequired

      The product's name, meant to be displayable to the customer.

    • objectstring | null

      String representing the object's type. Objects of the same type share the same value.

    • shippableboolean | null

      Whether this product is shipped (i.e., physical goods).

    • statement_descriptorstring | null

      Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.

    • tax_codestring | null

      A [tax code](https://docs.stripe.com/tax/tax-categories) ID.

    • typestring | null

      The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.

    • unit_labelstring | null

      A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.

    • updatednumber | null

      Time at which the object was last updated. Measured in seconds since the Unix epoch.

    • urlstring | null

      A URL of a publicly-accessible webpage for this product.

    • default_price_dataobject[] | null

      Data used to generate a new [Price](https://docs.stripe.com/api/prices) object. This Price will be set as the default price for this product.

      Each item
      • currencystringrequired

        Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).

      • metadatarecord of string | null

        Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

      • tax_behaviorstring | null

        Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.

      • unit_amountnumber | null

        A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of unit_amount, unit_amount_decimal, or custom_unit_amount is required.

      • unit_amount_decimalstring | null

        Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

      • currency_optionsobject[] | null

        Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

        Each item
        • keystringrequired

          Key for this entry.

        • tax_behaviorstring | null

          Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.

        • tiersobject[] | null

          Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.

          Each item
          • flat_amountnumber | null

            The flat billing amount for an entire tier, regardless of the number of units in the tier.

          • flat_amount_decimalstring | null

            Same as flat_amount, but accepts a decimal value representing an integer in the minor units of the currency. Only one of flat_amount and flat_amount_decimal can be set.

          • unit_amountnumber | null

            The per unit billing amount for each individual unit for which this tier applies.

          • unit_amount_decimalstring | null

            Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

          • up_tonumberrequired

            Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use inf to define a fallback tier.

        • unit_amountnumber | null

          A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.

        • unit_amount_decimalstring | null

          Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

        • custom_unit_amountobject[] | null

          When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

          Each item
          • enabledbooleanrequired

            Pass in true to enable custom_unit_amount, otherwise omit custom_unit_amount.

          • maximumnumber | null

            The maximum unit amount the customer can specify for this item.

          • minimumnumber | null

            The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.

          • presetnumber | null

            The starting unit amount which can be updated by the customer.

      • custom_unit_amountobject[] | null

        When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

        Each item
        • enabledbooleanrequired

          Pass in true to enable custom_unit_amount, otherwise omit custom_unit_amount.

        • maximumnumber | null

          The maximum unit amount the customer can specify for this item.

        • minimumnumber | null

          The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.

        • presetnumber | null

          The starting unit amount which can be updated by the customer.

      • recurringobject[] | null

        The recurring components of a price such as interval and interval_count.

        Each item
        • intervalstringrequired

          Specifies billing frequency. Either day, week, month or year.

        • interval_countnumber | null

          The number of intervals between subscription billings. For example, interval=month and interval_count=3 bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).

    • marketing_featuresobject[] | null

      A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table).

      Each item
      • namestringrequired

        The marketing feature name. Up to 80 characters long.

    • package_dimensionsobject[] | null

      The dimensions of this product for shipping purposes.

      Each item
      • heightnumberrequired

        Height, in inches.

      • lengthnumberrequired

        Length, in inches.

      • weightnumberrequired

        Weight, in ounces.

      • widthnumberrequired

        Width, in inches.

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

webhook_endpoint

import

stripe.webhook_endpoint.importreadsafe to retry

Find a webhook endpoint by its binding id and read it; gone when there is none

Input

  • idstringrequired

    at least 1 character

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • api_versionstring | null

      The API version events are rendered as for this webhook endpoint.

    • applicationstring | null

      The ID of the associated Connect application.

    • connectboolean | null

      Whether this endpoint should receive events from connected accounts (true), or from your account (false). Defaults to false.

    • creatednumber | null

      Time at which the object was created. Measured in seconds since the Unix epoch.

    • descriptionstring | null

      An optional description of what the webhook is used for.

    • enabled_eventsstring[]required

      The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection.

    • idstring | null

      Unique identifier for the object.

    • livemodeboolean | null

      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

    • metadatarecord of string | null

      Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

    • objectstring | null

      String representing the object's type. Objects of the same type share the same value.

    • secretstring | null

      The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.

    • statusstring | null

      The status of the webhook. It can be enabled or disabled.

    • urlstringrequired

      The URL of the webhook endpoint.

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

read

stripe.webhook_endpoint.readreadsafe to retry

Read a webhook endpoint as it is now; gone when it no longer exists

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • api_versionstring | null

      The API version events are rendered as for this webhook endpoint.

    • applicationstring | null

      The ID of the associated Connect application.

    • connectboolean | null

      Whether this endpoint should receive events from connected accounts (true), or from your account (false). Defaults to false.

    • creatednumber | null

      Time at which the object was created. Measured in seconds since the Unix epoch.

    • descriptionstring | null

      An optional description of what the webhook is used for.

    • enabled_eventsstring[]required

      The list of events to enable for this endpoint. ['*'] indicates that all events are enabled, except those that require explicit selection.

    • idstring | null

      Unique identifier for the object.

    • livemodeboolean | null

      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

    • metadatarecord of string | null

      Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

    • objectstring | null

      String representing the object's type. Objects of the same type share the same value.

    • secretstring | null

      The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.

    • statusstring | null

      The status of the webhook. It can be enabled or disabled.

    • urlstringrequired

      The URL of the webhook endpoint.

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

These pages describe sanoma 0.11.24.