CreateInvoiceRequest

data class CreateInvoiceRequest(val collectionMethod: InvoiceCollectionMethod, val netTerms: Int?, val lineItems: List<LineItem>?, val customer: String? = null, val account: String? = null, val dueDate: String? = null, val number: String?, val description: String?, val memo: String?, val metadata: Map<String, String>?)

Request body for creating a new invoice.

Constructors

Link copied to clipboard
constructor(collectionMethod: InvoiceCollectionMethod, netTerms: Int?, lineItems: List<LineItem>?, customer: String? = null, account: String? = null, dueDate: String? = null, number: String?, description: String?, memo: String?, metadata: Map<String, String>?)

Properties

Link copied to clipboard
val account: String? = null

The ID of the connected account to create the invoice on behalf of.

Link copied to clipboard
@SerializedName(value = "collection_method")
val collectionMethod: InvoiceCollectionMethod

How payment will be collected for this invoice. Required.

Link copied to clipboard
val customer: String? = null

The ID of the customer to invoice. Pass null to associate later.

Link copied to clipboard

A customer-facing description of the invoice.

Link copied to clipboard
@SerializedName(value = "due_date")
val dueDate: String? = null

An explicit due date for the invoice (ISO 8601 date string). Overrides netTerms when provided.

Link copied to clipboard
@SerializedName(value = "line_items")
val lineItems: List<LineItem>?

The products and quantities to include on the invoice.

Link copied to clipboard
val memo: String?

An internal memo visible only to the merchant.

Link copied to clipboard

Arbitrary key-value pairs the merchant can attach for their own reference.

Link copied to clipboard
@SerializedName(value = "net_terms")
val netTerms: Int?

The number of days from issuance until the invoice is due.

Link copied to clipboard

A merchant-assigned number for the invoice.