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: string · 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.
- 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.
- 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.
- currencyType: stringrequired
ISO 4217 currency codes (alpha3) supported for payments
- amountType: integer · amountWithCurrencyPrecisionFormat: int64
_due requiredTotal amount due on the invoice, in the smallest currency unit.
- amountType: integer · amountWithCurrencyPrecisionFormat: int64
_paid requiredAmount successfully collected for the invoice, in the smallest currency unit.
- amountType: integer · amountWithCurrencyPrecisionFormat: int64
_remaining requiredAmount still outstanding on the invoice, in the smallest currency unit.
- periodType: objectrequired
Billing period covered by an invoice or invoice line.
- endType: stringFormat: date-timerequired
End of the billing period covered by the invoice.
- startType: stringFormat: date-timerequired
Start of the billing period covered by the invoice.
- parentType: objectrequired
Resource that caused the invoice to be created.
- typeType: stringenumrequired
Resource type that caused the invoice to be created.
values- subscription
_details Invoice was created from a subscription.
- quote
_details Invoice was created from a quote.
- manual
_details Invoice was created directly.
- subscriptionType: object · InvoiceSubscriptionParentDetails nullable
_details Subscription context for an invoice created by subscription billing.
- linesType: objectrequired
Invoice line items included with the invoice. Additional lines can be fetched from
urlwhenhas_moreis true.- dataType: array object[] · InvoiceLine[]required
Line items on the current page.
Individual line item that contributes to the invoice total.
- hasType: boolean
_more requiredWhether more line items are available after the items returned in
data. - objectenumconst:listrequired
String representing the collection type.
values- list
- urlType: stringrequired
API URL that can be used to list the full invoice line collection.
- paymentsType: objectrequired
Payment attempts associated with the invoice.
- dataType: array object[] · InvoicePayment[]required
Payment attempts on the current page.
A single attempt to collect payment for an invoice.
- hasType: boolean
_more requiredWhether more payment attempts are available after the items returned in
data. - objectenumconst:listrequired
String representing the collection type.
values- list
- urlType: stringrequired
API URL that can be used to list the full invoice payment collection.
- statusType: object
_transitions requiredTimestamps for important invoice lifecycle transitions.
- finalizedType: stringFormat: date-time
_at requiredTime at which the invoice was finalized.
- markedType: string | nullFormat: date-time
_uncollectible _at Time at which the invoice was marked uncollectible.
- paidType: string | nullFormat: date-time
_at Time at which the invoice was paid.
- voidedType: string | nullFormat: date-time
_at Time at which the invoice was voided.
- lastType: object · InvoiceLastFinalizationError nullable
_finalization _error Error details from the last failed invoice finalization attempt.
- adviceType: string | null
_code Processor advice code that can help decide whether retrying is useful.
- codeType: string | null
Paypercut error code for the finalization failure.
- docType: string | null
_url Documentation URL for the error, when one is available.
- messageType: string | null
Human-readable explanation of the finalization failure.
- networkType: string | null
_advice _code Network-provided advice code returned with the failure, when available.
- networkType: string | null
_decline _code Network-provided decline code returned with the failure, when available.
- paramType: string | null
Request parameter associated with the error, when the failure maps to a specific field.
- paymentType: string | null
_method _type Payment method type involved in the failure.
- typeType: string | null
Error category.
- 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.- propertyType: string
Name
- objectenumconst:invoicerequired
String representing the object's type.
values- invoice

