@waffo/pancake-ts 0.15.0 → 0.16.1

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,31 @@ 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.16.1] - 2026-07-30
8
+
9
+ Pre-filling a billing country restricts which payment methods the hosted cashier offers.
10
+
11
+ ### Changed
12
+
13
+ - `createCheckoutSession` — passing `billingDetail` couples the hosted cashier to the order's billing country: it then offers only that country's payment market and the customer cannot switch. The country that applies is the one on the finished order, not the one you sent; a country outside the payment markets we cover applies no restriction. If the coupled market offers none of your enabled payment methods the order cannot be paid. Omit `billingDetail` to leave the cashier unrestricted. Types unchanged — no code migration.
14
+
15
+ ## [0.16.0] - 2026-07-28
16
+
17
+ Per-transaction payment method selection on the hosted checkout page.
18
+
19
+ ### Added
20
+
21
+ - `PaymentMethod` — payment methods offered on the checkout page: `card` / `applepay` / `googlepay` / `wechat`
22
+ - `CreateCheckoutSessionParams.includePaymentMethods` — whitelist: offer only these. Every value must be supported by the product type × currency pair, otherwise the request is rejected with a 400.
23
+ - `CreateCheckoutSessionParams.excludePaymentMethods` — blacklist: offer everything the currency supports except these. Values the currency does not offer are ignored, so one blacklist can be reused across currencies. Mutually exclusive with `includePaymentMethods`; omit both to offer every method the currency supports.
24
+
25
+ ### Changed
26
+
27
+ - Currencies outside the payment method matrix are now rejected at checkout session creation (400) instead of falling through to the provider. One-time supports `USD` / `EUR` / `GBP` / `HKD` / `JPY` / `CNY`; subscription supports `USD` / `EUR` / `GBP` / `HKD` / `JPY`. Affects one-time `THB` and subscription `CNY`, neither of which has ever produced a successful charge.
28
+ - Both fields require API Key authentication. Store Slug (visitor) sessions ignore them and always offer every method the currency supports — payment method selection is a merchant-side commercial decision (channel fees, settlement terms).
29
+
30
+ ---
31
+
7
32
  ## [0.15.0] - 2026-07-27
8
33
 
9
34
  Notification settings contract update for platform-managed payout notifications.
package/README.md CHANGED
@@ -134,6 +134,7 @@ const result = await client.checkout.anonymous.create({
134
134
  withTrial: false, // skip trial for this session
135
135
  orderMerchantExternalId: "ORDER-2026-00891", // optional, API Key auth only
136
136
  language: "pt-BR", // optional, sets the default checkout language (IETF BCP 47)
137
+ includePaymentMethods: ["card", "applepay"], // optional whitelist; or excludePaymentMethods to drop specific ones
137
138
  });
138
139
 
139
140
  window.open(result.checkoutUrl, "_blank", "noopener,noreferrer");