Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Delete coupon.ts

Kiran K1a31aab38c2f
diff --git a/apps/web/scripts/stripe/coupon.ts b/apps/web/scripts/stripe/coupon.ts
deleted file mode 100644
index b0f88d73c2..0000000000
--- a/apps/web/scripts/stripe/coupon.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { stripeAppClient } from "@/lib/stripe";
-import "dotenv-flow/config";
-
-// Just for testing purposes
-async function main() {
- const stripeApp = stripeAppClient({
- livemode: false,
- });
-
- const stripeAccount = "acct_1RiZ6DDixECvUM5P";
-
- // // Create a coupon
- const coupon = await stripeApp.coupons.create(
- {
- name: "Coupon 1",
- percent_off: 30,
- duration: "repeating",
- duration_in_months: 12,
- },
- {
- stripeAccount,
- },
- );
-
- console.log(coupon);
-
- // // List all coupons
- const coupons = await stripeApp.coupons.list({
- stripeAccount,
- });
-
- console.log(coupons);
-
- // Create a promotion code
- const promotionCode = await stripeApp.promotionCodes.create(
- {
- coupon: "msvkvUlA",
- code: "WELCOME",
- metadata: {
- partnerId: "123",
- },
- },
- {
- stripeAccount,
- },
- );
-
- console.log(promotionCode);
-
- // List all promotion codes
- const promotionCodes = await stripeApp.promotionCodes.list({
- stripeAccount,
- });
-
- console.log(promotionCodes);
-}
-
-main();