@stacksjs/defaults 0.75.360 → 0.75.361

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.
@@ -68,7 +68,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
68
68
  | `@stacksjs/orm` | [`stacks-orm`](../stacks-orm/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/orm/src/index.ts) | 75 |
69
69
  | `@stacksjs/pagination` | [`stacks-pagination`](../stacks-pagination/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/pagination/src/index.ts) | 0 |
70
70
  | `@stacksjs/path` | [`stacks-path`](../stacks-path/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/path/src/index.ts) | 13 |
71
- | `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) | 35 |
71
+ | `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) | 37 |
72
72
  | `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) | 6 |
73
73
  | `@stacksjs/query-builder` | [`stacks-query-builder`](../stacks-query-builder/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/query-builder/src/index.ts) | 6 |
74
74
  | `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 49 |
@@ -661,7 +661,7 @@ Declared runtime exports: `Payment`, `freshIdempotencyKey`, `stacksIdempotencyKe
661
661
 
662
662
  Local source modules: [src/billable/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/billable/index.ts), [src/checkout-outcome.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/checkout-outcome.ts), [src/connect/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/connect/index.ts), [src/direct-debit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/direct-debit.ts), [src/driver/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/driver/index.ts), [src/drivers/stripe.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/drivers/stripe.ts), [src/idempotency.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/idempotency.ts), [src/payment.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/payment.ts), [src/subscription-state.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/subscription-state.ts), [src/terminal.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/terminal.ts).
663
663
 
664
- Evidence directory: [35 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
664
+ Evidence directory: [37 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
665
665
 
666
666
  ### @stacksjs/push
667
667
 
@@ -218,6 +218,34 @@ after the provider's idempotency window. Pending refunds and differing existing
218
218
  credits remain errors for durable retry/review. It sends no email; applications
219
219
  own receipt delivery.
220
220
 
221
+ For the complete first-purchase flow, `ensureDirectInvoicePrice(account, {
222
+ reference, name, amount, currency, taxCode, interval?, intervalCount? })` creates
223
+ or finds a merchant catalog price using Stripe's durable unique lookup key.
224
+ Prices are inclusive; changed offer terms get a new immutable price. Existing
225
+ prices must still match and be active, including their product/classification.
226
+ The merchant supplies `taxCode`; the helper does not invent classifications.
227
+
228
+ Freeze a `DirectInvoicePurchaseOptions` record with a unique purchase reference,
229
+ original customer/price/amount/currency/tax code, explicit platform percentage,
230
+ Checkout `expiresAt`, optional recurrence/trial and application metadata. Copy
231
+ `directInvoicePurchaseMetadata(account, purchase)` onto Setup Checkout's
232
+ `setup_intent_data.metadata`. Use `directCheckout` in setup mode with a required
233
+ billing address, `customer_update.address: 'auto'`, the same expiry and clear
234
+ localized confirmation text for the approved price, recurrence and trial.
235
+ Persist the quote and serialize its durable reference in the app.
236
+
237
+ `completeDirectInvoicePurchase(setupIntentId, account, purchase)` requires the
238
+ successful off-session setup's original customer and quote binding. It recovers
239
+ one-time invoices or released subscription schedules through complete provider
240
+ lists, holds the first subscription invoice before releasing its schedule, and
241
+ uses `collectDirectInvoice` to collect. Native trial state survives release.
242
+ Paid replays remain read-only even after expiry or product retirement. Missing
243
+ original purchases may only be created before quote expiry and within 24 hours
244
+ of setup creation, when Stripe still guarantees the idempotency key; older
245
+ missing bindings require review, never another purchase. Renewals still need
246
+ the app's durable `invoice.created` hold/collection path. Apply access policy
247
+ from both the collection result and current subscription/refund state.
248
+
221
249
  `directInvoiceTaxFinancials(invoiceId, paymentIntentId, account)` reads canonical
222
250
  collected/credited gross, net and tax plus `requiresReview`. Read it under the
223
251
  application's payment lock alongside `directChargeFinancials`, and compare its
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.360",
5
+ "version": "0.75.361",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.360",
5
+ "version": "0.75.361",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.360",
48
+ "@stacksjs/mobile": "0.75.361",
49
49
  "@stacksjs/sanitizer": "0.2.736",
50
50
  "@stacksjs/stx": "0.2.736",
51
51
  "@xterm/addon-fit": "^0.11.0",