Files
cfw-autumn/shared/api/others/apiInvoice/apiInvoiceV1.ts
2025-11-19 19:51:34 +00:00

35 lines
984 B
TypeScript

import { z } from "zod/v4";
export const ApiInvoiceV1Schema = z.object({
plan_ids: z.array(z.string()).meta({
description: "Array of plan IDs included in this invoice",
example: ["pro_plan", "addon_feature"],
}),
stripe_id: z.string().meta({
description: "The Stripe invoice ID",
example: "in_1A2B3C4D5E6F7G8H",
}),
status: z.string().meta({
description: "The status of the invoice",
example: "paid",
}),
total: z.number().meta({
description: "The total amount of the invoice",
example: 2999,
}),
currency: z.string().meta({
description: "The currency code for the invoice",
example: "usd",
}),
created_at: z.number().meta({
description: "Timestamp when the invoice was created",
example: 1759247877000,
}),
hosted_invoice_url: z.string().nullish().meta({
description: "URL to the Stripe-hosted invoice page",
example: "https://invoice.stripe.com/i/acct_123/test_456",
}),
});
export type ApiInvoiceV1 = z.infer<typeof ApiInvoiceV1Schema>;