Frank пре 5 месеци
родитељ
комит
c1d754bec9
2 измењених фајлова са 1 додато и 4 уклоњено
  1. 0 1
      cloud/app/src/routes/stripe/webhook.ts
  2. 1 3
      cloud/core/src/billing.ts

+ 0 - 1
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

+ 1 - 3
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,
           },