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.

update endpoints

Steven Tey5fc71a2cfaf8
diff --git a/apps/web/app/api/campaigns/callback/stripe/route.ts b/apps/web/app/api/stripe/connect/callback/route.ts
similarity index 100%
rename from apps/web/app/api/campaigns/callback/stripe/route.ts
rename to apps/web/app/api/stripe/connect/callback/route.ts
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/checkout-session-completed.ts b/apps/web/app/api/stripe/connect/webhook/checkout-session-completed.ts
similarity index 100%
rename from apps/web/app/api/campaigns/webhooks/stripe/checkout-session-completed.ts
rename to apps/web/app/api/stripe/connect/webhook/checkout-session-completed.ts
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/customer-created.ts b/apps/web/app/api/stripe/connect/webhook/customer-created.ts
similarity index 100%
rename from apps/web/app/api/campaigns/webhooks/stripe/customer-created.ts
rename to apps/web/app/api/stripe/connect/webhook/customer-created.ts
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/invoice-paid.ts b/apps/web/app/api/stripe/connect/webhook/invoice-paid.ts
similarity index 100%
rename from apps/web/app/api/campaigns/webhooks/stripe/invoice-paid.ts
rename to apps/web/app/api/stripe/connect/webhook/invoice-paid.ts
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/route.ts b/apps/web/app/api/stripe/connect/webhook/route.ts
similarity index 100%
rename from apps/web/app/api/campaigns/webhooks/stripe/route.ts
rename to apps/web/app/api/stripe/connect/webhook/route.ts
diff --git a/apps/web/app/api/stripe/webhook/route.ts b/apps/web/app/api/stripe/webhook/route.ts
new file mode 100644
index 0000000000..38e4153c39
--- /dev/null
+++ b/apps/web/app/api/stripe/webhook/route.ts
@@ -0,0 +1 @@
+export * from "../../callback/stripe/route";
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/connect-stripe/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/connect-stripe/route.ts
index b893d88286..bcc5aece62 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/connect-stripe/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/connect-stripe/route.ts
@@ -32,7 +32,7 @@ export const POST = withWorkspace(async ({ workspace }) => {
url.searchParams.set("client_id", STRIPE_APP_CLIENT_ID);
url.searchParams.set(
"redirect_uri",
- `${APP_DOMAIN_WITH_NGROK}/api/campaigns/callback/stripe`,
+ `${APP_DOMAIN_WITH_NGROK}/api/stripe/connect/callback`,
);
url.searchParams.set("state", state);
diff --git a/packages/stripe-app/stripe-app.json b/packages/stripe-app/stripe-app.json
index e6f7d4f7a6..a500616e32 100644
--- a/packages/stripe-app/stripe-app.json
+++ b/packages/stripe-app/stripe-app.json
@@ -1,6 +1,6 @@
{
"id": "com.example.dub",
- "version": "0.0.21",
+ "version": "0.0.23",
"name": "Dub",
"icon": "",
"permissions": [
@@ -45,8 +45,8 @@
}
},
"allowed_redirect_uris": [
- "https://6dc0-103-70-36-143.ngrok-free.app/api/campaigns/callback/stripe",
- "https://rich-easily-kingfish.ngrok-free.app/api/campaigns/callback/stripe"
+ "https://6dc0-103-70-36-143.ngrok-free.app/api/stripe/connect/callback",
+ "https://rich-easily-kingfish.ngrok-free.app/api/stripe/connect/callback"
],
"stripe_api_access_type": "oauth",
"distribution_type": "public"