@moneydevkit/replit 0.7.0-beta.8 → 0.7.0

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 +16 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -155,7 +155,7 @@ function ProductPage() {
155
155
  const handleBuyProduct = async (productId: string) => {
156
156
  const result = await createCheckout({
157
157
  type: 'PRODUCTS',
158
- products: [productId],
158
+ product: productId,
159
159
  successUrl: '/checkout/success',
160
160
  })
161
161
 
@@ -177,7 +177,21 @@ function ProductPage() {
177
177
 
178
178
  ### Checkout Types
179
179
  - **`type: 'AMOUNT'`** - For donations, tips, or custom amounts. Requires `amount` field.
180
- - **`type: 'PRODUCTS'`** - For selling products. Requires `products` array with product IDs. Amount is calculated from product prices.
180
+ - **`type: 'PRODUCTS'`** - For selling products. Requires `product` field with a product ID. Amount is calculated from product price.
181
+
182
+ ### Pay What You Want (CUSTOM prices)
183
+ Products can have CUSTOM prices that let customers choose their own amount. When a checkout includes a product with a CUSTOM price, the checkout UI automatically shows an amount input field:
184
+
185
+ ```tsx
186
+ // Create a checkout for a product with CUSTOM pricing
187
+ const result = await createCheckout({
188
+ type: 'PRODUCTS',
189
+ product: customPriceProductId, // Product configured with CUSTOM price in dashboard
190
+ successUrl: '/checkout/success',
191
+ })
192
+ ```
193
+
194
+ The customer enters their desired amount during checkout. For USD, amounts are in dollars (converted to cents internally). For SAT, amounts are in satoshis.
181
195
 
182
196
  ## Verify successful payments
183
197
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneydevkit/replit",
3
- "version": "0.7.0-beta.8",
3
+ "version": "0.7.0",
4
4
  "description": "Money Dev Kit checkout package for Replit (Vite + Express).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,7 @@
40
40
  "react-dom": "^18 || ^19"
41
41
  },
42
42
  "dependencies": {
43
- "@moneydevkit/core": "0.7.0-beta.8"
43
+ "@moneydevkit/core": "0.7.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/express": "^4.17.21",