Create an invoice
Create an invoice
Authorizations
API Key authentication. Use "Bearer YOUR_API_KEY".
Body
Either charge_automatically, or send_invoice. Determines how the invoice will be collected.
charge_automatically, send_invoice The identifier of the application associated with this invoice.
Whether to apply any available customer balance to this invoice.
The identifier of the user the invoice is assigned to.
Controls whether the invoice is automatically finalized and progressed through its lifecycle.
The ID of the coupon to apply to this invoice.
Configuration for creating a credit grant when the invoice is paid.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
gbp, usd, eur, sek, null "gbp"
Custom fields to display on the invoice (maximum of 4).
4The ID of the customer who will be billed.
The number of days from when the invoice is created until it is due. Valid only for invoices where collection_method=send_invoice.
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice.
An arbitrary string attached to the object. Often useful for displaying to users.
The date on which payment for this invoice is due. Valid only for invoices where collection_method=send_invoice.
Revise an existing invoice. The new invoice will be created in status=draft.
The party that issues the invoice (the platform itself or an owner).
A list of up to 20 line items to include on this invoice.
20Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Configuration for the payment options available on the invoice.
The period this invoice covers.
Whether to send an email notification when the invoice is finalized.
Response
Create an invoice
Unique identifier for the object.
Time at which the object was created. Measured in seconds since the Unix epoch.
invoice The identifier of the application associated with this invoice.
The identifier of the user the invoice is assigned to.
The reason this invoice was created.
manual, subscription, late_payment_failure, partial_payment, null Either charge_automatically, or send_invoice. Determines how the invoice will be collected.
charge_automatically, send_invoice, null The credit grant associated with the invoice.
Configuration for creating a credit grant when the invoice is paid.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
Custom fields displayed on the invoice.
4The ID of the customer who will be billed.
The customer's address. Used to calculate taxes on the invoice.
The customer's email at the time the invoice was created.
The customer's name at the time the invoice was created.
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice.
An arbitrary string attached to the object. Often useful for displaying to users.
Describes the current discount applied to this invoice, if any.
The amount of the discount applied to the invoice.
The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
Ending customer balance after the invoice is finalized. If the invoice has not been finalized yet, this will be null.
The time when the invoice was finalized.
Footer displayed on the invoice.
Details of the invoice this invoice was derived from, if any.
The URL for the hosted invoice page, which allows customers to view and pay an invoice.
The party that issues the invoice (the platform itself or an owner).
The error encountered during the previous attempt to finalize the invoice.
The ID of the late payment failure invoice generated for this invoice.
The ID of the latest revision of this invoice.
The time the invoice was marked uncollectible.
The time at which payment will next be attempted.
A unique, identifying string that appears on emails sent to the customer for this invoice.
A reference assigned to the bank transfer for this invoice, used for reconciliation.
A reference used when the invoice has been paid off platform.
The optimized date at which collection should be attempted.
The reason the collection date was optimized.
bacs_debit, days_before_collection, null Whether payment was successfully collected for this invoice.
The time at which payment was collected for this invoice.
Whether the invoice was paid outside of the platform.
Configuration for the payment options available on the invoice.
The period this invoice covers.
The ID of the dispute that this invoice was created from, if any.
Starting customer balance before the invoice is finalized.
The status of the invoice.
draft, open, paid, uncollectible, void The ID of the subscription that the invoice was created for, if any.
The transaction object created when the invoice was paid, if any.
The error encountered during the last attempt to transfer funds for this invoice.
The time at which the invoice was voided.
The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.
Only returned if the object has been deleted.
Final amount due at this time for this invoice.
The amount, in cents, that was paid.
The difference between amount_due and amount_paid.
The amount of customer balance that has been applied to this invoice.
Whether to apply any available customer balance to this invoice.
Number of payment attempts made for this invoice.
Whether an attempt has been made to pay the invoice.
Controls whether the invoice is automatically finalized and progressed through its lifecycle.
Whether the invoice is in a late payment failure state.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
The total amount of part payments collected for this invoice.
Whether a part payment for this invoice is currently pending.
Whether a payment transaction for this invoice is currently pending.
Total amount of all post-payment credit notes issued for this invoice.
Total amount of all pre-payment credit notes issued for this invoice.
Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied.
The amount of tax on this invoice.
Total after discounts and taxes.
The integer amount in cents representing the total amount of the invoice including all discounts but excluding all tax.
Contains pretax credit amounts (ex: discount, credit grants, etc.) that apply to this invoice.
The aggregate amounts of taxes per tax rate for all line items on this invoice.
The transfers associated with this invoice.