93 lines
2.4 KiB
TypeScript
93 lines
2.4 KiB
TypeScript
/**
|
|||
|
|
* One-time AI credit top-ups — must stay in sync with
|
||
|
|
* apps/api/internal/billing/credit_packs.go DefaultCreditPacks.
|
||
|
|
* Stripe: one-time Products/Prices via admin Sync or `go run ./cmd/sync-stripe-packs`.
|
||
|
|
*/
|
||
|
|
export type MarketingCreditPack = {
|
||
|
|
id: "tiny" | "small" | "medium" | "large" | "xl" | "xxl" | "mega";
|
||
|
|
name: string;
|
||
|
|
nameKey: string;
|
||
|
|
description: string;
|
||
|
|
descriptionKey: string;
|
||
|
|
credits: number;
|
||
|
|
priceUSD: number;
|
||
|
|
aiProducts: number;
|
||
|
|
};
|
||
|
|
|
||
|
|
export const CREDIT_PACKS: MarketingCreditPack[] = [
|
||
|
|
{
|
||
|
|
id: "tiny",
|
||
|
|
name: "Nano pack",
|
||
|
|
nameKey: "pricing.pack.tiny.name",
|
||
|
|
description: "Smoke tests / tiny fixes (25 credits ≈ 12 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.tiny.desc",
|
||
|
|
credits: 25,
|
||
|
|
priceUSD: 29,
|
||
|
|
aiProducts: 12
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "small",
|
||
|
|
name: "Starter pack",
|
||
|
|
nameKey: "pricing.pack.small.name",
|
||
|
|
description: "Small top-up (65 credits ≈ 32 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.small.desc",
|
||
|
|
credits: 65,
|
||
|
|
priceUSD: 59,
|
||
|
|
aiProducts: 32
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "medium",
|
||
|
|
name: "Plus pack",
|
||
|
|
nameKey: "pricing.pack.medium.name",
|
||
|
|
description: "Burst top-up (200 credits ≈ 100 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.medium.desc",
|
||
|
|
credits: 200,
|
||
|
|
priceUSD: 149,
|
||
|
|
aiProducts: 100
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "large",
|
||
|
|
name: "Growth pack",
|
||
|
|
nameKey: "pricing.pack.large.name",
|
||
|
|
description: "Mid buffer (500 credits ≈ 250 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.large.desc",
|
||
|
|
credits: 500,
|
||
|
|
priceUSD: 299,
|
||
|
|
aiProducts: 250
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "xl",
|
||
|
|
name: "Catalog pack",
|
||
|
|
nameKey: "pricing.pack.xl.name",
|
||
|
|
description: "Catalog / re-run buffer (1,200 credits ≈ 600 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.xl.desc",
|
||
|
|
credits: 1200,
|
||
|
|
priceUSD: 599,
|
||
|
|
aiProducts: 600
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "xxl",
|
||
|
|
name: "Business pack",
|
||
|
|
nameKey: "pricing.pack.xxl.name",
|
||
|
|
description: "Large multi-language buffer (3,000 credits ≈ 1,500 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.xxl.desc",
|
||
|
|
credits: 3000,
|
||
|
|
priceUSD: 1299,
|
||
|
|
aiProducts: 1500
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: "mega",
|
||
|
|
name: "Scale pack",
|
||
|
|
nameKey: "pricing.pack.mega.name",
|
||
|
|
description: "Distributor / agency burst (8,000 credits ≈ 4,000 AI products)",
|
||
|
|
descriptionKey: "pricing.pack.mega.desc",
|
||
|
|
credits: 8000,
|
||
|
|
priceUSD: 2999,
|
||
|
|
aiProducts: 4000
|
||
|
|
}
|
||
|
|
];
|
||
|
|
|
||
|
|
/** platformsettings key for a pack Price ID */
|
||
|
|
export function creditPackSettingsKey(packId: string): string {
|
||
|
|
return `stripe.price.pack.${packId.trim().toLowerCase()}`;
|
||
|
|
}
|