mirror of
https://github.com/LukeHagar/polar.git
synced 2025-12-06 04:20:58 +00:00
fix events endpoint path in docs
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user