--- title: Pause payment collection subtitle: Learn how to pause payment collection on subscriptions. route: /billing/subscriptions/pause-payment --- # Pause payment collection Learn how to pause payment collection on subscriptions. Subscriptions with `paused collection` can’t move into `status=paused`. Only [ending free trial periods without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment) cause subscriptions to enter a [paused `status`](https://stripe.com/billing/subscriptions/overview#subscription-statuses). Pausing payment collection is often used to temporarily offer your services for free. This is sometimes referred to as a “grace period” if a customer needs additional time to pay or can’t pay for one or more billing cycles. You can pause or resume collection in the [Stripe Dashboard](https://support.stripe.com/questions/how-to-pause-or-cancel-subscriptions) or the API. While collection is paused, *subscriptions* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) still generate *invoices* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice), but you have a few options for handling these invoices. Review the following use cases to determine the best approach for you: | Use case | API configuration | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | [Temporarily offer services for free and never collect payment](#collect-payment-never) | Use `behavior=void` | | [Temporarily offer services for free and collect payment later](#collect-payment-later) | Use `behavior=keep_as_draft` | | [Temporarily offer services for free and mark invoice as uncollectible](#mark-as-uncollectible) | Use `behavior=mark_uncollectible` | If these options don’t fit your use case, you might want to consider [canceling subscriptions](https://stripe.com/billing/subscriptions/cancel) instead. Invoices created before subscriptions are paused continue to be [retried](https://stripe.com/invoicing/automatic-collection) unless you [void](https://stripe.com/api/invoices/void) them. ## Temporarily offer services for free and never collect payment If you temporarily want to offer your services for free and you don’t want to collect payment on the invoice (for example, a “grace period”), you can void invoices that your subscription creates to make sure that your customers aren’t charged and the subscription remains `status=active`. Use the Subscription ID to update `pause_collection[behavior]` to `void` and `pause_collection[resumes_at]` to the date you want to start collecting payments again. Code snippet calling post /v1/subscriptions/{subscription} in curl (resource-based pattern). ```curl curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d "pause_collection[behavior]"=void ``` Code snippet calling post /v1/subscriptions/{subscription} in cli (resource-based pattern). ```cli stripe subscriptions update {{SUBSCRIPTION_ID}} \ -d "pause_collection[behavior]"=void ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (resource-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2' subscription = Stripe::Subscription.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'void'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (service-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.v1.subscriptions.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'void'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (resource-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" subscription = stripe.Subscription.modify( "{{SUBSCRIPTION_ID}}", pause_collection={"behavior": "void"}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (service-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.subscriptions.update( "{{SUBSCRIPTION_ID}}", {"pause_collection": {"behavior": "void"}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in php (resource-based pattern). ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); $subscription = $stripe->subscriptions->update( '{{SUBSCRIPTION_ID}}', ['pause_collection' => ['behavior' => 'void']] ); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (resource-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; Subscription resource = Subscription.retrieve("{{SUBSCRIPTION_ID}}"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.VOID) .build() ) .build(); Subscription subscription = resource.update(params); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (service-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.VOID) .build() ) .build(); Subscription subscription = client.subscriptions().update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in node (resource-based pattern). ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); const subscription = await stripe.subscriptions.update( '{{SUBSCRIPTION_ID}}', { pause_collection: { behavior: 'void', }, } ); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (resource-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys stripe.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" params := &stripe.SubscriptionParams{ PauseCollection: &stripe.SubscriptionPauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorVoid), }, }; result, err := subscription.Update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (service-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); params := &stripe.SubscriptionUpdateParams{ PauseCollection: &stripe.SubscriptionUpdatePauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorVoid), }, SubscriptionExposedID: stripe.String("{{SUBSCRIPTION_ID}}"), }; result, err := sc.V1Subscriptions.Update(context.TODO(), params); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (resource-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeConfiguration.ApiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "void" }, }; var service = new SubscriptionService(); Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (service-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "void" }, }; var client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); var service = client.V1.Subscriptions; Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` All invoices created before the `resumes_at` date are immediately marked as void. Stripe won’t send any upcoming invoice emails or webhooks and the subscription’s status remains unchanged. If you don’t set a `resumes_at` date, the subscription remains paused until you unset `pause_collection`. ## Temporarily offer services for free and collect payment later If you want to temporarily offer your services for free and collect payments later, set `pause_collection[behavior]=keep_as_draft`. If you know when you want to resume collection, pass a timestamp for `resumes_at`. Code snippet calling post /v1/subscriptions/{subscription} in curl (resource-based pattern). ```curl curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d "pause_collection[behavior]"=keep_as_draft ``` Code snippet calling post /v1/subscriptions/{subscription} in cli (resource-based pattern). ```cli stripe subscriptions update {{SUBSCRIPTION_ID}} \ -d "pause_collection[behavior]"=keep_as_draft ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (resource-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2' subscription = Stripe::Subscription.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'keep_as_draft'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (service-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.v1.subscriptions.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'keep_as_draft'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (resource-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" subscription = stripe.Subscription.modify( "{{SUBSCRIPTION_ID}}", pause_collection={"behavior": "keep_as_draft"}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (service-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.subscriptions.update( "{{SUBSCRIPTION_ID}}", {"pause_collection": {"behavior": "keep_as_draft"}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in php (resource-based pattern). ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); $subscription = $stripe->subscriptions->update( '{{SUBSCRIPTION_ID}}', ['pause_collection' => ['behavior' => 'keep_as_draft']] ); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (resource-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; Subscription resource = Subscription.retrieve("{{SUBSCRIPTION_ID}}"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.KEEP_AS_DRAFT) .build() ) .build(); Subscription subscription = resource.update(params); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (service-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.KEEP_AS_DRAFT) .build() ) .build(); Subscription subscription = client.subscriptions().update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in node (resource-based pattern). ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); const subscription = await stripe.subscriptions.update( '{{SUBSCRIPTION_ID}}', { pause_collection: { behavior: 'keep_as_draft', }, } ); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (resource-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys stripe.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" params := &stripe.SubscriptionParams{ PauseCollection: &stripe.SubscriptionPauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorKeepAsDraft), }, }; result, err := subscription.Update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (service-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); params := &stripe.SubscriptionUpdateParams{ PauseCollection: &stripe.SubscriptionUpdatePauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorKeepAsDraft), }, SubscriptionExposedID: stripe.String("{{SUBSCRIPTION_ID}}"), }; result, err := sc.V1Subscriptions.Update(context.TODO(), params); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (resource-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeConfiguration.ApiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "keep_as_draft", }, }; var service = new SubscriptionService(); Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (service-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "keep_as_draft", }, }; var client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); var service = client.V1.Subscriptions; Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` All invoices created before the `resumes_at` date remain in `draft` state and `auto_advance` is set to `false`. During this time, Stripe won’t send any upcoming invoice emails or webhooks for these invoices and the subscription’s status remains unchanged. If you don’t set a `resumes_at` date, the subscription remains paused until you unset `pause_collection`. If you have custom logic that finalizes invoices you might need to disable or modify it so that it doesn’t conflict with these settings. When you’re ready to collect payment for these invoices, set `auto_advance` back to `true`. If you don’t have the invoice IDs, you can use Subscription IDs to check for invoices with `status=draft`. Using the invoice ID, you can then update `auto_advance=true`: Code snippet calling post /v1/invoices/{invoice} in curl (resource-based pattern). ```curl curl https://api.stripe.com/v1/invoices/{{INVOICE_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d auto_advance=true ``` Code snippet calling post /v1/invoices/{invoice} in cli (resource-based pattern). ```cli stripe invoices update {{INVOICE_ID}} \ --auto-advance=true ``` Code snippet calling post /v1/invoices/{invoice} in ruby (resource-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2' invoice = Stripe::Invoice.update('{{INVOICE_ID}}', {auto_advance: true}) ``` Code snippet calling post /v1/invoices/{invoice} in ruby (service-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("sk_test_BQokikJOvBiI2HlWgH4olfQ2") invoice = client.v1.invoices.update('{{INVOICE_ID}}', {auto_advance: true}) ``` Code snippet calling post /v1/invoices/{invoice} in python (resource-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" invoice = stripe.Invoice.modify( "{{INVOICE_ID}}", auto_advance=True, ) ``` Code snippet calling post /v1/invoices/{invoice} in python (service-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2") invoice = client.invoices.update( "{{INVOICE_ID}}", {"auto_advance": True}, ) ``` Code snippet calling post /v1/invoices/{invoice} in php (resource-based pattern). ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); $invoice = $stripe->invoices->update('{{INVOICE_ID}}', ['auto_advance' => true]); ``` Code snippet calling post /v1/invoices/{invoice} in java (resource-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; Invoice resource = Invoice.retrieve("{{INVOICE_ID}}"); InvoiceUpdateParams params = InvoiceUpdateParams.builder().setAutoAdvance(true).build(); Invoice invoice = resource.update(params); ``` Code snippet calling post /v1/invoices/{invoice} in java (service-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); InvoiceUpdateParams params = InvoiceUpdateParams.builder().setAutoAdvance(true).build(); Invoice invoice = client.invoices().update("{{INVOICE_ID}}", params); ``` Code snippet calling post /v1/invoices/{invoice} in node (resource-based pattern). ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); const invoice = await stripe.invoices.update( '{{INVOICE_ID}}', { auto_advance: true, } ); ``` Code snippet calling post /v1/invoices/{invoice} in go (resource-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys stripe.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" params := &stripe.InvoiceParams{AutoAdvance: stripe.Bool(true)}; result, err := invoice.Update("{{INVOICE_ID}}", params); ``` Code snippet calling post /v1/invoices/{invoice} in go (service-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); params := &stripe.InvoiceUpdateParams{ AutoAdvance: stripe.Bool(true), Invoice: stripe.String("{{INVOICE_ID}}"), }; result, err := sc.V1Invoices.Update(context.TODO(), params); ``` Code snippet calling post /v1/invoices/{invoice} in dotnet (resource-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeConfiguration.ApiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; var options = new InvoiceUpdateOptions { AutoAdvance = true }; var service = new InvoiceService(); Invoice invoice = service.Update("{{INVOICE_ID}}", options); ``` Code snippet calling post /v1/invoices/{invoice} in dotnet (service-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new InvoiceUpdateOptions { AutoAdvance = true }; var client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); var service = client.V1.Invoices; Invoice invoice = service.Update("{{INVOICE_ID}}", options); ``` ## Temporarily offer services for free and mark invoices as uncollectible If you temporarily want to offer your services for free and mark any invoices generated by the subscription as uncollectible, use the Subscription ID to update `pause_collection[behavior]` to `mark_uncollectible` and optionally `pause_collection[resumes_at]` to the date you want to start collecting payments again. This makes sure that any downstream reporting is accurate, your customer isn’t charged, and the subscription remains `status=active`. Code snippet calling post /v1/subscriptions/{subscription} in curl (resource-based pattern). ```curl curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d "pause_collection[behavior]"=mark_uncollectible ``` Code snippet calling post /v1/subscriptions/{subscription} in cli (resource-based pattern). ```cli stripe subscriptions update {{SUBSCRIPTION_ID}} \ -d "pause_collection[behavior]"=mark_uncollectible ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (resource-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2' subscription = Stripe::Subscription.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'mark_uncollectible'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in ruby (service-based pattern). ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.v1.subscriptions.update( '{{SUBSCRIPTION_ID}}', {pause_collection: {behavior: 'mark_uncollectible'}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (resource-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" subscription = stripe.Subscription.modify( "{{SUBSCRIPTION_ID}}", pause_collection={"behavior": "mark_uncollectible"}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in python (service-based pattern). ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2") subscription = client.subscriptions.update( "{{SUBSCRIPTION_ID}}", {"pause_collection": {"behavior": "mark_uncollectible"}}, ) ``` Code snippet calling post /v1/subscriptions/{subscription} in php (resource-based pattern). ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); $subscription = $stripe->subscriptions->update( '{{SUBSCRIPTION_ID}}', ['pause_collection' => ['behavior' => 'mark_uncollectible']] ); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (resource-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; Subscription resource = Subscription.retrieve("{{SUBSCRIPTION_ID}}"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.MARK_UNCOLLECTIBLE) .build() ) .build(); Subscription subscription = resource.update(params); ``` Code snippet calling post /v1/subscriptions/{subscription} in java (service-based pattern). ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); SubscriptionUpdateParams params = SubscriptionUpdateParams.builder() .setPauseCollection( SubscriptionUpdateParams.PauseCollection.builder() .setBehavior(SubscriptionUpdateParams.PauseCollection.Behavior.MARK_UNCOLLECTIBLE) .build() ) .build(); Subscription subscription = client.subscriptions().update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in node (resource-based pattern). ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); const subscription = await stripe.subscriptions.update( '{{SUBSCRIPTION_ID}}', { pause_collection: { behavior: 'mark_uncollectible', }, } ); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (resource-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys stripe.Key = "sk_test_BQokikJOvBiI2HlWgH4olfQ2" params := &stripe.SubscriptionParams{ PauseCollection: &stripe.SubscriptionPauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorMarkUncollectible), }, }; result, err := subscription.Update("{{SUBSCRIPTION_ID}}", params); ``` Code snippet calling post /v1/subscriptions/{subscription} in go (service-based pattern). ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); params := &stripe.SubscriptionUpdateParams{ PauseCollection: &stripe.SubscriptionUpdatePauseCollectionParams{ Behavior: stripe.String(stripe.SubscriptionPauseCollectionBehaviorMarkUncollectible), }, SubscriptionExposedID: stripe.String("{{SUBSCRIPTION_ID}}"), }; result, err := sc.V1Subscriptions.Update(context.TODO(), params); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (resource-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeConfiguration.ApiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2"; var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "mark_uncollectible", }, }; var service = new SubscriptionService(); Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` Code snippet calling post /v1/subscriptions/{subscription} in dotnet (service-based pattern). ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new SubscriptionUpdateOptions { PauseCollection = new SubscriptionPauseCollectionOptions { Behavior = "mark_uncollectible", }, }; var client = new StripeClient("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); var service = client.V1.Subscriptions; Subscription subscription = service.Update("{{SUBSCRIPTION_ID}}", options); ``` If you set `pause_collection[behavior]` to `mark_uncollectible`, we’ll stop active payment collection on new invoices the subscription creates before the `resumes_at` date. Stripe won’t send any upcoming invoice emails or webhooks for these invoices. Despite this pause, Stripe applies any existing customer balance to invoices. This behavior helps use available funds before we mark an invoice as `uncollectible`. If the invoice’s `total` is paid off entirely using customer balance, then the invoice’s status is set to `paid`. Otherwise, the invoice’s status is set to `uncollectible`. If you don’t set a `resumes_at` date, the payment collection on the subscription remains paused until you unset `pause_collection`. ## Manually unpausing To resume collecting payments at any time, you can update the subscription and unset `pause_collection`: Resuming collection this way only affects future invoices. ## Pausing and subscription schedules If you pause a subscription on a [subscription schedule](https://stripe.com/billing/subscriptions/subscription-schedules), the scheduled updates still take effect. However, payment is not collected while the subscription is paused. When you want to collect payment again, you need to [manually unpause](#unpausing) the subscription. You also need to update `auto_advance` to `true` on any invoices with `status=draft` that you want to collect payment on.