@fantastic.dev/better-stripe 0.28.6 → 0.29.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 +6 -0
- package/MIGRATION.md +6 -0
- package/README.md +5 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +28 -8
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutCollectedInput.d.ts +110 -0
- package/dist/client/connect/payoutCollectedInput.d.ts.map +1 -0
- package/dist/client/connect/payoutCollectedInput.js +70 -0
- package/dist/client/connect/payoutCollectedInput.js.map +1 -0
- package/dist/client/connect/payoutExecution.d.ts +1 -0
- package/dist/client/connect/payoutExecution.d.ts.map +1 -1
- package/dist/client/connect/payoutExecution.js +94 -67
- package/dist/client/connect/payoutExecution.js.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +16 -4
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.js +9 -6
- package/dist/client/connect/payoutExecutionTestHelpers.js.map +1 -1
- package/dist/client/connect/payoutPreview.d.ts +1 -0
- package/dist/client/connect/payoutPreview.d.ts.map +1 -1
- package/dist/client/connect/payoutPreview.js +31 -19
- package/dist/client/connect/payoutPreview.js.map +1 -1
- package/dist/client/connect/payoutQualification.d.ts +7 -1
- package/dist/client/connect/payoutQualification.d.ts.map +1 -1
- package/dist/client/connect/payoutQualification.js +34 -19
- package/dist/client/connect/payoutQualification.js.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +14 -4
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.js +4 -1
- package/dist/client/connect/payoutWorker.js.map +1 -1
- package/dist/client/costRecovery.d.ts +5 -0
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +5 -0
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +4 -0
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +175 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/costRecovery/mutations.js +1 -1
- package/dist/component/costRecovery/queries.d.ts +9 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -1
- package/dist/component/costRecovery/queries.js +20 -0
- package/dist/component/costRecovery/queries.js.map +1 -1
- package/dist/component/earnings/triggers.d.ts +16 -6
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/adoption.d.ts +6 -0
- package/dist/component/payoutRelease/adoption.d.ts.map +1 -1
- package/dist/component/payoutRelease/helpers.d.ts +4 -1
- package/dist/component/payoutRelease/helpers.d.ts.map +1 -1
- package/dist/component/payoutRelease/helpers.js +17 -10
- package/dist/component/payoutRelease/helpers.js.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts +20 -0
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +14 -2
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/planning.d.ts +4 -0
- package/dist/component/payoutRelease/planning.d.ts.map +1 -1
- package/dist/component/payoutRelease/planning.js +4 -2
- package/dist/component/payoutRelease/planning.js.map +1 -1
- package/dist/component/payoutRelease/preview.d.ts +2 -0
- package/dist/component/payoutRelease/preview.d.ts.map +1 -1
- package/dist/component/payoutRelease/preview.js +2 -0
- package/dist/component/payoutRelease/preview.js.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts +11 -0
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.d.ts +17 -2
- package/dist/component/payoutRelease/schema.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.js +3 -0
- package/dist/component/payoutRelease/schema.js.map +1 -1
- package/dist/component/payoutSnapshots/financial.d.ts +35 -0
- package/dist/component/payoutSnapshots/financial.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/financial.js +89 -0
- package/dist/component/payoutSnapshots/financial.js.map +1 -0
- package/dist/component/payoutSnapshots/liabilities.d.ts +7 -0
- package/dist/component/payoutSnapshots/liabilities.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/liabilities.js +18 -0
- package/dist/component/payoutSnapshots/liabilities.js.map +1 -0
- package/dist/component/payoutSnapshots/localState.d.ts +2 -0
- package/dist/component/payoutSnapshots/localState.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/localState.js +6 -3
- package/dist/component/payoutSnapshots/localState.js.map +1 -1
- package/dist/component/payoutSnapshots/mutations.d.ts +6 -0
- package/dist/component/payoutSnapshots/mutations.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/mutations.js +2 -0
- package/dist/component/payoutSnapshots/mutations.js.map +1 -1
- package/dist/component/payoutSnapshots/queries.d.ts +133 -0
- package/dist/component/payoutSnapshots/queries.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/queries.js +84 -0
- package/dist/component/payoutSnapshots/queries.js.map +1 -0
- package/dist/component/payoutSnapshots/revisions.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/revisions.js +19 -0
- package/dist/component/payoutSnapshots/revisions.js.map +1 -1
- package/dist/component/payoutSnapshots/schema.d.ts +15 -5
- package/dist/component/payoutSnapshots/schema.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/schema.js +3 -1
- package/dist/component/payoutSnapshots/schema.js.map +1 -1
- package/dist/component/payoutWorker/mutations.d.ts.map +1 -1
- package/dist/component/payoutWorker/mutations.js +3 -1
- package/dist/component/payoutWorker/mutations.js.map +1 -1
- package/dist/component/schema.d.ts +14 -4
- package/dist/react/workflows/payout-attempt-state.d.ts.map +1 -1
- package/dist/react/workflows/payout-attempt-state.js +3 -0
- package/dist/react/workflows/payout-attempt-state.js.map +1 -1
- package/dist/react/workflows/payout-progress-state.d.ts.map +1 -1
- package/dist/react/workflows/payout-progress-state.js +3 -0
- package/dist/react/workflows/payout-progress-state.js.map +1 -1
- package/docs/settlement.md +75 -16
- package/package.json +1 -1
- package/src/client/connect/payoutCollectedInput.ts +120 -0
- package/src/client/connect/payoutExecution.ts +116 -84
- package/src/client/connect/payoutExecutionTestHelpers.ts +19 -6
- package/src/client/connect/payoutLargeHistory.test.ts +222 -0
- package/src/client/connect/payoutLiabilityVersion.test.ts +221 -0
- package/src/client/connect/payoutPreview.ts +42 -24
- package/src/client/connect/payoutQualification.ts +62 -21
- package/src/client/connect/payoutWorker.ts +4 -1
- package/src/client/costRecovery.ts +8 -0
- package/src/component/_generated/api.ts +6 -0
- package/src/component/_generated/component.ts +203 -0
- package/src/component/costRecovery/mutations.ts +1 -1
- package/src/component/costRecovery/queries.ts +21 -0
- package/src/component/payoutRelease/helpers.ts +19 -11
- package/src/component/payoutRelease/mutations.ts +18 -1
- package/src/component/payoutRelease/planning.ts +7 -1
- package/src/component/payoutRelease/preview.ts +2 -0
- package/src/component/payoutRelease/schema.ts +3 -0
- package/src/component/payoutSnapshots/financial.ts +121 -0
- package/src/component/payoutSnapshots/liabilities.ts +25 -0
- package/src/component/payoutSnapshots/localState.ts +7 -3
- package/src/component/payoutSnapshots/mutations.ts +2 -0
- package/src/component/payoutSnapshots/queries.ts +102 -0
- package/src/component/payoutSnapshots/revisions.ts +26 -0
- package/src/component/payoutSnapshots/schema.ts +3 -0
- package/src/component/payoutWorker/mutations.ts +3 -1
- package/src/react/workflows/payout-attempt-state.ts +6 -0
- package/src/react/workflows/payout-progress-state.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout-progress-state.d.ts","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,SAA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AI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC7D,QAAQ,CAAC,EAAE;YACT,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;YAClB,OAAO,EAAE,MAAM,CAAC;YAChB,cAAc,EAAE,MAAM,CAAC;YACvB,YAAY,EAAE,MAAM,CAAC;SACtB,EAAE,CAAC;KACL,CAAC;CACH,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EACF,IAAI,CACF,YAAY,EACZ,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,cAAc,GAAG,eAAe,CACpE,GACD,IAAI,GACJ,SAAS,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,SAAS,CAAC;CACtD,CAAC;
|
|
1
|
+
{"version":3,"file":"payout-progress-state.d.ts","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC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reasons = {
|
|
|
9
9
|
payout_unidentified: "A previous payout outcome needs reconciliation. No replacement payout will be created blindly.",
|
|
10
10
|
observations_stale: "Provider observations expired. Refresh the assessment.",
|
|
11
11
|
expired: "The custom holding deadline has passed. Eligibility is unavailable until the payout schedule is restored and verified.",
|
|
12
|
+
collection_pending: "Complete payout history is still being collected. This collection has not requested a new bank payout; the automatic worker will resume the same collection.",
|
|
13
|
+
collection_invalidated: "Payout history changed during collection. A fresh assessment is required before funds can qualify.",
|
|
14
|
+
collection_requires_action: "This account requires a server action to collect its complete payout history.",
|
|
12
15
|
snapshot_limit: "This account needs continued history reconciliation before eligibility can be assessed.",
|
|
13
16
|
policy_changed: "Payout settings changed. Refresh the assessment.",
|
|
14
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout-progress-state.js","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAyEtD,MAAM,OAAO,GAA2B;IACtC,eAAe,EACb,iFAAiF;IACnF,sBAAsB,EACpB,gGAAgG;IAClG,0BAA0B,EACxB,4EAA4E;IAC9E,mBAAmB,EACjB,0FAA0F;IAC5F,aAAa,EACX,2EAA2E;IAC7E,mBAAmB,EACjB,gGAAgG;IAClG,kBAAkB,EAAE,wDAAwD;IAC5E,OAAO,EACL,wHAAwH;IAC1H,cAAc,EACZ,yFAAyF;IAC3F,cAAc,EAAE,kDAAkD;CACnE,CAAC;AACF,MAAM,UAAU,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,MAAM,GAAG,OAAO,GACI;IACpB,IAAI,WAAW,IAAI,WAAW,CAAC,QAAQ,KAAK,QAAQ;QAClD,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;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OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBAC/C,GAAG,MAAM;oBACT,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;oBACxC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;oBAC3C,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS;wBACrC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;oBACrD,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS;wBACrC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;iBACtD,CAAC,CAAC,CAAC;YACN,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"payout-progress-state.js","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAyEtD,MAAM,OAAO,GAA2B;IACtC,eAAe,EACb,iFAAiF;IACnF,sBAAsB,EACpB,gGAAgG;IAClG,0BAA0B,EACxB,4EAA4E;IAC9E,mBAAmB,EACjB,0FAA0F;IAC5F,aAAa,EACX,2EAA2E;IAC7E,mBAAmB,EACjB,gGAAgG;IAClG,kBAAkB,EAAE,wDAAwD;IAC5E,OAAO,EACL,wHAAwH;IAC1H,kBAAkB,EAChB,8JAA8J;IAChK,sBAAsB,EACpB,oGAAoG;IACtG,0BAA0B,EACxB,+EAA+E;IACjF,cAAc,EACZ,yFAAyF;IAC3F,cAAc,EAAE,kDAAkD;CACnE,CAAC;AACF,MAAM,U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CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;oBACxD,GAAG;oBACH,KAAK;oBACL,MAAM,EAAE,KAAK;oBACb,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC;iBAC9B,CAAC,CAAC,CAAC;gBACJ,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBAC/C,GAAG,MAAM;oBACT,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;oBACxC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;oBAC3C,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS;wBACrC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;oBACrD,GAAG,CAAC,MAAM,CAAC,cAAc,KAAK,SAAS;wBACrC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;iBACtD,CAAC,CAAC,CAAC;YACN,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/docs/settlement.md
CHANGED
|
@@ -479,13 +479,13 @@ is canceled on replay, and a new scheduled operation can collect fresh receipts.
|
|
|
479
479
|
Below-threshold money remains owed. The numeric provider floor remains `null`
|
|
480
480
|
unless a supported provider contract exposes it.
|
|
481
481
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
482
|
+
The direct component snapshot remains bounded at 100 source/claim rows. The SDK
|
|
483
|
+
switches to a complete paginated manifest above that boundary and binds its
|
|
484
|
+
verified membership to the financial claim. It never pays from a partial page.
|
|
485
|
+
Provider history uses a 1–100 page budget, default 10; exhaustion stays held.
|
|
486
|
+
Use the separate historical import and funded activation contract below for known
|
|
487
|
+
old funds; a local manifest is not historical-adoption proof. Unknown funds and
|
|
488
|
+
unsupported accounts keep explicit migration holds.
|
|
489
489
|
|
|
490
490
|
Sources: [payout creation and source balance selection](https://docs.stripe.com/api/payouts/create),
|
|
491
491
|
[complete balance history and automatic-only payout filtering](https://docs.stripe.com/api/balance_transactions/list).
|
|
@@ -741,9 +741,10 @@ attempt. Bank arrival dates remain separate provider data from
|
|
|
741
741
|
`getPayoutSnapshot`.
|
|
742
742
|
|
|
743
743
|
Stripe-managed recipients keep Stripe's default automatic schedule. This preview
|
|
744
|
-
requires a ready custom policy
|
|
745
|
-
region
|
|
746
|
-
|
|
744
|
+
requires a ready custom policy, verified complete provider history, the supported
|
|
745
|
+
region/control capabilities and payout rail. The SDK automatically collects a
|
|
746
|
+
paginated local manifest when the small direct snapshot exceeds 100 rows; a
|
|
747
|
+
partial collection never supplies an eligibility amount.
|
|
747
748
|
|
|
748
749
|
## Resumable local collections
|
|
749
750
|
|
|
@@ -754,8 +755,8 @@ components. The public page shape remains `page`, `continueCursor` and `isDone`.
|
|
|
754
755
|
Treat cursors as opaque and restart cached pages at a null cursor when upgrading
|
|
755
756
|
these readers. Use the package's discard operation for an obsolete read-only
|
|
756
757
|
collection; never erase financially bound or unresolved payout state to restart
|
|
757
|
-
a scan.
|
|
758
|
-
|
|
758
|
+
a scan. The automatic SDK qualification path uses these pages when a direct
|
|
759
|
+
snapshot exceeds 100 lifetime source or claim rows.
|
|
759
760
|
|
|
760
761
|
An authorized host worker can collect the local recipient ledger in bounded
|
|
761
762
|
steps, retaining its cursor and step number across restarts:
|
|
@@ -788,15 +789,31 @@ stop collection with an explicit reason.
|
|
|
788
789
|
|
|
789
790
|
`local_ready` describes a read-only local manifest. Complete provider receipts,
|
|
790
791
|
provider history and monetary claim binding are still required before a payout.
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
792
|
+
The SDK verifies every source against Stripe, fetching at most five source
|
|
793
|
+
receipts concurrently, and checks the complete selected-currency provider history.
|
|
794
|
+
The monetary transaction then checks the collection's owner, policy, full source
|
|
795
|
+
membership, allocation rollups and current risk revision. A qualifying collection
|
|
796
|
+
is bound to the immutable payout claim, including that claim's own reservation
|
|
797
|
+
writes. The risk revision is checked again before the provider attempt. A later
|
|
798
|
+
reversal, fee or competing claim cannot silently change the request.
|
|
799
|
+
|
|
800
|
+
`collection_pending` retains the recurring worker operation and resumes its local
|
|
801
|
+
cursor on a subsequent scheduled check. `collection_invalidated` requires a new
|
|
802
|
+
assessment. Preview/qualification on a query-only context returns
|
|
803
|
+
`collection_requires_action` for larger histories; use an authorized server action.
|
|
804
|
+
A bank payout is not created by collecting or previewing. Complete provider history
|
|
805
|
+
still has the caller's `maxPages` budget, and claims must fit Convex's argument,
|
|
806
|
+
transaction and document limits. Budget errors never erase financial records or
|
|
807
|
+
qualify a partial manifest; use operator recovery for an unsupported workload.
|
|
794
808
|
|
|
795
809
|
After a read-only collection is no longer needed, repeatedly call
|
|
796
810
|
`discardSnapshot(ctx, { accountId, ownerKey, operationKey: collectionKey })` until
|
|
797
811
|
it returns `null`. Cleanup removes only collection caches. Read-only collection
|
|
798
812
|
leases last 24 hours. Financially bound collections reject read-only cleanup and
|
|
799
|
-
expiry
|
|
813
|
+
expiry. Once an attempt is durably marked or an unattempted claim is canceled,
|
|
814
|
+
its cache becomes discardable; the claim retains its own immutable observations
|
|
815
|
+
and reservations. An unknown provider outcome keeps those reservations, even
|
|
816
|
+
when the disposable cache has been removed.
|
|
800
817
|
|
|
801
818
|
### Development reset safeguards
|
|
802
819
|
|
|
@@ -825,3 +842,45 @@ entitlement. Refunds/reversals still reduce qualifying funds. Provider floors
|
|
|
825
842
|
remain provider-enforced and numerically unknown when not exposed. Reassess fresh
|
|
826
843
|
receipts and balances on the next scheduled attempt rather than manually
|
|
827
844
|
recreating uncertain requests.
|
|
845
|
+
|
|
846
|
+
### Versioned recovery liabilities
|
|
847
|
+
|
|
848
|
+
Resolve seller refund/dispute costs and their account version in one component query:
|
|
849
|
+
|
|
850
|
+
```ts
|
|
851
|
+
const quote = await stripe.costRecovery.payoutQuote(ctx, {
|
|
852
|
+
accountId,
|
|
853
|
+
scopeKey: authorizedRecoveryScope,
|
|
854
|
+
currency,
|
|
855
|
+
});
|
|
856
|
+
await stripe.payoutPolicy.worker.run(ctx, {
|
|
857
|
+
accountId,
|
|
858
|
+
ownerKey,
|
|
859
|
+
currency,
|
|
860
|
+
...quote,
|
|
861
|
+
});
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
Use the same quote with `preview` or `release`. The amount is
|
|
865
|
+
`max(0, amountDue - collectedAmount)` for that authorized recovery scope;
|
|
866
|
+
invoice reservations remain owed until collection is verified. Provider-collected
|
|
867
|
+
costs are not deducted again. Keep the amount and `liabilityRevision` together,
|
|
868
|
+
for the same account, scope and currency. Use an authorized user-level scope
|
|
869
|
+
when costs span communities; the host remains responsible for including all
|
|
870
|
+
other authorized debts/reserves and for versioning state outside this component.
|
|
871
|
+
The package's revision does not version an external host database.
|
|
872
|
+
|
|
873
|
+
Recovery amount changes enter the payout risk journal. The financial boundary
|
|
874
|
+
rejects an old quote, and a bound claim checks the current risk revision again
|
|
875
|
+
before its attempt. Its own reservation writes are included in the binding.
|
|
876
|
+
A source/fee/recovery change requires a new assessment; unattempted reservations
|
|
877
|
+
are canceled exactly on replay. An attempted or unknown payout still reconciles
|
|
878
|
+
its immutable request. New claims retain the approved `independentLiabilities`
|
|
879
|
+
and `liabilityRevision` for audit.
|
|
880
|
+
|
|
881
|
+
Legacy unversioned calls remain valid for accounts without recovery balance
|
|
882
|
+
records. Once such records exist, obtain a quote; missing versions fail safely.
|
|
883
|
+
The example's worker and preview adapters do this automatically. Old unattempted
|
|
884
|
+
claims are canceled on replay, rather than retroactively supplied with a guessed
|
|
885
|
+
quote. Restart obsolete read-only collections after upgrading their fingerprint
|
|
886
|
+
format; never clear unresolved financial claims to bypass validation.
|
package/package.json
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Infer } from "convex/values";
|
|
2
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
3
|
+
import type { snapshotDoc } from "../../component/payoutSnapshots/schema.js";
|
|
4
|
+
import type { transferDocValidator } from "../../component/connect/validators.js";
|
|
5
|
+
import type { claimDoc } from "../../component/payoutRelease/schema.js";
|
|
6
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
7
|
+
import {
|
|
8
|
+
collectPayoutSnapshot,
|
|
9
|
+
discardPayoutSnapshot,
|
|
10
|
+
} from "./payoutCollection.js";
|
|
11
|
+
export type CollectionRef = {
|
|
12
|
+
accountId: string;
|
|
13
|
+
ownerKey: string;
|
|
14
|
+
operationKey: string;
|
|
15
|
+
snapshotId: Infer<typeof snapshotDoc>["_id"];
|
|
16
|
+
};
|
|
17
|
+
export type PayoutInput = {
|
|
18
|
+
status: "ready";
|
|
19
|
+
transfers: Infer<typeof transferDocValidator>[];
|
|
20
|
+
claims: Infer<typeof claimDoc>[];
|
|
21
|
+
};
|
|
22
|
+
export async function collectLargePayoutInput(
|
|
23
|
+
component: Component,
|
|
24
|
+
ctx: RunCtx,
|
|
25
|
+
opts: { accountId: string; ownerKey: string; operationKey?: string },
|
|
26
|
+
maxPages: number,
|
|
27
|
+
) {
|
|
28
|
+
if (!ctx.runMutation)
|
|
29
|
+
return { status: "held" as const, reason: "collection_requires_action" };
|
|
30
|
+
const policy = (await ctx.runQuery(
|
|
31
|
+
componentRef(component, "payoutPolicy/queries/get"),
|
|
32
|
+
{ accountId: opts.accountId, ownerKey: opts.ownerKey },
|
|
33
|
+
)) as { revision: number } | null;
|
|
34
|
+
const scope = {
|
|
35
|
+
accountId: opts.accountId,
|
|
36
|
+
ownerKey: opts.ownerKey,
|
|
37
|
+
operationKey: opts.operationKey ?? crypto.randomUUID(),
|
|
38
|
+
};
|
|
39
|
+
let h = await collectPayoutSnapshot(component, ctx, {
|
|
40
|
+
...scope,
|
|
41
|
+
expectedRevision: policy?.revision ?? -1,
|
|
42
|
+
});
|
|
43
|
+
for (
|
|
44
|
+
let i = 0;
|
|
45
|
+
i < maxPages * 25 && h.phase !== "local_ready" && h.phase !== "invalidated";
|
|
46
|
+
i++
|
|
47
|
+
)
|
|
48
|
+
h = await collectPayoutSnapshot(component, ctx, {
|
|
49
|
+
...scope,
|
|
50
|
+
expectedRevision: h.expectedRevision,
|
|
51
|
+
expectedStep: h.step,
|
|
52
|
+
});
|
|
53
|
+
const collection = { ...scope, snapshotId: h._id };
|
|
54
|
+
if (h.phase !== "local_ready")
|
|
55
|
+
return {
|
|
56
|
+
status: "held" as const,
|
|
57
|
+
reason:
|
|
58
|
+
h.phase === "invalidated"
|
|
59
|
+
? "collection_invalidated"
|
|
60
|
+
: "collection_pending",
|
|
61
|
+
collection,
|
|
62
|
+
};
|
|
63
|
+
async function pages<T>(
|
|
64
|
+
kind: "sources" | "claims",
|
|
65
|
+
count: number,
|
|
66
|
+
): Promise<T[]> {
|
|
67
|
+
const rows: T[] = [];
|
|
68
|
+
let cursor: string | null = null;
|
|
69
|
+
for (let i = 0; i <= Math.ceil(count / 25); i++) {
|
|
70
|
+
const page = (await ctx.runQuery(
|
|
71
|
+
componentRef(component, `payoutSnapshots/queries/${kind}`),
|
|
72
|
+
{ ...scope, paginationOpts: { cursor, numItems: 25 } },
|
|
73
|
+
)) as { page: T[]; isDone: boolean; continueCursor: string };
|
|
74
|
+
rows.push(...page.page);
|
|
75
|
+
if (page.isDone) {
|
|
76
|
+
if (rows.length !== count)
|
|
77
|
+
throw new Error("Collected payout membership changed.");
|
|
78
|
+
return rows;
|
|
79
|
+
}
|
|
80
|
+
if (!page.continueCursor || page.continueCursor === cursor)
|
|
81
|
+
throw new Error("Collected payout cursor did not advance.");
|
|
82
|
+
cursor = page.continueCursor;
|
|
83
|
+
}
|
|
84
|
+
throw new Error(
|
|
85
|
+
"Collected payout page budget exhausted; preserve collection for retry.",
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
status: "ready" as const,
|
|
90
|
+
transfers: await pages<Infer<typeof transferDocValidator>>(
|
|
91
|
+
"sources",
|
|
92
|
+
h.sourceCount,
|
|
93
|
+
),
|
|
94
|
+
claims: await pages<Infer<typeof claimDoc>>("claims", h.claimCount),
|
|
95
|
+
collection,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Bound unattempted claims retain their cache. Attempted/terminal claims keep their own immutable financial proof. */
|
|
99
|
+
export async function discardQualificationInput(
|
|
100
|
+
component: Component,
|
|
101
|
+
ctx: RunCtx,
|
|
102
|
+
collection?: CollectionRef,
|
|
103
|
+
keep = false,
|
|
104
|
+
) {
|
|
105
|
+
if (!collection || keep || !ctx.runMutation) return;
|
|
106
|
+
const { snapshotId: _, ...scope } = collection;
|
|
107
|
+
const h = (await ctx.runQuery(
|
|
108
|
+
componentRef(component, "payoutSnapshots/queries/get"),
|
|
109
|
+
scope,
|
|
110
|
+
)) as Infer<typeof snapshotDoc> | null;
|
|
111
|
+
if (!h?.readOnly) return;
|
|
112
|
+
for (let i = 0; i < 1000; i++)
|
|
113
|
+
if (
|
|
114
|
+
!(await discardPayoutSnapshot(component, ctx, {
|
|
115
|
+
...scope,
|
|
116
|
+
batchSize: 100,
|
|
117
|
+
}))
|
|
118
|
+
)
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { discardQualificationInput } from "./payoutCollectedInput.js";
|
|
1
2
|
import type Stripe from "stripe";
|
|
2
3
|
import type { Infer } from "convex/values";
|
|
3
4
|
import type { Component, RunCtx } from "../helpers.js";
|
|
@@ -20,6 +21,7 @@ export type PayoutReleaseOptions = {
|
|
|
20
21
|
currency: string;
|
|
21
22
|
/** Host supplies all authorized off-provider debts/reserves, without double counting provider receipt debits. */
|
|
22
23
|
independentLiabilities: number;
|
|
24
|
+
liabilityRevision?: number;
|
|
23
25
|
maxPages?: number;
|
|
24
26
|
};
|
|
25
27
|
type Held = { status: "held"; reason: string };
|
|
@@ -62,11 +64,20 @@ export async function releaseRecipientPayout(
|
|
|
62
64
|
if (existing) {
|
|
63
65
|
if (existing.currency !== opts.currency)
|
|
64
66
|
throw new Error("Payout claim currency cannot be changed.");
|
|
65
|
-
if (existing.attemptedAt !== undefined || existing.status !== "reserved")
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
if (existing.attemptedAt !== undefined || existing.status !== "reserved") {
|
|
68
|
+
try {
|
|
69
|
+
return await reconcileRecipientPayout(stripe, component, ctx, {
|
|
70
|
+
...identity,
|
|
71
|
+
maxPages,
|
|
72
|
+
});
|
|
73
|
+
} finally {
|
|
74
|
+
if (existing.snapshotId)
|
|
75
|
+
await discardQualificationInput(component, ctx, {
|
|
76
|
+
...identity,
|
|
77
|
+
snapshotId: existing.snapshotId,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
70
81
|
// A crash before the attempt has no provider side effect. Release its exact
|
|
71
82
|
// reservations; the next scheduled operation must collect fresh receipts.
|
|
72
83
|
const claim = (await runMutationOrThrow(
|
|
@@ -74,6 +85,11 @@ export async function releaseRecipientPayout(
|
|
|
74
85
|
componentRef(component, "payoutRelease/mutations/cancelUnattempted"),
|
|
75
86
|
identity,
|
|
76
87
|
)) as Claim;
|
|
88
|
+
if (existing.snapshotId)
|
|
89
|
+
await discardQualificationInput(component, ctx, {
|
|
90
|
+
...identity,
|
|
91
|
+
snapshotId: existing.snapshotId,
|
|
92
|
+
});
|
|
77
93
|
return { status: "terminal", claim };
|
|
78
94
|
}
|
|
79
95
|
const controls = await verify();
|
|
@@ -86,93 +102,109 @@ export async function releaseRecipientPayout(
|
|
|
86
102
|
opts,
|
|
87
103
|
maxPages,
|
|
88
104
|
);
|
|
89
|
-
if (proof.status !== "verified") return proof;
|
|
90
|
-
const claim = (await runMutationOrThrow(
|
|
91
|
-
ctx,
|
|
92
|
-
componentRef(component, "payoutRelease/mutations/claim"),
|
|
93
|
-
{
|
|
94
|
-
...identity,
|
|
95
|
-
expectedRevision: controls.policy.revision,
|
|
96
|
-
currency: opts.currency,
|
|
97
|
-
destinationId: proof.destinationId,
|
|
98
|
-
providerAvailable: proof.providerAvailable,
|
|
99
|
-
independentLiabilities: opts.independentLiabilities,
|
|
100
|
-
observations: proof.observations,
|
|
101
|
-
},
|
|
102
|
-
)) as Claim | Held;
|
|
103
|
-
if (claim.status === "held") return claim;
|
|
104
|
-
// Another caller can win this operation while receipts were being collected.
|
|
105
|
-
if (claim.attemptedAt !== undefined || claim.status !== "reserved")
|
|
106
|
-
return reconcileRecipientPayout(stripe, component, ctx, {
|
|
107
|
-
...identity,
|
|
108
|
-
maxPages,
|
|
109
|
-
});
|
|
110
|
-
const latest = await verify();
|
|
111
|
-
if (
|
|
112
|
-
latest.status !== "verified" ||
|
|
113
|
-
!("policy" in latest) ||
|
|
114
|
-
latest.policy.revision !== controls.policy.revision
|
|
115
|
-
) {
|
|
116
|
-
await runMutationOrThrow(
|
|
117
|
-
ctx,
|
|
118
|
-
componentRef(component, "payoutRelease/mutations/cancelUnattempted"),
|
|
119
|
-
identity,
|
|
120
|
-
);
|
|
121
|
-
return {
|
|
122
|
-
status: "held",
|
|
123
|
-
reason: latest.status === "verified" ? "policy_changed" : latest.status,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
await runMutationOrThrow(
|
|
127
|
-
ctx,
|
|
128
|
-
componentRef(component, "payoutRelease/mutations/beginAttempt"),
|
|
129
|
-
identity,
|
|
130
|
-
);
|
|
131
|
-
let payout: Stripe.Payout;
|
|
132
105
|
try {
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
method: "standard",
|
|
139
|
-
source_type: "card",
|
|
140
|
-
metadata: { bsPayoutClaim: claim.operationKey },
|
|
141
|
-
},
|
|
106
|
+
if (proof.status !== "verified")
|
|
107
|
+
return { status: "held", reason: proof.reason };
|
|
108
|
+
const claim = (await runMutationOrThrow(
|
|
109
|
+
ctx,
|
|
110
|
+
componentRef(component, "payoutRelease/mutations/claim"),
|
|
142
111
|
{
|
|
143
|
-
|
|
144
|
-
|
|
112
|
+
...identity,
|
|
113
|
+
expectedRevision: controls.policy.revision,
|
|
114
|
+
currency: opts.currency,
|
|
115
|
+
destinationId: proof.destinationId,
|
|
116
|
+
providerAvailable: proof.providerAvailable,
|
|
117
|
+
independentLiabilities: opts.independentLiabilities,
|
|
118
|
+
observations: proof.observations,
|
|
119
|
+
...(opts.liabilityRevision === undefined
|
|
120
|
+
? {}
|
|
121
|
+
: { liabilityRevision: opts.liabilityRevision }),
|
|
122
|
+
...(proof.collection
|
|
123
|
+
? { snapshotId: proof.collection.snapshotId }
|
|
124
|
+
: {}),
|
|
145
125
|
},
|
|
146
|
-
);
|
|
147
|
-
|
|
126
|
+
)) as Claim | Held;
|
|
127
|
+
if (claim.status === "held") return claim;
|
|
128
|
+
// Another caller can win this operation while receipts were being collected.
|
|
129
|
+
if (claim.attemptedAt !== undefined || claim.status !== "reserved")
|
|
130
|
+
return reconcileRecipientPayout(stripe, component, ctx, {
|
|
131
|
+
...identity,
|
|
132
|
+
maxPages,
|
|
133
|
+
});
|
|
134
|
+
const latest = await verify();
|
|
148
135
|
if (
|
|
149
|
-
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
"code" in error &&
|
|
153
|
-
["balance_insufficient", "amount_too_small"].includes(
|
|
154
|
-
String(error.code),
|
|
155
|
-
) &&
|
|
156
|
-
"requestId" in error &&
|
|
157
|
-
typeof error.requestId === "string" &&
|
|
158
|
-
/^req_\w+$/.test(error.requestId)
|
|
136
|
+
latest.status !== "verified" ||
|
|
137
|
+
!("policy" in latest) ||
|
|
138
|
+
latest.policy.revision !== controls.policy.revision
|
|
159
139
|
) {
|
|
160
|
-
|
|
140
|
+
await runMutationOrThrow(
|
|
161
141
|
ctx,
|
|
162
|
-
componentRef(component, "payoutRelease/mutations/
|
|
142
|
+
componentRef(component, "payoutRelease/mutations/cancelUnattempted"),
|
|
143
|
+
identity,
|
|
144
|
+
);
|
|
145
|
+
return {
|
|
146
|
+
status: "held",
|
|
147
|
+
reason: latest.status === "verified" ? "policy_changed" : latest.status,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
await runMutationOrThrow(
|
|
151
|
+
ctx,
|
|
152
|
+
componentRef(component, "payoutRelease/mutations/beginAttempt"),
|
|
153
|
+
identity,
|
|
154
|
+
);
|
|
155
|
+
let payout: Stripe.Payout;
|
|
156
|
+
try {
|
|
157
|
+
payout = await stripe.payouts.create(
|
|
163
158
|
{
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
amount: claim.amount,
|
|
160
|
+
currency: claim.currency,
|
|
161
|
+
destination: claim.destinationId,
|
|
162
|
+
method: "standard",
|
|
163
|
+
source_type: "card",
|
|
164
|
+
metadata: { bsPayoutClaim: claim.operationKey },
|
|
167
165
|
},
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
{
|
|
167
|
+
stripeAccount: claim.accountId,
|
|
168
|
+
idempotencyKey: `bs:payout-release:${claim.operationKey}`,
|
|
169
|
+
},
|
|
170
|
+
);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (
|
|
173
|
+
error instanceof Error &&
|
|
174
|
+
"type" in error &&
|
|
175
|
+
error.type === "StripeInvalidRequestError" &&
|
|
176
|
+
"code" in error &&
|
|
177
|
+
["balance_insufficient", "amount_too_small"].includes(
|
|
178
|
+
String(error.code),
|
|
179
|
+
) &&
|
|
180
|
+
"requestId" in error &&
|
|
181
|
+
typeof error.requestId === "string" &&
|
|
182
|
+
/^req_\w+$/.test(error.requestId)
|
|
183
|
+
) {
|
|
184
|
+
const saved = (await runMutationOrThrow(
|
|
185
|
+
ctx,
|
|
186
|
+
componentRef(component, "payoutRelease/mutations/recordRejection"),
|
|
187
|
+
{
|
|
188
|
+
...identity,
|
|
189
|
+
requestId: error.requestId,
|
|
190
|
+
code: error.code,
|
|
191
|
+
},
|
|
192
|
+
)) as Claim;
|
|
193
|
+
return { status: "terminal", claim: saved };
|
|
194
|
+
}
|
|
195
|
+
throw error;
|
|
170
196
|
}
|
|
171
|
-
|
|
197
|
+
return await reconcileRecipientPayout(stripe, component, ctx, {
|
|
198
|
+
...identity,
|
|
199
|
+
stripePayoutId: payout.id,
|
|
200
|
+
maxPages,
|
|
201
|
+
});
|
|
202
|
+
} finally {
|
|
203
|
+
await discardQualificationInput(
|
|
204
|
+
component,
|
|
205
|
+
ctx,
|
|
206
|
+
proof.collection,
|
|
207
|
+
proof.status === "held" && proof.reason === "collection_pending",
|
|
208
|
+
);
|
|
172
209
|
}
|
|
173
|
-
return reconcileRecipientPayout(stripe, component, ctx, {
|
|
174
|
-
...identity,
|
|
175
|
-
stripePayoutId: payout.id,
|
|
176
|
-
maxPages,
|
|
177
|
-
});
|
|
178
210
|
}
|
|
@@ -111,12 +111,25 @@ export async function setup(amounts = [600, 400]) {
|
|
|
111
111
|
}),
|
|
112
112
|
},
|
|
113
113
|
balanceTransactions: {
|
|
114
|
-
list: vi.fn(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
list: vi.fn(
|
|
115
|
+
async (params: {
|
|
116
|
+
source?: string;
|
|
117
|
+
limit?: number;
|
|
118
|
+
currency?: string;
|
|
119
|
+
starting_after?: string;
|
|
120
|
+
}) => {
|
|
121
|
+
const rows = transactions.filter(
|
|
122
|
+
(t) =>
|
|
123
|
+
(!params.source || t.source === params.source) &&
|
|
124
|
+
(!params.currency || t.currency === params.currency),
|
|
125
|
+
);
|
|
126
|
+
const start = params.starting_after
|
|
127
|
+
? rows.findIndex((t) => t.id === params.starting_after) + 1
|
|
128
|
+
: 0;
|
|
129
|
+
const data = rows.slice(start, start + (params.limit ?? 100));
|
|
130
|
+
return { data, has_more: start + data.length < rows.length };
|
|
131
|
+
},
|
|
132
|
+
),
|
|
120
133
|
retrieve: vi.fn(async (id: string) =>
|
|
121
134
|
transactions.find((t) => t.id === id),
|
|
122
135
|
),
|