Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the types generated from the schema Subscription
Synopsis
- data Subscription = Subscription {
- subscriptionApplicationFeePercent :: Maybe Double
- subscriptionAutomaticTax :: SubscriptionAutomaticTax
- subscriptionBillingCycleAnchor :: Int
- subscriptionBillingThresholds :: Maybe SubscriptionBillingThresholds'
- subscriptionCancelAt :: Maybe Int
- subscriptionCancelAtPeriodEnd :: Bool
- subscriptionCanceledAt :: Maybe Int
- subscriptionCollectionMethod :: Maybe SubscriptionCollectionMethod'
- subscriptionCreated :: Int
- subscriptionCurrentPeriodEnd :: Int
- subscriptionCurrentPeriodStart :: Int
- subscriptionCustomer :: SubscriptionCustomer'Variants
- subscriptionDaysUntilDue :: Maybe Int
- subscriptionDefaultPaymentMethod :: Maybe SubscriptionDefaultPaymentMethod'Variants
- subscriptionDefaultSource :: Maybe SubscriptionDefaultSource'Variants
- subscriptionDefaultTaxRates :: Maybe [TaxRate]
- subscriptionDiscount :: Maybe SubscriptionDiscount'
- subscriptionEndedAt :: Maybe Int
- subscriptionId :: Text
- subscriptionItems :: SubscriptionItems'
- subscriptionLatestInvoice :: Maybe SubscriptionLatestInvoice'Variants
- subscriptionLivemode :: Bool
- subscriptionMetadata :: Object
- subscriptionNextPendingInvoiceItemInvoice :: Maybe Int
- subscriptionPauseCollection :: Maybe SubscriptionPauseCollection'
- subscriptionPendingInvoiceItemInterval :: Maybe SubscriptionPendingInvoiceItemInterval'
- subscriptionPendingSetupIntent :: Maybe SubscriptionPendingSetupIntent'Variants
- subscriptionPendingUpdate :: Maybe SubscriptionPendingUpdate'
- subscriptionSchedule :: Maybe SubscriptionSchedule'Variants
- subscriptionStartDate :: Int
- subscriptionStatus :: SubscriptionStatus'
- subscriptionTransferData :: Maybe SubscriptionTransferData'
- subscriptionTrialEnd :: Maybe Int
- subscriptionTrialStart :: Maybe Int
- mkSubscription :: SubscriptionAutomaticTax -> Int -> Bool -> Int -> Int -> Int -> SubscriptionCustomer'Variants -> Text -> SubscriptionItems' -> Bool -> Object -> Int -> SubscriptionStatus' -> Subscription
- data SubscriptionBillingThresholds' = SubscriptionBillingThresholds' {}
- mkSubscriptionBillingThresholds' :: SubscriptionBillingThresholds'
- data SubscriptionCollectionMethod'
- data SubscriptionCustomer'Variants
- data SubscriptionDefaultPaymentMethod'Variants
- data SubscriptionDefaultSource'Variants
- data SubscriptionDiscount' = SubscriptionDiscount' {
- subscriptionDiscount'CheckoutSession :: Maybe Text
- subscriptionDiscount'Coupon :: Maybe Coupon
- subscriptionDiscount'Customer :: Maybe SubscriptionDiscount'Customer'Variants
- subscriptionDiscount'End :: Maybe Int
- subscriptionDiscount'Id :: Maybe Text
- subscriptionDiscount'Invoice :: Maybe Text
- subscriptionDiscount'InvoiceItem :: Maybe Text
- subscriptionDiscount'Object :: Maybe SubscriptionDiscount'Object'
- subscriptionDiscount'PromotionCode :: Maybe SubscriptionDiscount'PromotionCode'Variants
- subscriptionDiscount'Start :: Maybe Int
- subscriptionDiscount'Subscription :: Maybe Text
- mkSubscriptionDiscount' :: SubscriptionDiscount'
- data SubscriptionDiscount'Customer'Variants
- data SubscriptionDiscount'Object'
- data SubscriptionDiscount'PromotionCode'Variants
- data SubscriptionItems' = SubscriptionItems' {}
- mkSubscriptionItems' :: [SubscriptionItem] -> Bool -> Text -> SubscriptionItems'
- data SubscriptionLatestInvoice'Variants
- data SubscriptionPauseCollection' = SubscriptionPauseCollection' {}
- mkSubscriptionPauseCollection' :: SubscriptionPauseCollection'
- data SubscriptionPauseCollection'Behavior'
- data SubscriptionPendingInvoiceItemInterval' = SubscriptionPendingInvoiceItemInterval' {}
- mkSubscriptionPendingInvoiceItemInterval' :: SubscriptionPendingInvoiceItemInterval'
- data SubscriptionPendingInvoiceItemInterval'Interval'
- = SubscriptionPendingInvoiceItemInterval'Interval'Other Value
- | SubscriptionPendingInvoiceItemInterval'Interval'Typed Text
- | SubscriptionPendingInvoiceItemInterval'Interval'EnumDay
- | SubscriptionPendingInvoiceItemInterval'Interval'EnumMonth
- | SubscriptionPendingInvoiceItemInterval'Interval'EnumWeek
- | SubscriptionPendingInvoiceItemInterval'Interval'EnumYear
- data SubscriptionPendingSetupIntent'Variants
- data SubscriptionPendingUpdate' = SubscriptionPendingUpdate' {}
- mkSubscriptionPendingUpdate' :: SubscriptionPendingUpdate'
- data SubscriptionSchedule'Variants
- data SubscriptionStatus'
- = SubscriptionStatus'Other Value
- | SubscriptionStatus'Typed Text
- | SubscriptionStatus'EnumActive
- | SubscriptionStatus'EnumCanceled
- | SubscriptionStatus'EnumIncomplete
- | SubscriptionStatus'EnumIncompleteExpired
- | SubscriptionStatus'EnumPastDue
- | SubscriptionStatus'EnumTrialing
- | SubscriptionStatus'EnumUnpaid
- data SubscriptionTransferData' = SubscriptionTransferData' {}
- mkSubscriptionTransferData' :: SubscriptionTransferData'
- data SubscriptionTransferData'Destination'Variants
Documentation
data Subscription Source #
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.
Subscription | |
|
Instances
Eq Subscription Source # | |
Defined in StripeAPI.Types.Subscription (==) :: Subscription -> Subscription -> Bool # (/=) :: Subscription -> Subscription -> Bool # | |
Show Subscription Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> Subscription -> ShowS # show :: Subscription -> String # showList :: [Subscription] -> ShowS # | |
ToJSON Subscription Source # | |
Defined in StripeAPI.Types.Subscription toJSON :: Subscription -> Value # toEncoding :: Subscription -> Encoding # toJSONList :: [Subscription] -> Value # toEncodingList :: [Subscription] -> Encoding # | |
FromJSON Subscription Source # | |
Defined in StripeAPI.Types.Subscription parseJSON :: Value -> Parser Subscription # parseJSONList :: Value -> Parser [Subscription] # |
:: SubscriptionAutomaticTax | |
-> Int | |
-> Bool | |
-> Int | |
-> Int | |
-> Int | |
-> SubscriptionCustomer'Variants | |
-> Text | |
-> SubscriptionItems' | |
-> Bool | |
-> Object | |
-> Int | |
-> SubscriptionStatus' | |
-> Subscription |
Create a new Subscription
with all required fields.
data SubscriptionBillingThresholds' Source #
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
SubscriptionBillingThresholds' | |
|
mkSubscriptionBillingThresholds' :: SubscriptionBillingThresholds' Source #
Create a new SubscriptionBillingThresholds'
with all required fields.
data SubscriptionCollectionMethod' Source #
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.
SubscriptionCollectionMethod'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
SubscriptionCollectionMethod'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
SubscriptionCollectionMethod'EnumChargeAutomatically | Represents the JSON value |
SubscriptionCollectionMethod'EnumSendInvoice | Represents the JSON value |
Instances
data SubscriptionCustomer'Variants Source #
Defines the oneOf schema located at components.schemas.subscription.properties.customer.anyOf
in the specification.
ID of the customer who owns the subscription.
SubscriptionCustomer'Text Text | |
SubscriptionCustomer'Customer Customer | |
SubscriptionCustomer'DeletedCustomer DeletedCustomer |
Instances
data SubscriptionDefaultPaymentMethod'Variants Source #
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.
SubscriptionDefaultPaymentMethod'Text Text | |
SubscriptionDefaultPaymentMethod'PaymentMethod PaymentMethod |
data SubscriptionDefaultSource'Variants Source #
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.
data SubscriptionDiscount' Source #
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.
SubscriptionDiscount' | |
|
Instances
Eq SubscriptionDiscount' Source # | |
Defined in StripeAPI.Types.Subscription (==) :: SubscriptionDiscount' -> SubscriptionDiscount' -> Bool # (/=) :: SubscriptionDiscount' -> SubscriptionDiscount' -> Bool # | |
Show SubscriptionDiscount' Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> SubscriptionDiscount' -> ShowS # show :: SubscriptionDiscount' -> String # showList :: [SubscriptionDiscount'] -> ShowS # | |
ToJSON SubscriptionDiscount' Source # | |
Defined in StripeAPI.Types.Subscription toJSON :: SubscriptionDiscount' -> Value # toEncoding :: SubscriptionDiscount' -> Encoding # toJSONList :: [SubscriptionDiscount'] -> Value # toEncodingList :: [SubscriptionDiscount'] -> Encoding # | |
FromJSON SubscriptionDiscount' Source # | |
Defined in StripeAPI.Types.Subscription parseJSON :: Value -> Parser SubscriptionDiscount' # parseJSONList :: Value -> Parser [SubscriptionDiscount'] # |
mkSubscriptionDiscount' :: SubscriptionDiscount' Source #
Create a new SubscriptionDiscount'
with all required fields.
data SubscriptionDiscount'Customer'Variants Source #
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.
SubscriptionDiscount'Customer'Text Text | |
SubscriptionDiscount'Customer'Customer Customer | |
SubscriptionDiscount'Customer'DeletedCustomer DeletedCustomer |
data SubscriptionDiscount'Object' Source #
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.
SubscriptionDiscount'Object'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
SubscriptionDiscount'Object'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
SubscriptionDiscount'Object'EnumDiscount | Represents the JSON value |
Instances
data SubscriptionDiscount'PromotionCode'Variants Source #
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.
SubscriptionDiscount'PromotionCode'Text Text | |
SubscriptionDiscount'PromotionCode'PromotionCode PromotionCode |
data SubscriptionItems' Source #
Defines the object schema located at components.schemas.subscription.properties.items
in the specification.
List of subscription items, each with an attached price.
SubscriptionItems' | |
|
Instances
Eq SubscriptionItems' Source # | |
Defined in StripeAPI.Types.Subscription (==) :: SubscriptionItems' -> SubscriptionItems' -> Bool # (/=) :: SubscriptionItems' -> SubscriptionItems' -> Bool # | |
Show SubscriptionItems' Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> SubscriptionItems' -> ShowS # show :: SubscriptionItems' -> String # showList :: [SubscriptionItems'] -> ShowS # | |
ToJSON SubscriptionItems' Source # | |
Defined in StripeAPI.Types.Subscription toJSON :: SubscriptionItems' -> Value # toEncoding :: SubscriptionItems' -> Encoding # toJSONList :: [SubscriptionItems'] -> Value # toEncodingList :: [SubscriptionItems'] -> Encoding # | |
FromJSON SubscriptionItems' Source # | |
Defined in StripeAPI.Types.Subscription parseJSON :: Value -> Parser SubscriptionItems' # parseJSONList :: Value -> Parser [SubscriptionItems'] # |
:: [SubscriptionItem] | |
-> Bool | |
-> Text | |
-> SubscriptionItems' |
Create a new SubscriptionItems'
with all required fields.
data SubscriptionLatestInvoice'Variants Source #
Defines the oneOf schema located at components.schemas.subscription.properties.latest_invoice.anyOf
in the specification.
The most recent invoice this subscription has generated.
data SubscriptionPauseCollection' Source #
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.
SubscriptionPauseCollection' | |
|
Instances
mkSubscriptionPauseCollection' :: SubscriptionPauseCollection' Source #
Create a new SubscriptionPauseCollection'
with all required fields.
data SubscriptionPauseCollection'Behavior' Source #
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`.
SubscriptionPauseCollection'Behavior'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
SubscriptionPauseCollection'Behavior'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
SubscriptionPauseCollection'Behavior'EnumKeepAsDraft | Represents the JSON value |
SubscriptionPauseCollection'Behavior'EnumMarkUncollectible | Represents the JSON value |
SubscriptionPauseCollection'Behavior'EnumVoid | Represents the JSON value |
data SubscriptionPendingInvoiceItemInterval' Source #
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.
SubscriptionPendingInvoiceItemInterval' | |
|
mkSubscriptionPendingInvoiceItemInterval' :: SubscriptionPendingInvoiceItemInterval' Source #
Create a new SubscriptionPendingInvoiceItemInterval'
with all required fields.
data SubscriptionPendingInvoiceItemInterval'Interval' Source #
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`.
SubscriptionPendingInvoiceItemInterval'Interval'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
SubscriptionPendingInvoiceItemInterval'Interval'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
SubscriptionPendingInvoiceItemInterval'Interval'EnumDay | Represents the JSON value |
SubscriptionPendingInvoiceItemInterval'Interval'EnumMonth | Represents the JSON value |
SubscriptionPendingInvoiceItemInterval'Interval'EnumWeek | Represents the JSON value |
SubscriptionPendingInvoiceItemInterval'Interval'EnumYear | Represents the JSON value |
Instances
data SubscriptionPendingSetupIntent'Variants Source #
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.
data SubscriptionPendingUpdate' Source #
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.
SubscriptionPendingUpdate' | |
|
Instances
Eq SubscriptionPendingUpdate' Source # | |
Defined in StripeAPI.Types.Subscription | |
Show SubscriptionPendingUpdate' Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> SubscriptionPendingUpdate' -> ShowS # show :: SubscriptionPendingUpdate' -> String # showList :: [SubscriptionPendingUpdate'] -> ShowS # | |
ToJSON SubscriptionPendingUpdate' Source # | |
Defined in StripeAPI.Types.Subscription | |
FromJSON SubscriptionPendingUpdate' Source # | |
Defined in StripeAPI.Types.Subscription |
mkSubscriptionPendingUpdate' :: SubscriptionPendingUpdate' Source #
Create a new SubscriptionPendingUpdate'
with all required fields.
data SubscriptionSchedule'Variants Source #
Defines the oneOf schema located at components.schemas.subscription.properties.schedule.anyOf
in the specification.
The schedule attached to the subscription
Instances
data SubscriptionStatus' Source #
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.
SubscriptionStatus'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
SubscriptionStatus'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
SubscriptionStatus'EnumActive | Represents the JSON value |
SubscriptionStatus'EnumCanceled | Represents the JSON value |
SubscriptionStatus'EnumIncomplete | Represents the JSON value |
SubscriptionStatus'EnumIncompleteExpired | Represents the JSON value |
SubscriptionStatus'EnumPastDue | Represents the JSON value |
SubscriptionStatus'EnumTrialing | Represents the JSON value |
SubscriptionStatus'EnumUnpaid | Represents the JSON value |
Instances
Eq SubscriptionStatus' Source # | |
Defined in StripeAPI.Types.Subscription (==) :: SubscriptionStatus' -> SubscriptionStatus' -> Bool # (/=) :: SubscriptionStatus' -> SubscriptionStatus' -> Bool # | |
Show SubscriptionStatus' Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> SubscriptionStatus' -> ShowS # show :: SubscriptionStatus' -> String # showList :: [SubscriptionStatus'] -> ShowS # | |
ToJSON SubscriptionStatus' Source # | |
Defined in StripeAPI.Types.Subscription toJSON :: SubscriptionStatus' -> Value # toEncoding :: SubscriptionStatus' -> Encoding # toJSONList :: [SubscriptionStatus'] -> Value # toEncodingList :: [SubscriptionStatus'] -> Encoding # | |
FromJSON SubscriptionStatus' Source # | |
Defined in StripeAPI.Types.Subscription parseJSON :: Value -> Parser SubscriptionStatus' # parseJSONList :: Value -> Parser [SubscriptionStatus'] # |
data SubscriptionTransferData' Source #
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.
SubscriptionTransferData' | |
|
Instances
Eq SubscriptionTransferData' Source # | |
Defined in StripeAPI.Types.Subscription | |
Show SubscriptionTransferData' Source # | |
Defined in StripeAPI.Types.Subscription showsPrec :: Int -> SubscriptionTransferData' -> ShowS # show :: SubscriptionTransferData' -> String # showList :: [SubscriptionTransferData'] -> ShowS # | |
ToJSON SubscriptionTransferData' Source # | |
Defined in StripeAPI.Types.Subscription | |
FromJSON SubscriptionTransferData' Source # | |
Defined in StripeAPI.Types.Subscription |
mkSubscriptionTransferData' :: SubscriptionTransferData' Source #
Create a new SubscriptionTransferData'
with all required fields.
data SubscriptionTransferData'Destination'Variants Source #
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.