@dodopayments/convex 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +19 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,16 @@
1
- # `@dodopayments/convex`
1
+ # Dodo Payments Convex Component
2
2
 
3
- A TypeScript library that provides a Convex component for seamless integration of Dodo Payments into your Convex applications.
3
+ [![npm version](https://badge.fury.io/js/@dodopayments%2Fconvex.svg)](https://badge.fury.io/js/@dodopayments%2Fconvex.svg)
4
4
 
5
- > **AI Agent Integration Guide:** See the AI Agent Prompt section below for detailed instructions and guidance for AI assistants.
5
+ This component is the official way to integrate the Dodo Payments in your Convex project.
6
6
 
7
- ## Documentation
7
+ Features:
8
+
9
+ - Checkout Session: Integrate Dodo Payments Checkout with a couple of lines code.
10
+
11
+ - Customer Portal: Allow customers to manage subscriptions and details
12
+
13
+ - Webhooks: Handle webhooks efficiently. Just write your business logic and handle the events you want. Webhook verification is taken care by us
8
14
 
9
15
  Detailed documentation can be found at [Dodo Payments Convex Component](https://docs.dodopayments.com/developer-resources/convex-component)
10
16
 
@@ -16,6 +22,7 @@ npm install @dodopayments/convex
16
22
 
17
23
  ## Quick Start
18
24
 
25
+
19
26
  ### 1. Add Component to Convex Config
20
27
 
21
28
  ```typescript
@@ -30,8 +37,15 @@ export default app;
30
37
 
31
38
  ### 2. Set Up Environment Variables
32
39
 
40
+ Create a [Dodo Payments](https://dodopayments.com) account and get the API_KEY and WEBHOOK_SECRET
41
+
33
42
  Add your environment variables in the Convex dashboard (**Settings** → **Environment Variables**). You can open the dashboard by running:
34
43
 
44
+ ```env
45
+ DODO_PAYMENTS_API_KEY=your-dodo-payments-api-key
46
+ DODO_PAYMENTS_ENVIRONMENT=test_mode
47
+ DODO_PAYMENTS_WEBHOOK_SECRET=your-webhook-secret (if using webhooks)
48
+ ```
35
49
  ```sh
36
50
  npx convex dashboard
37
51
  ```
@@ -80,6 +94,7 @@ export const dodo = new DodoPayments(components.dodopayments, {
80
94
  environment: process.env.DODO_PAYMENTS_ENVIRONMENT as "test_mode" | "live_mode",
81
95
  });
82
96
 
97
+ export const { checkout, customerPortal } = dodo.api();
83
98
  // Export the API methods for use in your app
84
99
  export const { checkout, customerPortal } = dodo.api();
85
100
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodopayments/convex",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },