@moneydevkit/nextjs 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
|
@@ -165,7 +165,7 @@ function ProductPage() {
|
|
|
165
165
|
const handleBuyProduct = async (productId) => {
|
|
166
166
|
const result = await createCheckout({
|
|
167
167
|
type: 'PRODUCTS',
|
|
168
|
-
|
|
168
|
+
product: productId,
|
|
169
169
|
successUrl: '/checkout/success',
|
|
170
170
|
})
|
|
171
171
|
|
|
@@ -187,7 +187,7 @@ function ProductPage() {
|
|
|
187
187
|
|
|
188
188
|
### Checkout Types
|
|
189
189
|
- **`type: 'AMOUNT'`** - For donations, tips, or custom amounts. Requires `amount` field.
|
|
190
|
-
- **`type: 'PRODUCTS'`** - For selling products. Requires `
|
|
190
|
+
- **`type: 'PRODUCTS'`** - For selling products. Requires `product` field with a product ID. Amount is calculated from product price.
|
|
191
191
|
|
|
192
192
|
### Pay What You Want (CUSTOM prices)
|
|
193
193
|
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:
|
|
@@ -196,7 +196,7 @@ Products can have CUSTOM prices that let customers choose their own amount. When
|
|
|
196
196
|
// Create a checkout for a product with CUSTOM pricing
|
|
197
197
|
const result = await createCheckout({
|
|
198
198
|
type: 'PRODUCTS',
|
|
199
|
-
|
|
199
|
+
product: customPriceProductId, // Product configured with CUSTOM price in dashboard
|
|
200
200
|
successUrl: '/checkout/success',
|
|
201
201
|
})
|
|
202
202
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneydevkit/nextjs",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"title": "@moneydevkit/nextjs",
|
|
5
5
|
"description": "moneydevkit checkout components for Next.js.",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@hookform/resolvers": "^5.0.1",
|
|
58
58
|
"@moneydevkit/api-contract": "^0.1.17",
|
|
59
|
-
"@moneydevkit/core": "0.7.0
|
|
59
|
+
"@moneydevkit/core": "0.7.0",
|
|
60
60
|
"@moneydevkit/lightning-js": "^0.1.60",
|
|
61
61
|
"@orpc/client": "1.3.0",
|
|
62
62
|
"@orpc/contract": "1.3.0",
|