go: first month discount

This commit is contained in:
Frank
2026-03-11 10:46:16 -04:00
parent 0b0ad5de99
commit 502d6db6d0
28 changed files with 68 additions and 19 deletions

View File

@@ -258,6 +258,7 @@ export namespace Billing {
mode: "subscription",
billing_address_collection: "required",
line_items: [{ price: LiteData.priceID(), quantity: 1 }],
discounts: [{ coupon: LiteData.firstMonth50Coupon() }],
...(billing.customerID
? {
customer: billing.customerID,

View File

@@ -10,5 +10,6 @@ export namespace LiteData {
export const productID = fn(z.void(), () => Resource.ZEN_LITE_PRICE.product)
export const priceID = fn(z.void(), () => Resource.ZEN_LITE_PRICE.price)
export const firstMonth50Coupon = fn(z.void(), () => Resource.ZEN_LITE_PRICE.firstMonth50Coupon)
export const planName = fn(z.void(), () => "lite")
}

View File

@@ -131,6 +131,7 @@ declare module "sst" {
"value": string
}
"ZEN_LITE_PRICE": {
"firstMonth50Coupon": string
"price": string
"product": string
"type": "sst.sst.Linkable"