@owlmeans/server-payment 0.1.18-rc.29 → 0.1.18-rc.30

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 (231) hide show
  1. package/README.md +1 -1
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/server-payment/SKILL.md +78 -23
  4. package/build/actions/resync-subscriptions.d.ts +1 -1
  5. package/build/actions/resync-subscriptions.d.ts.map +1 -1
  6. package/build/actions/resync-subscriptions.js +1 -2
  7. package/build/actions/resync-subscriptions.js.map +1 -1
  8. package/build/actions/resync.d.ts +1 -1
  9. package/build/actions/resync.d.ts.map +1 -1
  10. package/build/actions/resync.js +1 -2
  11. package/build/actions/resync.js.map +1 -1
  12. package/build/actions/webhook.d.ts +1 -1
  13. package/build/actions/webhook.js +2 -2
  14. package/build/actions/webhook.js.map +1 -1
  15. package/build/config.d.ts +1 -1
  16. package/build/config.d.ts.map +1 -1
  17. package/build/config.js +20 -9
  18. package/build/config.js.map +1 -1
  19. package/build/consts.d.ts +6 -22
  20. package/build/consts.d.ts.map +1 -1
  21. package/build/consts.js +6 -34
  22. package/build/consts.js.map +1 -1
  23. package/build/consts.local.d.ts +94 -0
  24. package/build/consts.local.d.ts.map +1 -0
  25. package/build/consts.local.js +44 -0
  26. package/build/consts.local.js.map +1 -0
  27. package/build/consumer/capture.d.ts +21 -34
  28. package/build/consumer/capture.d.ts.map +1 -1
  29. package/build/consumer/capture.js +26 -17
  30. package/build/consumer/capture.js.map +1 -1
  31. package/build/consumer/consts.local.d.ts +10 -0
  32. package/build/consumer/consts.local.d.ts.map +1 -0
  33. package/build/consumer/consts.local.js +11 -0
  34. package/build/consumer/consts.local.js.map +1 -0
  35. package/build/consumer/handlers.d.ts +2 -9
  36. package/build/consumer/handlers.d.ts.map +1 -1
  37. package/build/consumer/handlers.js +3 -3
  38. package/build/consumer/handlers.js.map +1 -1
  39. package/build/consumer/index.d.ts +1 -1
  40. package/build/consumer/index.d.ts.map +1 -1
  41. package/build/consumer/mail.d.ts +1 -1
  42. package/build/consumer/mail.d.ts.map +1 -1
  43. package/build/consumer/mail.js +15 -15
  44. package/build/consumer/mail.js.map +1 -1
  45. package/build/consumer/origin.d.ts.map +1 -1
  46. package/build/consumer/origin.js +1 -2
  47. package/build/consumer/origin.js.map +1 -1
  48. package/build/consumer/reconcile.d.ts +1 -1
  49. package/build/consumer/reconcile.d.ts.map +1 -1
  50. package/build/consumer/reconcile.js +26 -27
  51. package/build/consumer/reconcile.js.map +1 -1
  52. package/build/consumer/records.d.ts +62 -32
  53. package/build/consumer/records.d.ts.map +1 -1
  54. package/build/consumer/records.js +25 -22
  55. package/build/consumer/records.js.map +1 -1
  56. package/build/consumer/service.d.ts +2 -9
  57. package/build/consumer/service.d.ts.map +1 -1
  58. package/build/consumer/service.js +46 -35
  59. package/build/consumer/service.js.map +1 -1
  60. package/build/consumer/types.d.ts +87 -0
  61. package/build/consumer/types.d.ts.map +1 -0
  62. package/build/consumer/types.js +2 -0
  63. package/build/consumer/types.js.map +1 -0
  64. package/build/consumer/types.local.d.ts +25 -0
  65. package/build/consumer/types.local.d.ts.map +1 -0
  66. package/build/consumer/types.local.js +2 -0
  67. package/build/consumer/types.local.js.map +1 -0
  68. package/build/consumer/withdrawal.d.ts +2 -25
  69. package/build/consumer/withdrawal.d.ts.map +1 -1
  70. package/build/consumer/withdrawal.js +13 -13
  71. package/build/consumer/withdrawal.js.map +1 -1
  72. package/build/entrypoints.d.ts +5 -5
  73. package/build/entrypoints.d.ts.map +1 -1
  74. package/build/entrypoints.js +1 -1
  75. package/build/entrypoints.js.map +1 -1
  76. package/build/gate.d.ts +2 -16
  77. package/build/gate.d.ts.map +1 -1
  78. package/build/gate.js +3 -3
  79. package/build/gate.js.map +1 -1
  80. package/build/index.d.ts +5 -3
  81. package/build/index.d.ts.map +1 -1
  82. package/build/index.js +2 -0
  83. package/build/index.js.map +1 -1
  84. package/build/limit.d.ts +1 -3
  85. package/build/limit.d.ts.map +1 -1
  86. package/build/limit.js +2 -1
  87. package/build/limit.js.map +1 -1
  88. package/build/log.d.ts +3 -0
  89. package/build/log.d.ts.map +1 -0
  90. package/build/log.js +4 -0
  91. package/build/log.js.map +1 -0
  92. package/build/plan.d.ts.map +1 -1
  93. package/build/plan.js +2 -1
  94. package/build/plan.js.map +1 -1
  95. package/build/plugins/checkout-plugins.d.ts +2 -10
  96. package/build/plugins/checkout-plugins.d.ts.map +1 -1
  97. package/build/plugins/checkout-plugins.js +2 -1
  98. package/build/plugins/checkout-plugins.js.map +1 -1
  99. package/build/plugins/consts.local.d.ts +13 -0
  100. package/build/plugins/consts.local.d.ts.map +1 -0
  101. package/build/plugins/consts.local.js +22 -0
  102. package/build/plugins/consts.local.js.map +1 -0
  103. package/build/plugins/estimate.d.ts +2 -27
  104. package/build/plugins/estimate.d.ts.map +1 -1
  105. package/build/plugins/estimate.js +27 -17
  106. package/build/plugins/estimate.js.map +1 -1
  107. package/build/plugins/events.d.ts +3 -17
  108. package/build/plugins/events.d.ts.map +1 -1
  109. package/build/plugins/events.js +46 -26
  110. package/build/plugins/events.js.map +1 -1
  111. package/build/plugins/fx.d.ts +18 -21
  112. package/build/plugins/fx.d.ts.map +1 -1
  113. package/build/plugins/fx.js +6 -4
  114. package/build/plugins/fx.js.map +1 -1
  115. package/build/plugins/portal.d.ts +3 -3
  116. package/build/plugins/portal.d.ts.map +1 -1
  117. package/build/plugins/portal.js +15 -5
  118. package/build/plugins/portal.js.map +1 -1
  119. package/build/plugins/refunds.d.ts +1 -21
  120. package/build/plugins/refunds.d.ts.map +1 -1
  121. package/build/plugins/refunds.js.map +1 -1
  122. package/build/plugins/stripe.d.ts +8 -0
  123. package/build/plugins/stripe.d.ts.map +1 -1
  124. package/build/plugins/stripe.js +92 -25
  125. package/build/plugins/stripe.js.map +1 -1
  126. package/build/plugins/types.d.ts +82 -0
  127. package/build/plugins/types.d.ts.map +1 -0
  128. package/build/plugins/types.js +2 -0
  129. package/build/plugins/types.js.map +1 -0
  130. package/build/plugins/types.local.d.ts +76 -0
  131. package/build/plugins/types.local.d.ts.map +1 -0
  132. package/build/plugins/types.local.js +2 -0
  133. package/build/plugins/types.local.js.map +1 -0
  134. package/build/plugins/webhook-manager.d.ts +2 -5
  135. package/build/plugins/webhook-manager.d.ts.map +1 -1
  136. package/build/plugins/webhook-manager.js +4 -3
  137. package/build/plugins/webhook-manager.js.map +1 -1
  138. package/build/reconcile.d.ts +1 -1
  139. package/build/reconcile.d.ts.map +1 -1
  140. package/build/reconcile.js +3 -2
  141. package/build/reconcile.js.map +1 -1
  142. package/build/resource.d.ts.map +1 -1
  143. package/build/resource.js +3 -2
  144. package/build/resource.js.map +1 -1
  145. package/build/{model.d.ts → schemas.d.ts} +3 -3
  146. package/build/schemas.d.ts.map +1 -0
  147. package/build/{model.js → schemas.js} +36 -54
  148. package/build/schemas.js.map +1 -0
  149. package/build/service.d.ts +1 -7
  150. package/build/service.d.ts.map +1 -1
  151. package/build/service.js +3 -2
  152. package/build/service.js.map +1 -1
  153. package/build/subscription.d.ts +1 -22
  154. package/build/subscription.d.ts.map +1 -1
  155. package/build/subscription.js +9 -7
  156. package/build/subscription.js.map +1 -1
  157. package/build/sync.d.ts +1 -1
  158. package/build/sync.d.ts.map +1 -1
  159. package/build/sync.js +7 -8
  160. package/build/sync.js.map +1 -1
  161. package/build/types.d.ts +96 -3
  162. package/build/types.d.ts.map +1 -1
  163. package/build/types.local.d.ts +27 -0
  164. package/build/types.local.d.ts.map +1 -0
  165. package/build/types.local.js +2 -0
  166. package/build/types.local.js.map +1 -0
  167. package/build/usage.d.ts +3 -14
  168. package/build/usage.d.ts.map +1 -1
  169. package/build/usage.js +15 -5
  170. package/build/usage.js.map +1 -1
  171. package/build/utils.d.ts +19 -4
  172. package/build/utils.d.ts.map +1 -1
  173. package/build/utils.js +36 -3
  174. package/build/utils.js.map +1 -1
  175. package/package.json +21 -20
  176. package/src/actions/resync-subscriptions.ts +1 -2
  177. package/src/actions/resync.ts +1 -2
  178. package/src/actions/webhook.ts +2 -2
  179. package/src/config.ts +20 -17
  180. package/src/consts.local.ts +62 -0
  181. package/src/consts.ts +7 -54
  182. package/src/consumer/capture.ts +29 -56
  183. package/src/consumer/consts.local.ts +18 -0
  184. package/src/consumer/handlers.ts +7 -18
  185. package/src/consumer/index.ts +1 -1
  186. package/src/consumer/mail.ts +19 -33
  187. package/src/consumer/origin.ts +2 -4
  188. package/src/consumer/reconcile.ts +27 -30
  189. package/src/consumer/records.ts +29 -46
  190. package/src/consumer/service.ts +48 -61
  191. package/src/consumer/types.local.ts +22 -0
  192. package/src/consumer/types.ts +98 -0
  193. package/src/consumer/withdrawal.ts +19 -48
  194. package/src/entrypoints.ts +1 -1
  195. package/src/gate.ts +5 -26
  196. package/src/index.ts +5 -3
  197. package/src/limit.ts +4 -7
  198. package/src/log.ts +4 -0
  199. package/src/plan.ts +2 -1
  200. package/src/plugins/checkout-plugins.ts +4 -14
  201. package/src/plugins/consts.local.ts +30 -0
  202. package/src/plugins/estimate.ts +19 -39
  203. package/src/plugins/events.ts +49 -52
  204. package/src/plugins/fx.ts +10 -31
  205. package/src/plugins/portal.ts +17 -13
  206. package/src/plugins/refunds.ts +2 -17
  207. package/src/plugins/stripe.ts +97 -67
  208. package/src/plugins/types.local.ts +62 -0
  209. package/src/plugins/types.ts +87 -0
  210. package/src/plugins/webhook-manager.ts +6 -14
  211. package/src/reconcile.ts +5 -6
  212. package/src/resource.ts +3 -10
  213. package/src/{model.ts → schemas.ts} +37 -61
  214. package/src/service.ts +4 -14
  215. package/src/subscription.ts +11 -35
  216. package/src/sync.ts +12 -22
  217. package/src/types.local.ts +20 -0
  218. package/src/types.ts +96 -3
  219. package/src/usage.ts +7 -17
  220. package/src/utils.ts +57 -17
  221. package/tests/checkout-consumer.spec.ts +27 -8
  222. package/tests/checkout-locks.spec.ts +160 -0
  223. package/tests/checkout.spec.ts +14 -2
  224. package/tests/consumer-events.spec.ts +4 -5
  225. package/tests/consumer-rights.integration.spec.ts +6 -7
  226. package/tests/consumer-rights.spec.ts +79 -3
  227. package/tests/estimate.spec.ts +34 -0
  228. package/tests/fake-stripe.ts +5 -16
  229. package/tests/gateway-options.spec.ts +2 -3
  230. package/build/model.d.ts.map +0 -1
  231. package/build/model.js.map +0 -1
