Skip to content

MeteredInvoiceCollectionResult

Public authoritative collection state for one immutable metered invoice.

const MeteredInvoiceCollectionResult: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
status: Schema.Literal<"payment_due">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
}>, Schema.Struct<{
status: Schema.Literal<"checkout_created">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
checkoutId: Schema.brand<Schema.String, "CheckoutId">;
}>, Schema.Struct<{
status: Schema.Literal<"paid">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
checkoutId: Schema.brand<Schema.String, "CheckoutId">;
paymentId: Schema.brand<Schema.String, "PaymentId">;
collectedAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
}>, Schema.Struct<{
status: Schema.Literal<"refunded">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
checkoutId: Schema.brand<Schema.String, "CheckoutId">;
paymentId: Schema.brand<Schema.String, "PaymentId">;
refundedAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
}>, Schema.Struct<{
status: Schema.Literal<"failed">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
checkoutId: Schema.brand<Schema.String, "CheckoutId">;
}>, Schema.Struct<{
status: Schema.Literal<"expired">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
checkoutId: Schema.brand<Schema.String, "CheckoutId">;
}>, Schema.Struct<{
status: Schema.Literal<"no_payment_due">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
}>, Schema.Struct<{
status: Schema.Literal<"credit_due">;
invoiceId: Schema.brand<Schema.String, "InvoiceId">;
}>]>;