HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulestripeapi-3.0.0.0Haskell2010

StripeAPI.Types.Subscription

Contains the types generated from the schema Subscription

  • 38 types
  • 15 values
datadata Subscription
#

Defines the object schema located at components.schemas.subscription in the specification.

Subscriptions allow you to charge a customer on a recurring basis.

Related guide: Creating Subscriptions.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Create a new Subscription with all required fields.

Defines the oneOf schema located at components.schemas.subscription.properties.application.anyOf in the specification.

ID of the Connect Application that created the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.billing_thresholds.anyOf in the specification.

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.collection_method in the specification.

Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.customer.anyOf in the specification.

ID of the customer who owns the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.default_payment_method.anyOf in the specification.

ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.default_source.anyOf in the specification.

ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.discount.anyOf in the specification.

Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.discount.anyOf.properties.customer.anyOf in the specification.

The ID of the customer associated with this discount.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.discount.anyOf.properties.object in the specification.

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

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.discount.anyOf.properties.promotion_code.anyOf in the specification.

The promotion code applied to create this discount.

Instances4Eq, Show, FromJSON, ToJSON
datadata SubscriptionItems'
#

Defines the object schema located at components.schemas.subscription.properties.items in the specification.

List of subscription items, each with an attached price.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.latest_invoice.anyOf in the specification.

The most recent invoice this subscription has generated.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.pause_collection.anyOf in the specification.

If specified, payment collection for this subscription will be paused.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.pause_collection.anyOf.properties.behavior in the specification.

The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf in the specification.

Payment settings passed on to invoices created by the subscription.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf in the specification.

Payment-method-specific configuration to provide to invoices created by the subscription.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.acss_debit.anyOf in the specification.

This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.acss_debit.anyOf.properties.verification_method in the specification.

Bank account verification method.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.bancontact.anyOf in the specification.

This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.bancontact.anyOf.properties.preferred_language in the specification.

Preferred language of the Bancontact authorization page that the customer is redirected to.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.card.anyOf in the specification.

This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.card.anyOf.properties.request_three_d_secure in the specification.

We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and other requirements. However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on manually requesting 3D Secure for more information on how this configuration interacts with Radar and our SCA Engine.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.customer_balance.anyOf in the specification.

This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.customer_balance.anyOf.properties.funding_type in the specification.

The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.us_bank_account.anyOf in the specification.

This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_options.anyOf.properties.us_bank_account.anyOf.properties.verification_method in the specification.

Bank account verification method.

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.payment_method_types.items in the specification.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.payment_settings.anyOf.properties.save_default_payment_method in the specification.

Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.pending_invoice_item_interval.anyOf in the specification.

Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the enum schema located at components.schemas.subscription.properties.pending_invoice_item_interval.anyOf.properties.interval in the specification.

Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.pending_setup_intent.anyOf in the specification.

You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.pending_update.anyOf in the specification.

If specified, pending updates that will be applied to the subscription once the \`latest_invoice\` has been paid.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.schedule.anyOf in the specification.

The schedule attached to the subscription

Instances4Eq, Show, FromJSON, ToJSON
datadata SubscriptionStatus'
#

Defines the enum schema located at components.schemas.subscription.properties.status in the specification.

Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`.

For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated.

A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.

If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.

If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.test_clock.anyOf in the specification.

ID of the test clock this subscription belongs to.

Instances4Eq, Show, FromJSON, ToJSON

Defines the object schema located at components.schemas.subscription.properties.transfer_data.anyOf in the specification.

The account (if any) the subscription\'s payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription\'s invoices.

Constructors

Instances4Eq, Show, FromJSON, ToJSON

Defines the oneOf schema located at components.schemas.subscription.properties.transfer_data.anyOf.properties.destination.anyOf in the specification.

The account where funds from the payment will be transferred to upon payment success.

Instances4Eq, Show, FromJSON, ToJSON