@moneydevkit/nextjs 0.7.0-beta.8 → 0.7.0-beta.9

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 +14 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -189,6 +189,20 @@ function ProductPage() {
189
189
  - **`type: 'AMOUNT'`** - For donations, tips, or custom amounts. Requires `amount` field.
190
190
  - **`type: 'PRODUCTS'`** - For selling products. Requires `products` array with product IDs. Amount is calculated from product prices.
191
191
 
192
+ ### Pay What You Want (CUSTOM prices)
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:
194
+
195
+ ```jsx
196
+ // Create a checkout for a product with CUSTOM pricing
197
+ const result = await createCheckout({
198
+ type: 'PRODUCTS',
199
+ products: [customPriceProductId], // Product configured with CUSTOM price in dashboard
200
+ successUrl: '/checkout/success',
201
+ })
202
+ ```
203
+
204
+ The customer enters their desired amount during checkout. For USD, amounts are in dollars (converted to cents internally). For SAT, amounts are in satoshis.
205
+
192
206
  ## Verify successful payments
193
207
  When a checkout completes, use `useCheckoutSuccess()` on the success page
194
208
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneydevkit/nextjs",
3
- "version": "0.7.0-beta.8",
3
+ "version": "0.7.0-beta.9",
4
4
  "title": "@moneydevkit/nextjs",
5
5
  "description": "moneydevkit checkout components for Next.js.",
6
6
  "repository": {
@@ -55,8 +55,8 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@hookform/resolvers": "^5.0.1",
58
- "@moneydevkit/api-contract": "^0.1.16",
59
- "@moneydevkit/core": "0.7.0-beta.8",
58
+ "@moneydevkit/api-contract": "^0.1.17",
59
+ "@moneydevkit/core": "0.7.0-beta.9",
60
60
  "@moneydevkit/lightning-js": "^0.1.60",
61
61
  "@orpc/client": "1.3.0",
62
62
  "@orpc/contract": "1.3.0",