@waffo/pancake-ts 0.18.0 → 0.19.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/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to `@waffo/pancake-ts` will be documented in this file.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.19.0] - 2026-08-18
8
+
9
+ Subscription products can now charge for the trial period.
10
+
11
+ ### Added
12
+
13
+ - **`PriceInfo.trialAmount`** — trial period price as a display string, subscription products only. Omit it for a free trial. It requires `metadata.trialDays` on the product and must be lower than `amount`; the API rejects either violation with a 400.
14
+ - **`PriceSnapshot`** — the type `CreateCheckoutSessionParams.priceSnapshot` accepts. Same shape as `PriceInfo` without `trialAmount`.
15
+
16
+ ### Changed
17
+
18
+ - **`CreateCheckoutSessionParams.priceSnapshot` is typed `PriceSnapshot` rather than `PriceInfo`.** A session-level override replaces the regular period price; the trial price comes from the product version locked into the session, so a `trialAmount` passed here would be dropped server-side. Existing calls compile unchanged — the fields `PriceSnapshot` declares are exactly the two `PriceInfo` had before `trialAmount` was added.
19
+
7
20
  ## [0.18.0] - 2026-08-08
8
21
 
9
22
  Customer sessions never reached the API, and webhook retries were rejected as replays.
@@ -25,6 +38,7 @@ Customer sessions never reached the API, and webhook retries were rejected as re
25
38
  - `client.buyer(token, options)` (deprecated) accepts and forwards the same options.
26
39
  - **`VerifyWebhookOptions.toleranceMs` default raised from `300000` to `2700000`, and the window is now asymmetric** — matching the gateway's API Key check, which pairs a wide past-facing window with a tight future-facing one. `toleranceMs` now means "how far in the past"; the future direction is `futureToleranceMs`. `toleranceMs: 0` still disables the check entirely. A captured request stays replayable for longer under the wider window, so keep your handler idempotent on the event `id` — that, not the window, is the real defense.
27
40
 
41
+
28
42
  ## [0.17.0] - 2026-08-03
29
43
 
30
44
  `supportEmail` and `website` were never applied by the update-store endpoint — passing them was silently ignored.
package/README.md CHANGED
@@ -74,7 +74,7 @@ Waffo supports two checkout modes based on whether the merchant knows the custom
74
74
 
75
75
  Both modes support **dynamic pricing** and **trial control** at checkout time:
76
76
 
77
- - `priceSnapshot` — override the product's stored price with a custom amount (e.g., coupon, volume discount)
77
+ - `priceSnapshot` — override the product's stored price with a custom amount (e.g., coupon, volume discount); for subscription products this replaces the regular period price only
78
78
  - `withTrial` — explicitly enable or disable the trial period for subscriptions (`true` = force trial, `false` = skip trial, omit = use default rules)
79
79
 
80
80
  ### Authenticated Checkout (Recommended)