1. Invoices
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. Invoices

Finalize

$kit->invoices->finalize()#

Finalizes a draft invoice, locking its line items and making it payable. Most invoices Stripe generates for subscriptions are finalized automatically; this method is for invoices you created manually and left as a draft, or for adjusting a draft invoice's auto-advance behavior before finalizing.

Signature#

Parameters#

FieldTypeDescription
invoiceIdstringThe draft invoice to finalize.
autoAdvanceboolDefaults to true. If true, Stripe automatically attempts to collect payment after finalizing, following the customer's normal collection method. If false, the invoice becomes open but nothing is charged automatically.

Example request#

Example response#

Same shape as retrieve(), with status set to 'open'.

Errors#

ExceptionWhen
StripeOperationErrorThe invoice is not in draft status, or does not exist.

Notes#

If a storage adapter is configured, the result is persisted via saveInvoice().
Previous
Void
Next
Sync
Built with