fix events endpoint path in docs

This commit is contained in:
Shawn Erquhart
2025-06-02 12:45:19 -04:00
parent f85f0910bd
commit 446d9e3973
2 changed files with 4 additions and 4 deletions

View File

@@ -129,8 +129,8 @@ You can also provide callbacks for webhook events:
```ts
polar.registerRoutes(http, {
// Optional custom path, default is "/events/polar"
path: "/events/polar",
// Optional custom path, default is "/polar/events"
path: "/polar/events",
// Optional callbacks for webhook events
onSubscriptionUpdated: async (ctx, event) => {
// Handle subscription updates, like cancellations.

View File

@@ -4,8 +4,8 @@ import { polar } from "./example";
const http = httpRouter();
polar.registerRoutes(http, {
// Optional custom path, default is "/events/polar"
path: "/events/polar",
// Optional custom path, default is "/polar/events"
path: "/polar/events",
// Optional callback for when a subscription is updated
onSubscriptionUpdated: async (ctx, event) => {
console.log("Subscription updated", event);