mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
wip cloud
This commit is contained in:
parent
c67b721787
commit
c1d754bec9
2 changed files with 1 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue