pub enum CreateSubscriptionPaymentBehavior {
AllowIncomplete,
DefaultIncomplete,
ErrorIfIncomplete,
PendingIfIncomplete,
}
Expand description
Only applies to subscriptions with collection_method=charge_automatically
.
Use allow_incomplete
to create Subscriptions with status=incomplete
if the first invoice can’t be paid.
Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription’s invoice.
For example, SCA regulation may require 3DS authentication to complete payment.
See the SCA Migration Guide for Billing to learn more.
This is the default behavior.
Use default_incomplete
to create Subscriptions with status=incomplete
when the first invoice requires payment, otherwise start as active.
Subscriptions transition to status=active
when successfully confirming the PaymentIntent on the first invoice.
This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.
If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to status=incomplete_expired
, which is a terminal state.
Use error_if_incomplete
if you want Stripe to return an HTTP 402 status code if a subscription’s first invoice can’t be paid.
For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn’t create a Subscription and returns an error instead.
This was the default behavior for API versions prior to 2019-03-14.
See the changelog to learn more.
pending_if_incomplete
is only used with updates and cannot be passed when creating a Subscription.
Subscriptions with collection_method=send_invoice
are automatically activated regardless of the first Invoice status.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for CreateSubscriptionPaymentBehavior
impl Clone for CreateSubscriptionPaymentBehavior
Source§fn clone(&self) -> CreateSubscriptionPaymentBehavior
fn clone(&self) -> CreateSubscriptionPaymentBehavior
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for CreateSubscriptionPaymentBehavior
impl PartialEq for CreateSubscriptionPaymentBehavior
Source§fn eq(&self, other: &CreateSubscriptionPaymentBehavior) -> bool
fn eq(&self, other: &CreateSubscriptionPaymentBehavior) -> bool
self
and other
values to be equal, and is used by ==
.