1. Subscriptions
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Subscriptions

Toggle Collection Method

$kit->subscriptions->toggleCollectionMethod()#

Switches a subscription between automatically charging the customer's default payment method, and emailing them an invoice to pay manually.

Signature#

Parameters#

FieldTypeRequiredDescription
subscriptionIdstringYesThe subscription to update.
collectionMethod'charge_automatically'|'send_invoice'YesThe new collection method.
daysUntilDueintOnly with send_invoiceDefaults to 7 if omitted. Ignored (and unset) when switching to charge_automatically.

Example request#

Example response#

Same shape as retrieve(), with collectionMethod set to 'send_invoice'.

Errors#

ExceptionWhen
StripeOperationErrorThe subscription ID does not exist, or Stripe rejects the change, for example switching to charge_automatically when the customer has no default payment method.

Notes#

Switching a subscription to send_invoice means Stripe generates and emails an invoice each billing period instead of charging a card automatically; the customer needs to pay it manually, or you pay it on their behalf via $kit->invoices->payWithSavedMethod().
Previous
Resume
Next
Update Fields
Built with