priceos 1.0.26 → 1.0.30

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.
package/README.md CHANGED
@@ -72,9 +72,9 @@ App Router:
72
72
  import { priceosHandler } from "priceos/next";
73
73
 
74
74
  export const { GET, POST } = priceosHandler({
75
- getCustomerId: async (request: Request) => {
76
- // resolve your current user/customer ID
77
- return "customer_123";
75
+ identifyCustomer: async (request: Request) => {
76
+ // resolve your current user/customer identity
77
+ return { customerId: "customer_123" };
78
78
  },
79
79
  });
80
80
  ```
@@ -86,8 +86,8 @@ Pages Router:
86
86
  import { priceosPagesHandler, type PriceOSPagesRequest } from "priceos/next";
87
87
 
88
88
  export default priceosPagesHandler({
89
- getCustomerId: async (_req: PriceOSPagesRequest) => {
90
- return "customer_123";
89
+ identifyCustomer: async (_req: PriceOSPagesRequest) => {
90
+ return { customerId: "customer_123" };
91
91
  },
92
92
  });
93
93
  ```
@@ -147,7 +147,7 @@ import { useCheckout } from "priceos/react";
147
147
 
148
148
  const { openCheckout } = useCheckout();
149
149
  await openCheckout({
150
- stripeProductKey: "starter_monthly",
150
+ productKey: "starter_monthly",
151
151
  successUrl: "https://app.acme.com/settings/billing?checkout=success",
152
152
  cancelUrl: "https://app.acme.com/settings/billing?checkout=canceled",
153
153
  });
@@ -167,7 +167,7 @@ await openCustomerPortal();
167
167
  `PriceOS` client groups:
168
168
  - `customers`: `get`, `link`, `create`, `update`, `delete`
169
169
  - `features`: `getAccess(customerId, featureKey?)`
170
- - `products`: `list()`
170
+ - `products`: `list()`, `get(productKey)`
171
171
  - `usage`: `track`, `set`, `getEvent`, `updateEvent`, `deleteEvent`, `deleteEvents`, `trackBatch`, `listEvents`
172
172
  - `bonuses`: `create`, `list`, `update`, `delete`
173
173