package/README.md CHANGED
@@ -167,7 +167,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
167
167
  your project's skill store (`.agents/skills/`):
168
168
 
169
169
  ```sh
170
- npx @owlmeans/agent-skills@^0.1.18-rc.46
170
+ npx @owlmeans/agent-skills@^0.1.18-rc.48
171
171
  ```
172
172
 
173
173
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-payment",
4
- "version": "0.1.18-rc.29",
5
- "generatedAt": "2026-10-03T15:33:53.024Z",
4
+ "version": "0.1.18-rc.30",
5
+ "generatedAt": "2026-10-05T08:32:19.125Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -7,7 +7,7 @@ user-invocable: false
7
7
 
8
8
  # @owlmeans/server-payment
9
9
 
10
- **Install:** `bun add @owlmeans/server-payment@^0.1.18-rc.29`
10
+ **Install:** `bun add @owlmeans/server-payment@^0.1.18-rc.30`
11
11
 
12
12
  Public MIT package. It embeds Stripe into an application backend and owns everything between
13
13
  Stripe and an entity's entitlements: the subscription store, one-time fulfillments, the usage
@@ -27,7 +27,9 @@ portalBranding(cfg, { returnUrl: 'https://app.example.com/billing', headline: 'E
27
27
  declarePaymentPricing(cfg, { // absent entirely: today's fixed behaviour, unchanged
28
28
  tax: { automatic: true, behavior: TaxBehavior.Exclusive, collectTaxId: true, estimate: true },
29
29
  currency: { adaptive: true, estimate: true },
30
- stripe: { settlementCurrency: 'eur', subscriptionPaymentMethodTypes: ['card', 'link'] },
30
+ stripe: { settlementCurrency: 'eur', subscriptionPaymentMethodTypes: ['card', 'link', 'klarna'],
31
+ subscriptionPaymentMethodTypesByCurrency: { usd: ['card', 'link'] },
32
+ lockCustomerEmail: true, lockCustomerCountry: true }, // optional: see "Customer locks"
31
33
  })
32
34
  declareConsumerRights(cfg, { // absent: no consumer-rights behaviour at all
33
35
  textVersion: 'terms-2026-09', links: { en: { billingTerms, withdrawalInformation, withdrawalFunction, cancellation } },
@@ -36,6 +38,7 @@ declareConsumerRights(cfg, { // absent: no consumer-ri
36
38
  withdrawal: true, automaticRefunds: true, cancellation: true, purchaseConfirmation: true },
37
39
  trader: { name: 'Example', legalName: 'Example Ltd', address: '…', email: 'support@example.com' },
38
40
  mail: { from: 'billing@example.com', bcc: ['archive@example.com'] }, // alias: default MAILER_SERVICE
41
+ consentContext: 'included', // optional: the `_included` consent copy variant
39
42
  })
40
43
  declarePaymentProduct(cfg, { sku: 'app-plans', type: ProductType.Service, services: ['app'], name: 'Plans' })
41
44
  declarePaymentPlan(cfg, { productSku: 'app-plans', sku: 'free', rank: 0, free: true, price: 0, … })
@@ -125,7 +128,9 @@ observer(context).onSubscription(async event => { /* keyed by event.eventKey */
125
128
  default currency replaces its converted amount. Only for recurring and quantity plans.
126
129
  - **`withdrawal.components`** state the separately priced parts of a subscription for a withdrawal
127
130
  (CJEU C-641/19): `{ key, basis: 'time' | 'units', shareMinor }`, the shares summing to
128
- `round(price × 100)`. Absent: the whole price is one `time` component.
131
+ `round(price × 100)`. Absent: the whole price is one `time` component. They also pick the start
132
+ statement: a `units` part → the `_units` variant, otherwise the base (time-only) texts
133
+ (`startContextOf`, `@owlmeans/payment`).
129
134
  - `declarePaymentPlan` refuses before recording: a bad rank or a priced/gatewayed free plan
130
135
  (`PlanRankConflict`), a capability set under the reserved `limit` scope, a malformed limit
131
136
  (`LimitMisdeclared('<key>:<reason>')`), a malformed or amount-mode `currencyPrices` or components
@@ -178,6 +183,11 @@ None declares an ObjectId reference: `entityId` is an organization key and every
178
183
  - A plan the paygate does not sell is refused (`ProductError`). `checkoutOptions` puts automatic
179
184
  tax, billing address collection, tax-id collection and Adaptive Pricing on the session exactly
180
185
  as `PricingPolicy` declares them.
186
+ - Subscription methods come from `stripe.subscriptionPaymentMethodTypesByCurrency[chargeCurrency]`,
187
+ falling back to `subscriptionPaymentMethodTypes`; with neither, Stripe selects dynamically.
188
+ Currency keys and method names normalize to lowercase. Currency keys must have three letters;
189
+ method lists must be nonempty and unique. Choose account-supported methods for each currency:
190
+ a method the account cannot accept in that currency rejects the whole session.
181
191
  - **Without a consumer-rights policy every session is what it always was**: the charge currency
182
192
  is the settlement currency (FX from the catalogue), Adaptive Pricing as declared.
183
193
 
@@ -193,11 +203,14 @@ None declares an ObjectId reference: `entityId` is an organization key and every
193
203
  charged exactly — no FX call; any other goes through the FX reference rate (rounded up). A
194
204
  subscription or quantity session is forced to the charge currency (`currency`) only when its
195
205
  synced Price carries it (default or option) — otherwise it is left to Stripe and warned.
196
- `adaptive_pricing` only when the charge currency is the settlement currency.
206
+ `adaptive_pricing.enabled` is explicitly true only when the policy enables it and the charge
207
+ currency is the settlement currency; every other session sends false. Omitting the flag lets
208
+ Stripe inherit the Dashboard setting and can enable localization for an exact USD checkout.
197
209
  - **The lock at Stripe.** A locked profile whose customer carries the address:
198
210
  `customer_update.address: 'never'` and `billing_address_collection: 'auto'` (tax follows the
199
- saved address, Checkout cannot move it); `name: 'auto'` stays. A locked customer without an
200
- address keeps `'auto'`/`'required'`, or automatic tax would have no location.
211
+ saved address, Checkout cannot move it); `name: 'auto'` stays. A locked customer without a
212
+ tax-locatable address (`isTaxLocatable`) keeps `'auto'`/`'required'`, or Stripe refuses the
213
+ session ("Automatic tax calculation in Checkout requires a valid address on the Customer").
201
214
  - **Terms.** `mechanisms.checkoutTerms` puts `consent_collection.terms_of_service: 'required'` and
202
215
  `custom_text.terms_of_service_acceptance` (the `checkout.terms-acceptance.in-scope | other` copy
203
216
  with the billing language's links, ≤ 1200 characters) on every session.
@@ -208,7 +221,7 @@ None declares an ObjectId reference: `entityId` is an organization key and every
208
221
  terms text, under the same plugin admissions, metadata `termsCollected: 'false'`; a
209
222
  `checkout-terms-fallback` event (`recordKind: 'checkout'`, `recordId` = the entity, `externalId`
210
223
  = the session, `ok: false`, the Stripe message in `detail`) is appended per fallback and one
211
- `console.warn` per context tells the operator what to set. Any other refusal is not retried; a
224
+ `warn` log per context tells the operator what to set. Any other refusal is not retried; a
212
225
  failing retry releases the admissions and propagates its own error.
213
226
  - **Texts.** An in-scope top-up without `submitText` says what it buys (`checkout.top-up`, with the
214
227
  country's name); a subscription without `submitText` shows the renewal price in the charge
@@ -221,9 +234,38 @@ None declares an ObjectId reference: `entityId` is an organization key and every
221
234
  - **Metadata** (session and `subscription_data`): `region`, `country`, `language`, `termsVersion`,
222
235
  `copyVersion`, `termsCollected` (`'true'` when the checkbox is on the session, `'false'` when the
223
236
  policy has it off or after the fallback), `ipCountry` (the `cf-ipcountry` the app passes),
224
- `startRequestId`, `profileId`. The purchase's `termsAccepted` comes only from the completed
237
+ `startRequestId`, `profileId`, `countryPinned` (`'true'` only under `lockCustomerCountry` when the
238
+ session kept the pinned address). The purchase's `termsAccepted` comes only from the completed
225
239
  session's `consent.terms_of_service` — absent when nothing was collected.
226
240
 
241
+ ### Customer locks (`declarePaymentPricing` → `stripe`)
242
+
243
+ Both are opt-in, backend-only, read per call from the Stripe pricing plugin config, and work with
244
+ or without a consumer-rights policy.
245
+
246
+ - **`lockCustomerEmail`** — every `createLink` must pass `CreateLinkParams.email` (the application's
247
+ verified e-mail of the buyer), else `PaygateError('customer-email')` before any Stripe call. It is
248
+ written to the Stripe customer (created with it, or updated — case-insensitively different — in
249
+ the same call as `preferred_locales`), never as `customer_email`: Checkout shows a customer's
250
+ valid e-mail read-only, and only while the customer has none asks for one and saves it. The
251
+ customer carries the LAST payer's e-mail (invoices and renewals go there). Without the lock
252
+ `email` is ignored.
253
+ - **`lockCustomerCountry`** — the known country (the locked profile's, else `params.country`) is
254
+ written to the customer as a country-only address (lines and postal code cleared) when the saved
255
+ one carries no or another country — over another country only before any lock (a locked
256
+ customer's other country is still `BillingCountryLocked`). When the saved address is
257
+ tax-locatable the session keeps it (`customer_update.address: 'never'`, collection `'auto'`):
258
+ no address form, tax on the pinned country; Stripe still shows the card form's "Country or
259
+ region" picker (a payment-method detail no parameter hides), which then moves neither tax nor the
260
+ saved address. Metadata `countryPinned: 'true'` makes the first completed purchase lock THAT
261
+ country (`lockFromSession`: `metadata.country` before `customer_details.address.country`).
262
+ - **Tax-locatable** (`isTaxLocatable`, from Stripe's customer-locations table): a country alone
263
+ everywhere except US (needs `postal_code`) and CA / IN (`postal_code` or `state`). A pinned US,
264
+ CA or IN customer without one is not kept: Checkout collects the address — country editable —
265
+ and the purchase locks what was typed, as without the option.
266
+ - **The portal** never offers `email` under `lockCustomerEmail`, nor `address` under
267
+ `lockCustomerCountry` (or `countryLock`); both flags are in its fingerprint.
268
+
227
269
  ## Checkout plugins
228
270
 
229
271
  `gateway(ctx).use(plugin)` seats a `CheckoutPlugin` per gateway instance (the `ExecutionService.use`
@@ -271,8 +313,11 @@ registry: a plugin whose `alias` is registered already replaces it). All hooks a
271
313
  are never cached. **A locked profile overrides the requested country** (`source: 'profile'`,
272
314
  `locked: true`); the estimate carries `region`. Under a policy with region currencies a
273
315
  recurring plan is estimated in the charge currency at its synced unit amount (default or
274
- option); the `local` line (FX Quotes, a PREVIEW endpoint) only when that currency is the
275
- settlement currency.
316
+ option); the `local` line (FX Quotes, a PREVIEW endpoint) only when the session's CHARGE currency
317
+ (the region's, or the locked profile's) is the settlement currency — the same test the session's
318
+ `adaptive_pricing` takes. An amount plan stays estimated in its policy currency but is charged in
319
+ the region's currency, so an EU top-up gets its local line through the policy → settlement →
320
+ local chain, and an exact-USD one none.
276
321
 
277
322
  ## The subscription store
278
323
 
@@ -353,13 +398,20 @@ full contract is in `reference.md`.
353
398
  - **Performance consent** (top-ups only — a start request covers a subscription's own invoice):
354
399
  required while an open in-scope top-up window has none. `assertConsent` is one indexed query and
355
400
  throws `PerformanceConsentRequired` (428, `pending`, latest `deadline`); an application calls it
356
- only where credits will actually be spent. `recordConsent` renders the statement itself
357
- (`consentStatementOf` with the trader's `name`), refuses a stale `textVersion` with a fresh 428,
358
- covers only the open windows the body lists, stamps `consentedAt` conditionally, mails the
359
- confirmation, then tells `onConsent`.
360
- - **Start requests**: `recordStartRequest(subject, body, origin, { plan })` records the statement
361
- with the plan's short name the application passes (default: its localized title), usable
362
- `startRequestTtlSeconds` (3600); the purchase takes it as `servicesStartedAt`/`consentedAt`.
401
+ only where credits will actually be spent. `consentView` carries the policy's `consentContext`
402
+ as `context`. `recordConsent` renders the statement itself (`consentStatementOf` with the
403
+ trader's `name` and the policy's `consentContext`, so the stored verbatim text and the consent
404
+ mail are the `_<context>` variant the dialog showed; without a context the base statement),
405
+ stores that `context` on the record, refuses a stale `textVersion` with a fresh 428, covers only
406
+ the open windows the body lists, stamps `consentedAt` conditionally, mails the confirmation, then
407
+ tells `onConsent`.
408
+ - **Start requests follow the plan's withdrawal arithmetic.** `startView(entityId, planSku)` names
409
+ `context = startContextOf(plan)` (`'units'` for a plan with a `units` component, absent for a
410
+ time-only one); `recordStartRequest(subject, body, origin, { plan })` renders the statement with
411
+ the SAME `startContextOf(plan)` and the plan's short name the application passes (default: its
412
+ localized title), stores it verbatim with its `context`, and the start mail repeats it with
413
+ `email.start.rule` of that variant (the record's `context`). Usable `startRequestTtlSeconds`
414
+ (3600); the purchase takes it as `servicesStartedAt`/`consentedAt`.
363
415
  - **Withdrawal** (`withdraw(subject | null, body, origin)`, managed only): in-app by `purchaseId`,
364
416
  public by contract reference or invoice number plus an e-mail of the purchase, its profile or
365
417
  its paygate customer. The declaration and the conditional `withdrawnAt` are written BEFORE
@@ -456,11 +508,11 @@ and prices (above), the portal configuration, the webhook endpoint. A deployment
456
508
  webhook URL (`webhookUrlOf`: the `webhookService` alias's host and base); its rows carry the
457
509
  `owner`.
458
510
 
459
- - **The portal configuration**: customer update (email, address, tax id — **without address under
460
- `mechanisms.countryLock`**), invoice history, payment method update, cancellation at period end
461
- without proration, price switching between the active recurring prices. Its fingerprint covers
462
- the catalogue (incl. `currencyPrices`), the lock flag, the region currencies, the branding and
463
- the deployment key. Each deployment owns its own configuration, tagged `{ owlmeans: 'payment',
511
+ - **The portal configuration**: customer update (tax id; email unless `stripe.lockCustomerEmail`;
512
+ address unless `mechanisms.countryLock` or `stripe.lockCustomerCountry`), invoice history,
513
+ payment method update, cancellation at period end without proration, price switching between the
514
+ active recurring prices. Its fingerprint covers the catalogue (incl. `currencyPrices`), the lock
515
+ flags, the region currencies, the branding and the deployment key. Each deployment owns its own configuration, tagged `{ owlmeans: 'payment',
464
516
  service: <owner>, deployment: webhookUrlOf(ctx) }`; one tagged for another deployment (a former
465
517
  webhook URL included) is never touched — a moved URL creates a new configuration.
466
518
  - `portalLink(ctx, entityId, { flow, planSku?, returnUrl })`: a customer is required
@@ -542,9 +594,12 @@ concurrent withdrawals.
542
594
 
543
595
  ## External docs
544
596
 
545
- - https://docs.stripe.com/api/checkout/sessions/create — inline `price_data`; `consent_collection.terms_of_service` needs a terms URL in the Dashboard (else `invalid_request_error` on param `consent_collection[terms_of_service]`); `custom_text.{submit, after_submit, terms_of_service_acceptance}` ≤ 1200 characters each; `currency` forces a Price's currency option; `expires_at` 30 min – 24 h.
597
+ - https://docs.stripe.com/api/checkout/sessions/create — `customer`: "If the Customer already has a valid email set, the email will be prefilled and not editable in Checkout" (else Checkout saves the typed one); `customer_email` only prefills a NEW customer and cannot be combined with `customer`. Inline `price_data`; `consent_collection.terms_of_service` needs a terms URL in the Dashboard (else `invalid_request_error` on param `consent_collection[terms_of_service]`); `custom_text.{submit, after_submit, terms_of_service_acceptance}` ≤ 1200 characters each; `currency` forces a Price's currency option; `expires_at` 30 min – 24 h.
598
+ - https://docs.stripe.com/tax/customer-locations — minimal tax location: country alone except US (postal code), CA and IN (postal code or province); https://docs.stripe.com/tax/checkout/page — an existing customer with `customer_update.address: 'never'` is taxed on its saved address. Verified against test mode (2026-10): a pinned DE customer keeps its VAT when the card country is switched to US; a country-only US/CA customer is refused at session creation.
546
599
  - https://docs.stripe.com/payments/checkout/localize-prices/manual-currency-prices — `currency_options` on a Price, one reusable Price for several currencies; manual options override Adaptive Pricing for that currency.
547
600
  - https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing — Adaptive Pricing requires the price currency to be a settlement currency; webhook amounts stay in the integration currency.
601
+ - https://docs.stripe.com/api/checkout/sessions/create?query=adaptive_pricing — `adaptive_pricing.enabled` defaults to the Dashboard setting when omitted; send an explicit boolean for every session.
602
+ - https://docs.stripe.com/payments/klarna — Klarna eligibility depends on currency, customer location and purchase use case; verify the account's supported currencies before explicitly requesting it.
548
603
  - https://docs.stripe.com/invoicing/multi-currency-customers — a customer's subscriptions share one currency; one-time payments may differ.
549
604
  - https://docs.stripe.com/invoicing/integration/programmatic-credit-notes — preview a credit note on an invoice line; link an existing refund with `refund`; custom lines are not allowed with automatic tax.
550
605
  - https://docs.stripe.com/tax/reports — a refund or a credit note lowers reported tax; only the credit note is the corrective document of an issued invoice.
@@ -1,3 +1,3 @@
1
1
  /** Re-read every live paygate subscription — the manually or periodically triggered repair. */
2
- export declare const resyncSubscriptions: import("@owlmeans/server-entrypoint").BoundEntrypointHandler<import("@owlmeans/entrypoint").EntrypointProtocol<{}, import("../consts.js").ResyncSubscriptionsResult>>;
2
+ export declare const resyncSubscriptions: import("@owlmeans/server-entrypoint").BoundEntrypointHandler<import("@owlmeans/entrypoint").EntrypointProtocol<{}, import("../types.js").ResyncSubscriptionsResult>>;
3
3
  //# sourceMappingURL=resync-subscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resync-subscriptions.d.ts","sourceRoot":"","sources":["../../src/actions/resync-subscriptions.ts"],"names":[],"mappings":"AAOA,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,uKACY,CAAA"}
1
+ {"version":3,"file":"resync-subscriptions.d.ts","sourceRoot":"","sources":["../../src/actions/resync-subscriptions.ts"],"names":[],"mappings":"AAMA,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,sKACY,CAAA"}
@@ -1,6 +1,5 @@
1
1
  import { handlers } from '@owlmeans/server-api';
2
- import { paymentGate } from '../consts.js';
3
- import { gateway } from '../utils.js';
2
+ import { paymentGate, gateway } from '../utils.js';
4
3
  const bind = handlers();
5
4
  /** Re-read every live paygate subscription — the manually or periodically triggered repair. */
6
5
  export const resyncSubscriptions = bind.request(paymentGate.resyncSubscriptions, async (_request, context) => await gateway(context).resyncAll(context));
@@ -1 +1 @@
1
- {"version":3,"file":"resync-subscriptions.js","sourceRoot":"","sources":["../../src/actions/resync-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGrC,MAAM,IAAI,GAAG,QAAQ,EAAW,CAAA;AAEhC,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAC3G,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"resync-subscriptions.js","sourceRoot":"","sources":["../../src/actions/resync-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlD,MAAM,IAAI,GAAG,QAAQ,EAAW,CAAA;AAEhC,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAC3G,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA"}
@@ -3,5 +3,5 @@
3
3
  * in any managed process, `bootstrap: false` included: the webhook URL and the rows follow the
4
4
  * gateway's `webhookService` and `owner`, so every process of the owner converges on one state.
5
5
  */
6
- export declare const resync: import("@owlmeans/server-entrypoint").BoundEntrypointHandler<import("@owlmeans/entrypoint").EntrypointProtocol<{}, import("../consts.js").ResyncResult>>;
6
+ export declare const resync: import("@owlmeans/server-entrypoint").BoundEntrypointHandler<import("@owlmeans/entrypoint").EntrypointProtocol<{}, import("../types.js").ResyncResult>>;
7
7
  //# sourceMappingURL=resync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resync.d.ts","sourceRoot":"","sources":["../../src/actions/resync.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,eAAO,MAAM,MAAM,0JAMjB,CAAA"}
1
+ {"version":3,"file":"resync.d.ts","sourceRoot":"","sources":["../../src/actions/resync.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,MAAM,yJAMjB,CAAA"}
@@ -1,8 +1,7 @@
1
1
  import { PaygateError } from '@owlmeans/payment';
2
2
  import { handlers } from '@owlmeans/server-api';
3
- import { paymentGate } from '../consts.js';
3
+ import { paymentGate, fingerprints, gateway } from '../utils.js';
4
4
  import { bootstrapStripe } from '../service.js';
5
- import { fingerprints, gateway } from '../utils.js';
6
5
  const bind = handlers();
7
6
  /**
8
7
  * Forget every sync fingerprint and bring Stripe back to the declared catalogue, portal and webhook —
@@ -1 +1 @@
1
- {"version":3,"file":"resync.js","sourceRoot":"","sources":["../../src/actions/resync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAA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C,OAAO,CAAC,OAAO;QAAE,MAAM,IAAI,YAAY,CAAC,WAAW,CAAC,CAAA;IACzD,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAA;IACnC,MAAM,eAAe,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IAC9E,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;AACrB,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /** A Stripe delivery — only a managed gateway receives one; its secret is the `owner`'s stored one. */
2
2
  export declare const webhook: import("@owlmeans/server-entrypoint").BoundEntrypointHandler<import("@owlmeans/entrypoint").EntrypointProtocol<{
3
- params: import("../consts.js").PaygateParams;
3
+ params: import("../types.js").PaygateParams;
4
4
  }, undefined>>;
5
5
  //# sourceMappingURL=webhook.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { PaygateError, UnknownPaygate } from '@owlmeans/payment';
2
2
  import { handlers } from '@owlmeans/server-api';
3
- import { paymentGate, STRIPE_PAYGATE_ALIAS } from '../consts.js';
3
+ import { STRIPE_PAYGATE_ALIAS } from '../consts.js';
4
+ import { paymentGate, gateway } from '../utils.js';
4
5
  import { handleStripeWebhook } from '../plugins/stripe.js';
5
- import { gateway } from '../utils.js';
6
6
  const bind = handlers();
7
7
  /** A Stripe delivery — only a managed gateway receives one; its secret is the `owner`'s stored one. */
8
8
  export const webhook = bind.params(paymentGate.webhook, async ({ paygate }, context, request) => {
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../src/actions/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,cAAc,C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AC9F,IAAI,OAAO,KAAK,oBAAoB;QAAE,MAAM,IAAI,cAAc,CAAC,OAAO,CAAC,CAAA;IACvE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAChC,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,MAAM,IAAI,YAAY,CAAC,WAAW,CAAC,CAAA;IACzD,MAAM,mBAAmB,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;AAC5E,CAAC,CAAC,CAAA"}
package/build/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ConsumerRightsPolicy } from '@owlmeans/payment';
1
+ import { type ConsumerRightsPolicy } from '@owlmeans/payment';
2
2
  import type { Config, ConsumerRightsDef, PaymentPlan, PaymentPlanDef, PaymentProductDef, PortalBrandingDef, PricingDef, StripeSecretsDef } from './types.js';
3
3
  export declare const declarePaymentProduct: (cfg: Config, def: PaymentProductDef) => void;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAA6C,MAAM,mBAAmB,CAAA;AAKxG,OAAO,KAAK,EACV,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAkB,iBAAiB,EAAE,iBAAiB,EAC5G,UAAU,EAAE,gBAAgB,EAC7B,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,qBAAqB,QAAS,MAAM,OAAO,iBAAiB,KAAG,IAS3E,CAAA;AA8BD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,QAAS,MAAM,OAAO,cAAc,KAAG,IA+CrE,CAAA;AAgDD,gDAAgD;AAChD,eAAO,MAAM,eAAe,QAAS,MAAM,KAAG,WAAW,EACiD,CAAA;AAE1G;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,QAAS,MAAM,KAAG,IAmBpD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;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,OAAO,iBAAiB,KAAG,oBAsC3E,CAAA"}
package/build/config.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { toConfigRecord } from '@owlmeans/server-app';
2
2
  import { plugin, PLUGIN_RECORD } from '@owlmeans/config';
3
- import { assertAmountCheckoutPolicy, assertPricingPolicy, assertQuantityCheckoutPolicy, CAPABILITY_LIMIT_SCOPE, CheckoutPricingMode, CONSUMER_RIGHTS_RECORD_ID, CONSUMER_RIGHTS_RECORD_TYPE, ConsumerRightsError, LimitKind, LimitMisdeclared, LimitWindow, makeConsumerRightsPolicy, PLAN_RECORD_PREFIX, PLAN_RECORD_TYPE, PaymentError, PlanDuration, PlanRankConflict, PlanStatus, PRICING_POLICY_RECORD_ID, PRICING_POLICY_RECORD_TYPE, PRODUCT_RECORD_PREFIX, PRODUCT_RECORD_TYPE, ProductError, } from '@owlmeans/payment';
3
+ import { assertAmountCheckoutPolicy, assertPricingPolicy, assertQuantityCheckoutPolicy, CAPABILITY_LIMIT_SCOPE, CheckoutPricingMode, CONSUMER_RIGHTS_RECORD_ID, CONSUMER_RIGHTS_RECORD_TYPE, ConsumerRightsError, LimitKind, LimitMisdeclared, makeConsumerRightsPolicy, PLAN_RECORD_PREFIX, PLAN_RECORD_TYPE, PaymentError, PlanDuration, PlanRankConflict, PlanStatus, PRICING_POLICY_RECORD_ID, PRICING_POLICY_RECORD_TYPE, PRODUCT_RECORD_PREFIX, PRODUCT_RECORD_TYPE, ProductError } from '@owlmeans/payment';
4
4
  import { CONSUMER_RIGHTS_MAIL_PLUGIN_CONFIG, STRIPE_PAYGATE_ALIAS, STRIPE_PLUGIN_CONFIG, STRIPE_PORTAL_PLUGIN_CONFIG, STRIPE_PRICING_PLUGIN_CONFIG, } from './consts.js';
5
+ import { CURRENCY, LIMIT_KINDS, LIMIT_WINDOWS } from './consts.local.js';
5
6
  export const declarePaymentProduct = (cfg, def) => {
6
7
  cfg.records = cfg.records ?? [];
7
8
  const product = {
@@ -13,8 +14,6 @@ export const declarePaymentProduct = (cfg, def) => {
13
14
  cfg.records.push({ ...toConfigRecord(product), recordType: PRODUCT_RECORD_TYPE, id: `${PRODUCT_RECORD_PREFIX}:${def.sku}` });
14
15
  };
15
16
  const isSafeCount = (value) => typeof value === 'number' && Number.isSafeInteger(value) && value >= 0;
16
- const LIMIT_KINDS = Object.values(LimitKind);
17
- const LIMIT_WINDOWS = Object.values(LimitWindow);
18
17
  const assertLimitDeclaration = (key, limit) => {
19
18
  if (!LIMIT_KINDS.includes(limit.kind)) {
20
19
  throw new LimitMisdeclared(`${key}:kind`);
@@ -91,7 +90,6 @@ export const declarePaymentPlan = (cfg, def) => {
91
90
  };
92
91
  cfg.records.push({ ...toConfigRecord(plan), recordType: PLAN_RECORD_TYPE, id: `${PLAN_RECORD_PREFIX}:${def.sku}` });
93
92
  };
94
- const CURRENCY = /^[a-z]{3}$/;
95
93
  /** `currencyPrices` normalized to lowercase codes; each a positive amount of whole minor units. */
96
94
  const currencyPricesOf = (def) => {
97
95
  if (def.currencyPrices == null) {
@@ -212,16 +210,29 @@ export const declarePaymentPricing = (cfg, def) => {
212
210
  if (settlementCurrency != null && !/^[a-z]{3}$/.test(settlementCurrency)) {
213
211
  throw new PaymentError('pricing-policy:settlement-currency');
214
212
  }
215
- const subscriptionPaymentMethodTypes = stripe.subscriptionPaymentMethodTypes?.map(type => type.toLowerCase());
216
- if (subscriptionPaymentMethodTypes != null && (subscriptionPaymentMethodTypes.length === 0
217
- || subscriptionPaymentMethodTypes.some(type => !/^[a-z][a-z0-9_]*$/.test(type))
218
- || new Set(subscriptionPaymentMethodTypes).size !== subscriptionPaymentMethodTypes.length)) {
219
- throw new PaymentError('pricing-policy:subscription-payment-methods');
213
+ const normalizeMethods = (methods) => {
214
+ const normalized = methods.map(type => type.toLowerCase());
215
+ if (normalized.length === 0 || normalized.some(type => !/^[a-z][a-z0-9_]*$/.test(type))
216
+ || new Set(normalized).size !== normalized.length) {
217
+ throw new PaymentError('pricing-policy:subscription-payment-methods');
218
+ }
219
+ return normalized;
220
+ };
221
+ const subscriptionPaymentMethodTypes = stripe.subscriptionPaymentMethodTypes != null
222
+ ? normalizeMethods(stripe.subscriptionPaymentMethodTypes) : undefined;
223
+ const subscriptionPaymentMethodTypesByCurrency = {};
224
+ for (const [key, methods] of Object.entries(stripe.subscriptionPaymentMethodTypesByCurrency ?? {})) {
225
+ const currency = key.toLowerCase();
226
+ if (!/^[a-z]{3}$/.test(currency) || Object.hasOwn(subscriptionPaymentMethodTypesByCurrency, currency)) {
227
+ throw new PaymentError('pricing-policy:subscription-payment-methods-currency');
228
+ }
229
+ subscriptionPaymentMethodTypesByCurrency[currency] = normalizeMethods(methods);
220
230
  }
221
231
  plugin(cfg, {
222
232
  ...stripe,
223
233
  ...(settlementCurrency != null ? { settlementCurrency } : {}),
224
234
  ...(subscriptionPaymentMethodTypes != null ? { subscriptionPaymentMethodTypes } : {}),
235
+ ...(stripe.subscriptionPaymentMethodTypesByCurrency != null ? { subscriptionPaymentMethodTypesByCurrency } : {}),
225
236
  }, STRIPE_PRICING_PLUGIN_CONFIG);
226
237
  }
227
238
  };
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EACL,0BAA0B,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,sBAAsB,EACrG,mBAAmB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,SAAS,EAC3G,gBAAgB,EAAE,WAAW,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAC3G,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,wBAAwB,EAAE,0BAA0B,EAChG,qBAAqB,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,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrD,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,GAAG,CAAC,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3D,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5E,EAAE,kCAAkC,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
package/build/consts.d.ts CHANGED
@@ -13,6 +13,12 @@ export declare const STRIPE_SIGNATURE = "Stripe-Signature";
13
13
  * with `declarePaymentPricing({ stripe: { fxApiVersion } })` once Stripe moves the API or renames
14
14
  * the preview.
15
15
  */
16
+ /**
17
+ * The Stripe API version every client of this package is pinned to (the one stripe-node 17 defaulted to).
18
+ * Moving it re-creates the stored webhook endpoints with their payload shapes, so it moves together with
19
+ * the readers of `current_period_*`, an invoice's subscription and a credit note's refund.
20
+ */
21
+ export declare const STRIPE_PINNED_API_VERSION = "2025-02-24.acacia";
16
22
  export declare const STRIPE_FX_QUOTES_API_VERSION = "2025-07-30.preview";
17
23
  export declare const GATEWAY_SERVICE = "payment-gateway";
18
24
  export declare const PAYMENT_OBSERVER = "payment-observer";
@@ -74,26 +80,4 @@ export declare const STRIPE_DEPLOYMENT_KEY = "deployment";
74
80
  * is due), so an application can observe it without a Stripe dashboard change.
75
81
  */
76
82
  export declare const WEBHOOK_EVENTS: readonly string[];
77
- export interface PaygateParams {
78
- paygate: string;
79
- }
80
- export interface ResyncResult {
81
- ok: boolean;
82
- }
83
- export interface ResyncSubscriptionsResult {
84
- scanned: number;
85
- updated: number;
86
- }
87
- /** Embedded gateway protocol tree; the alias strings are private adapter details. */
88
- export declare const paymentGate: {
89
- readonly base: import("@owlmeans/entrypoint").EntrypointProtocol<{}, undefined>;
90
- /** Public: Stripe signs the raw body, so no application guard may sit in front of it. */
91
- readonly webhook: import("@owlmeans/entrypoint").EntrypointProtocol<{
92
- params: PaygateParams;
93
- }, undefined>;
94
- /** Re-sync products, prices, the portal configuration and the webhook endpoint. */
95
- readonly resync: import("@owlmeans/entrypoint").EntrypointProtocol<{}, ResyncResult>;
96
- /** Re-read every live paygate subscription and apply it as a webhook would. */
97
- readonly resyncSubscriptions: import("@owlmeans/entrypoint").EntrypointProtocol<{}, ResyncSubscriptionsResult>;
98
- };
99
83
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGhE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AAEvC,eAAO,MAAM,oBAAoB,WAAW,CAAA;AAC5C,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AACtD,eAAO,MAAM,2BAA2B,4BAA4B,CAAA;AACpE,gLAAgL;AAChL,eAAO,MAAM,4BAA4B,6BAA6B,CAAA;AACtE,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,uBAAuB,CAAA;AAChE,eAAO,MAAM,eAAe,oBAAoB,CAAA;AAChD,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AAExD,eAAO,MAAM,oBAAoB,6BAA6B,CAAA;AAC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BAAuB,wBAAwB,CAAA;AAE5D,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAC5D,qGAAqG;AACrG,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AACtD,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB,6BAA6B,CAAA;AAC9D,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,iCAAiC,CAAA;AACtE,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAE1D,eAAO,MAAM,uBAAuB,4BAA4B,CAAA;AAChE,4FAA4F;AAC5F,eAAO,MAAM,kCAAkC,oCAAoC,CAAA;AAEnF,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B,QAAU,CAAA;AACrD,eAAO,MAAM,8BAA8B,QAAe,CAAA;AAE1D,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAA+D,CAAA;AAE/G,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,WAAW,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,oCAAoC,CAAA;AAEtE,kGAAkG;AAClG,eAAO,MAAM,kBAAkB,WAAW,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAC1C,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAE3C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAY1C,CAAA"}
package/build/consts.js CHANGED
@@ -1,6 +1,3 @@
1
- import { contract, protocol, schema, typed } from '@owlmeans/entrypoint';
2
- import { backend, route, RouteMethod } from '@owlmeans/route';
3
- import { GUARD_ED25519 } from '@owlmeans/server-app';
4
1
  import { INTERNAL_PAYGATE, LIMIT_GATE } from '@owlmeans/payment';
5
2
  export { INTERNAL_PAYGATE, LIMIT_GATE };
6
3
  export const STRIPE_PAYGATE_ALIAS = 'stripe';
@@ -16,6 +13,12 @@ export const STRIPE_SIGNATURE = 'Stripe-Signature';
16
13
  * with `declarePaymentPricing({ stripe: { fxApiVersion } })` once Stripe moves the API or renames
17
14
  * the preview.
18
15
  */
16
+ /**
17
+ * The Stripe API version every client of this package is pinned to (the one stripe-node 17 defaulted to).
18
+ * Moving it re-creates the stored webhook endpoints with their payload shapes, so it moves together with
19
+ * the readers of `current_period_*`, an invoice's subscription and a credit note's refund.
20
+ */
21
+ export const STRIPE_PINNED_API_VERSION = '2025-02-24.acacia';
19
22
  export const STRIPE_FX_QUOTES_API_VERSION = '2025-07-30.preview';
20
23
  export const GATEWAY_SERVICE = 'payment-gateway';
21
24
  export const PAYMENT_OBSERVER = 'payment-observer';
@@ -89,35 +92,4 @@ export const WEBHOOK_EVENTS = Object.freeze([
89
92
  'charge.dispute.created', 'charge.dispute.closed', 'charge.dispute.funds_withdrawn',
90
93
  'charge.dispute.funds_reinstated',
91
94
  ]);
92
- const PaygateParamsSchema = schema({
93
- type: 'object', properties: { paygate: { type: 'string' } }, required: ['paygate'],
94
- additionalProperties: false,
95
- });
96
- const ResyncResultSchema = schema({
97
- type: 'object', properties: { ok: { type: 'boolean' } }, required: ['ok'],
98
- additionalProperties: false,
99
- });
100
- const ResyncSubscriptionsResultSchema = schema({
101
- type: 'object',
102
- properties: { scanned: { type: 'number' }, updated: { type: 'number' } },
103
- required: ['scanned', 'updated'],
104
- additionalProperties: false,
105
- });
106
- const aliases = {
107
- base: 'payment-gate',
108
- webhook: 'payment-gate:webhook',
109
- resync: 'payment-gate:resync',
110
- resyncSubscriptions: 'payment-gate:resync-subscriptions',
111
- };
112
- const base = protocol(route(aliases.base, '/payment-gate', backend()), contract());
113
- /** Embedded gateway protocol tree; the alias strings are private adapter details. */
114
- export const paymentGate = {
115
- base,
116
- /** Public: Stripe signs the raw body, so no application guard may sit in front of it. */
117
- webhook: protocol(route(aliases.webhook, '/webhook/:paygate', backend({ parent: base, method: RouteMethod.POST })), contract.request({ params: PaygateParamsSchema }, typed())),
118
- /** Re-sync products, prices, the portal configuration and the webhook endpoint. */
119
- resync: protocol(route(aliases.resync, '/resync', backend({ parent: base, method: RouteMethod.POST })), contract(ResyncResultSchema), { guards: GUARD_ED25519 }),
120
- /** Re-read every live paygate subscription and apply it as a webhook would. */
121
- resyncSubscriptions: protocol(route(aliases.resyncSubscriptions, '/resync-subscriptions', backend({ parent: base, method: RouteMethod.POST })), contract(ResyncSubscriptionsResultSchema), { guards: GUARD_ED25519 }),
122
- };
123
95
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGhE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AAEvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAA;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAA;AACtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAA;AACpE,gLAAgL;AAChL,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAA;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAA;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAA;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAA;AAChD,MAAM,CAAC,MAA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