@moneydevkit/replit 0.7.0-beta.9 → 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.
- package/README.md +3 -3
- 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
|
-
|
|
158
|
+
product: productId,
|
|
159
159
|
successUrl: '/checkout/success',
|
|
160
160
|
})
|
|
161
161
|
|
|
@@ -177,7 +177,7 @@ 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 `
|
|
180
|
+
- **`type: 'PRODUCTS'`** - For selling products. Requires `product` field with a product ID. Amount is calculated from product price.
|
|
181
181
|
|
|
182
182
|
### Pay What You Want (CUSTOM prices)
|
|
183
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:
|
|
@@ -186,7 +186,7 @@ Products can have CUSTOM prices that let customers choose their own amount. When
|
|
|
186
186
|
// Create a checkout for a product with CUSTOM pricing
|
|
187
187
|
const result = await createCheckout({
|
|
188
188
|
type: 'PRODUCTS',
|
|
189
|
-
|
|
189
|
+
product: customPriceProductId, // Product configured with CUSTOM price in dashboard
|
|
190
190
|
successUrl: '/checkout/success',
|
|
191
191
|
})
|
|
192
192
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneydevkit/replit",
|
|
3
|
-
"version": "0.7.0
|
|
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
|
|
43
|
+
"@moneydevkit/core": "0.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/express": "^4.17.21",
|