@dodopayments/nextjs 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import { type WebhookHandlerConfig } from "@dodopayments/core/webhook";
2
+ import { NextRequest, NextResponse } from "next/server";
3
+ export declare const Webhooks: ({ webhookKey, ...eventHandlers }: WebhookHandlerConfig) => (req: NextRequest) => Promise<NextResponse<unknown>>;
4
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/webhooks/webhooks.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIxD,eAAO,MAAM,QAAQ,GAAI,kCAGtB,oBAAoB,MAGP,KAAK,WAAW,mCAkD/B,CAAC"}
package/llm-prompt.txt CHANGED
@@ -92,7 +92,7 @@ Here's how you should structure your response:
92
92
  import { Webhooks } from '@dodopayments/nextjs'
93
93
 
94
94
  export const POST = Webhooks({
95
- webhookKey: process.env.DODO_WEBHOOK_SECRET!,
95
+ webhookKey: process.env.DODO_PAYMENTS_WEBHOOK_SECRET!,
96
96
  onPayload: async (payload) => {
97
97
  // handle the payload
98
98
  },
@@ -141,18 +141,18 @@ Here's how you should structure your response:
141
141
 
142
142
  * `DODO_PAYMENTS_API_KEY`: Your Dodo Payments API Key (required for Checkout and Customer Portal).
143
143
  * `RETURN_URL`: (Optional) The URL to redirect to after a successful checkout (for Checkout handler).
144
- * `DODO_WEBHOOK_SECRET`: Your Dodo Payments Webhook Secret (required for Webhook handler).
144
+ * `DODO_PAYMENTS_WEBHOOK_SECRET`: Your Dodo Payments Webhook Secret (required for Webhook handler).
145
145
 
146
146
  **Example `.env` file:**
147
147
  ```env
148
148
  DODO_PAYMENTS_API_KEY=your-api-key
149
- DODO_WEBHOOK_SECRET=your-webhook-secret
149
+ DODO_PAYMENTS_WEBHOOK_SECRET=your-webhook-secret
150
150
  ```
151
151
 
152
152
  **Usage in your code:**
153
153
  ```typescript
154
154
  bearerToken: process.env.DODO_PAYMENTS_API_KEY!
155
- webhookKey: process.env.DODO_WEBHOOK_SECRET!
155
+ webhookKey: process.env.DODO_PAYMENTS_WEBHOOK_SECRET!
156
156
  ```
157
157
 
158
158
  **Important:** Never commit sensitive environment variables directly into your version control. Use environment variables for all sensitive information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodopayments/nextjs",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,6 @@
23
23
  },
24
24
  "keywords": [
25
25
  "payments",
26
- "dodo",
27
26
  "nextjs",
28
27
  "webhooks",
29
28
  "checkout",