Invoice
class Invoice extends Resource implements InvoiceInterface
Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription.
Traits
Properties
| string | $id | A unique identifier for the resource. | from Resource | 
| protected mixed | $response | A response from Stripe. | from Resource | 
Methods
This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.
When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
No description
Details
        in Resource at         line 29
                            string
    getId()
        
    
    Returns the unique identifier for this resource.
        in Resource at         line 39
                            mixed
    getResponse()
        
    
    Returns the raw Stripe response.
        in Resource at         line 47
                    protected        void
    setProperties()
        
    
    Set the response data as properties on the class.
        in ListAll at         line 21
                            ListAll
    listAll(array $arguments = [])
        
    
    List all the resources.
This will list all of the resources from which this trait belongs to. It will then return itself, so you can method chain it, or reuse the same instantiation.
        in Delete at         line 21
                            Delete
    delete(string $id)
        
    
    Delete a resource.
Delete a resource associated with the class this trait is being used. You must pass in the ID of the resource that you wish to delete. Then it will return the same instance of the class from which it was called.
        at         line 38
                            InvoiceInterface
    create(CustomerInterface $customer, SubscriptionBillingTypeInterface $type, array $arguments = [], string|null $key = null)
        
    
    This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations.
        at         line 58
                            InvoiceInterface
    finalizeInvoice(string $invoiceid)
        
    
    Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
        at         line 79
                            InvoiceInterface
    pay(string $invoiceid)
        
    
    Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
        at         line 101
                            InvoiceInterface
    sendInvoice(string $invoiceid)
        
    
    Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
        at         line 121
                            InvoiceInterface
    voidInvoice(string $invoiceid)
        
    
    Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
        at         line 140
                            InvoiceInterface
    markUncollectible(string $invoiceid)
        
    
    Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
        at         line 162
                            InvoiceInterface
    retrieveLineItems(string $invoiceid, array $arguments = [])
        
    
    When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        at         line 184
                            InvoiceInterface
    upcoming(CustomerInterface $customer, array $arguments = [])
        
    
    At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer.
        at         line 204
                            InvoiceInterface
    retrieveUpcomingLineItems(CustomerInterface $customer, array $arguments = [])
        
    
    When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.