Invoice
Invoice snapshot for invoice.paid and invoice.payment_failed events.
- Type: Invoice
An invoice represents the amount due for a billing period and the payment attempts used to collect it. Subscription invoice webhook events include this object in
data.object.- idType: stringmax length:100required
Unique identifier for the invoice.
- createdType: stringFormat: date-timerequired
Time at which the invoice was created.
- updatedType: stringFormat: date-timerequired
Time at which the invoice was last updated.
- customerrequired
Customer associated with the invoice. Pass
expand[]=customerto include the full Customer object.- Type: Customer IDmax length:100
Customer associated with the invoice. Pass
expand[]=customerto include the full Customer object.
- statusType: stringenumrequired
Current invoice status. Use the invoice event type and payment attempts to distinguish a failed collection attempt from the invoice lifecycle state.
values- draft
Invoice is being prepared and is not ready for collection.
- open
Invoice is finalized and payment is still due.
- paid
Invoice has been fully paid.
- void
Invoice was voided and will not be collected.
- uncollectible
Invoice was marked uncollectible after collection was abandoned.
- draft
- billingType: string | nullenum
_reason Reason the invoice was created. Use this to choose the right recovery or fulfillment flow for subscription invoices.
values- subscription
_create First invoice created when a subscription starts and payment is due immediately.
- subscription
_cycle Recurring invoice created for a subscription billing period.
- subscription
_update Invoice created because a subscription changed in a way that produced an amount due.
- manual
Invoice created directly rather than by subscription automation.
- subscription
- collectionType: stringenum
_method requiredHow Paypercut collects payment for the invoice.
values- charge
_automatically Paypercut attempts to collect the invoice using a saved payment method.
- send
_invoice Payment is expected through an invoice collection flow rather than an immediate automatic charge.
- charge
- currencyType: CurrencyCoderequired
ISO 4217 currency codes (alpha3) supported for payments
- amountType: amountWithCurrencyPrecisionFormat: int64
_due requiredTotal amount due on the invoice, in the smallest currency unit.
- amountType: amountWithCurrencyPrecisionFormat: int64
_paid requiredAmount successfully collected for the invoice, in the smallest currency unit.
- amountType: amountWithCurrencyPrecisionFormat: int64
_remaining requiredAmount still outstanding on the invoice, in the smallest currency unit.
- periodType: InvoiceBillingPeriodrequiredProperties: 2
Billing period covered by an invoice or invoice line.
- parentType: InvoiceParentrequiredProperties: 2
Resource that caused the invoice to be created.
- linesType: InvoiceLineCollectionrequiredProperties: 4
Invoice line items included with the invoice. Additional lines can be fetched from
urlwhenhas_moreis true. - paymentsType: InvoicePaymentCollectionrequiredProperties: 4
Payment attempts associated with the invoice.
- statusType: InvoiceStatusTransitions
_transitions requiredProperties: 4Timestamps for important invoice lifecycle transitions.
- lastType: InvoiceLastFinalizationErrornullable
_finalization _error Properties: 9Error details from the last failed invoice finalization attempt.
- livemodeType: booleanrequired
Has the value
trueif the invoice exists in live mode orfalseif it exists in test mode. - metadata
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.- propertyadditionalPropertyType: string
Name
- objectenumconst:invoicerequired
String representing the object's type.
- accountType: string
Account associated with the Invoice.

