diff --git a/cloud/app/src/routes/stripe/webhook.ts b/cloud/app/src/routes/stripe/webhook.ts index 592f4568..b69d54df 100644 --- a/cloud/app/src/routes/stripe/webhook.ts +++ b/cloud/app/src/routes/stripe/webhook.ts @@ -24,7 +24,6 @@ export async function POST(input: APIEvent) { if (!workspaceID) throw new Error("Workspace ID not found") if (!customerID) throw new Error("Customer ID not found") if (!amount) throw new Error("Amount not found") - if (amount !== 2118) throw new Error("Amount mismatch") if (!paymentID) throw new Error("Payment ID not found") const chargedAmount = 2000 diff --git a/cloud/core/src/billing.ts b/cloud/core/src/billing.ts index 6f241ba0..1677d159 100644 --- a/cloud/core/src/billing.ts +++ b/cloud/core/src/billing.ts @@ -4,8 +4,6 @@ import { BillingTable, PaymentTable, UsageTable } from "./schema/billing.sql" import { Actor } from "./actor" import { fn } from "./util/fn" import { z } from "zod" -import { Identifier } from "./identifier" -import { centsToMicroCents } from "./util/price" import { User } from "./user" import { Resource } from "@opencode/cloud-resource" @@ -72,7 +70,7 @@ export namespace Billing { product_data: { name: "opencode credits", }, - unit_amount: 2118, // $20 minimum + Stripe fee 4.4% + $0.30 + unit_amount: 2123, // $20 minimum + Stripe fee 4.4% + $0.30 }, quantity: 1, },