@fantastic.dev/better-stripe 0.23.1 → 0.24.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 +26 -2
- package/README.md +40 -5
- package/dist/client/affiliateRecovery/disputes.d.ts +18 -0
- package/dist/client/affiliateRecovery/disputes.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/disputes.js +33 -0
- package/dist/client/affiliateRecovery/disputes.js.map +1 -0
- package/dist/client/affiliateRecovery/engine.d.ts +29 -0
- package/dist/client/affiliateRecovery/engine.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/engine.js +116 -0
- package/dist/client/affiliateRecovery/engine.js.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts +24 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.js +30 -0
- package/dist/client/affiliateRecovery/payoutGate.js.map +1 -0
- package/dist/client/affiliateRecovery/provider.d.ts +14 -0
- package/dist/client/affiliateRecovery/provider.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/provider.js +96 -0
- package/dist/client/affiliateRecovery/provider.js.map +1 -0
- package/dist/client/affiliateRecovery/review.d.ts +28 -0
- package/dist/client/affiliateRecovery/review.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/review.js +86 -0
- package/dist/client/affiliateRecovery/review.js.map +1 -0
- package/dist/client/affiliateRecovery/validators.d.ts +402 -0
- package/dist/client/affiliateRecovery/validators.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/validators.js +27 -0
- package/dist/client/affiliateRecovery/validators.js.map +1 -0
- package/dist/client/affiliateRecovery.d.ts +131 -0
- package/dist/client/affiliateRecovery.d.ts.map +1 -0
- package/dist/client/affiliateRecovery.js +69 -0
- package/dist/client/affiliateRecovery.js.map +1 -0
- package/dist/client/connect/commissionReceipts.d.ts +4 -0
- package/dist/client/connect/commissionReceipts.d.ts.map +1 -0
- package/dist/client/connect/commissionReceipts.js +17 -0
- package/dist/client/connect/commissionReceipts.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +536 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSync.d.ts +32 -0
- package/dist/client/connect/payoutSync.d.ts.map +1 -0
- package/dist/client/connect/payoutSync.js +48 -0
- package/dist/client/connect/payoutSync.js.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +1509 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.js +62 -0
- package/dist/client/connect/payoutSyncTestHelpers.js.map +1 -0
- package/dist/client/connect/payoutSyncValidation.d.ts +16 -0
- package/dist/client/connect/payoutSyncValidation.d.ts.map +1 -0
- package/dist/client/connect/payoutSyncValidation.js +54 -0
- package/dist/client/connect/payoutSyncValidation.js.map +1 -0
- package/dist/client/connect/payouts.d.ts +3 -1
- package/dist/client/connect/payouts.d.ts.map +1 -1
- package/dist/client/connect/payouts.js +45 -12
- package/dist/client/connect/payouts.js.map +1 -1
- package/dist/client/connect/refundPrincipal.d.ts +4 -0
- package/dist/client/connect/refundPrincipal.d.ts.map +1 -0
- package/dist/client/connect/refundPrincipal.js +21 -0
- package/dist/client/connect/refundPrincipal.js.map +1 -0
- package/dist/client/connect/reversalExecution.d.ts +47 -0
- package/dist/client/connect/reversalExecution.d.ts.map +1 -0
- package/dist/client/connect/reversalExecution.js +84 -0
- package/dist/client/connect/reversalExecution.js.map +1 -0
- package/dist/client/connect/transfers.d.ts +8 -4
- package/dist/client/connect/transfers.d.ts.map +1 -1
- package/dist/client/connect/transfers.js +52 -57
- package/dist/client/connect/transfers.js.map +1 -1
- package/dist/client/index.d.ts +29 -9
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +9 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/readContracts.d.ts +8 -0
- package/dist/client/readContracts.d.ts.map +1 -1
- package/dist/client/readContracts.js +7 -0
- package/dist/client/readContracts.js.map +1 -1
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js +30 -3
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/settlement/reconciliation.d.ts.map +1 -1
- package/dist/client/settlement/reconciliation.js +16 -2
- package/dist/client/settlement/reconciliation.js.map +1 -1
- package/dist/client/webhooks/disputeRecovery.d.ts +4 -0
- package/dist/client/webhooks/disputeRecovery.d.ts.map +1 -0
- package/dist/client/webhooks/disputeRecovery.js +40 -0
- package/dist/client/webhooks/disputeRecovery.js.map +1 -0
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +14 -29
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/component/_generated/component.d.ts +560 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/affiliateEarnings/mutations.d.ts +22 -0
- package/dist/component/affiliateEarnings/mutations.d.ts.map +1 -0
- package/dist/component/affiliateEarnings/mutations.js +160 -0
- package/dist/component/affiliateEarnings/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/mutations.d.ts +25 -0
- package/dist/component/affiliatePayouts/mutations.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/mutations.js +104 -0
- package/dist/component/affiliatePayouts/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/queries.d.ts +23 -0
- package/dist/component/affiliatePayouts/queries.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/queries.js +23 -0
- package/dist/component/affiliatePayouts/queries.js.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts +12 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.js +26 -0
- package/dist/component/affiliatePayouts/recipientGuard.js.map +1 -0
- package/dist/component/affiliateRecovery/accounting.d.ts +28 -0
- package/dist/component/affiliateRecovery/accounting.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/accounting.js +71 -0
- package/dist/component/affiliateRecovery/accounting.js.map +1 -0
- package/dist/component/affiliateRecovery/mutations.d.ts +65 -0
- package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/mutations.js +250 -0
- package/dist/component/affiliateRecovery/mutations.js.map +1 -0
- package/dist/component/affiliateRecovery/queries.d.ts +305 -0
- package/dist/component/affiliateRecovery/queries.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/queries.js +113 -0
- package/dist/component/affiliateRecovery/queries.js.map +1 -0
- package/dist/component/affiliateRecovery/schema.d.ts +171 -0
- package/dist/component/affiliateRecovery/schema.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/schema.js +71 -0
- package/dist/component/affiliateRecovery/schema.js.map +1 -0
- package/dist/component/connect/mutations.d.ts +36 -23
- package/dist/component/connect/mutations.d.ts.map +1 -1
- package/dist/component/connect/mutations.js +11 -151
- package/dist/component/connect/mutations.js.map +1 -1
- package/dist/component/connect/payoutWrites.d.ts +21 -0
- package/dist/component/connect/payoutWrites.d.ts.map +1 -0
- package/dist/component/connect/payoutWrites.js +19 -0
- package/dist/component/connect/payoutWrites.js.map +1 -0
- package/dist/component/connect/queries.d.ts +10 -0
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/queries.js +3 -40
- package/dist/component/connect/queries.js.map +1 -1
- package/dist/component/connect/reversalClaims.d.ts +169 -0
- package/dist/component/connect/reversalClaims.d.ts.map +1 -0
- package/dist/component/connect/reversalClaims.js +176 -0
- package/dist/component/connect/reversalClaims.js.map +1 -0
- package/dist/component/connect/reversalDiagnostics.d.ts +59 -0
- package/dist/component/connect/reversalDiagnostics.d.ts.map +1 -0
- package/dist/component/connect/reversalDiagnostics.js +50 -0
- package/dist/component/connect/reversalDiagnostics.js.map +1 -0
- package/dist/component/connect/reversalReceipts.d.ts +27 -0
- package/dist/component/connect/reversalReceipts.d.ts.map +1 -0
- package/dist/component/connect/reversalReceipts.js +85 -0
- package/dist/component/connect/reversalReceipts.js.map +1 -0
- package/dist/component/connect/schema.d.ts +31 -1
- package/dist/component/connect/schema.d.ts.map +1 -1
- package/dist/component/connect/schema.js +3 -1
- package/dist/component/connect/schema.js.map +1 -1
- package/dist/component/connect/validators.d.ts +49 -1
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/connect/validators.js +2 -0
- package/dist/component/connect/validators.js.map +1 -1
- package/dist/component/earnings/triggers.d.ts +454 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +6 -0
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.js +3 -1
- package/dist/component/payoutRelease/queries.js.map +1 -1
- package/dist/component/payoutSync/helpers.d.ts +44 -0
- package/dist/component/payoutSync/helpers.d.ts.map +1 -0
- package/dist/component/payoutSync/helpers.js +60 -0
- package/dist/component/payoutSync/helpers.js.map +1 -0
- package/dist/component/payoutSync/mutations.d.ts +51 -0
- package/dist/component/payoutSync/mutations.d.ts.map +1 -0
- package/dist/component/payoutSync/mutations.js +88 -0
- package/dist/component/payoutSync/mutations.js.map +1 -0
- package/dist/component/payoutSync/queries.d.ts +16 -0
- package/dist/component/payoutSync/queries.d.ts.map +1 -0
- package/dist/component/payoutSync/queries.js +11 -0
- package/dist/component/payoutSync/queries.js.map +1 -0
- package/dist/component/payoutSync/schema.d.ts +46 -0
- package/dist/component/payoutSync/schema.d.ts.map +1 -0
- package/dist/component/payoutSync/schema.js +22 -0
- package/dist/component/payoutSync/schema.js.map +1 -0
- package/dist/component/payoutSync/validators.d.ts +137 -0
- package/dist/component/payoutSync/validators.d.ts.map +1 -0
- package/dist/component/payoutSync/validators.js +19 -0
- package/dist/component/payoutSync/validators.js.map +1 -0
- package/dist/component/schema.d.ts +268 -1
- package/dist/component/schema.js +11 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/settlement/clawbackSchema.d.ts +161 -0
- package/dist/component/settlement/clawbackSchema.d.ts.map +1 -0
- package/dist/component/settlement/clawbackSchema.js +73 -0
- package/dist/component/settlement/clawbackSchema.js.map +1 -0
- package/dist/component/settlement/clawbacks.d.ts +55 -0
- package/dist/component/settlement/clawbacks.d.ts.map +1 -0
- package/dist/component/settlement/clawbacks.js +146 -0
- package/dist/component/settlement/clawbacks.js.map +1 -0
- package/dist/component/settlement/mutations.d.ts +16 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +48 -0
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +53 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/queries.js +26 -0
- package/dist/component/settlement/queries.js.map +1 -1
- package/dist/react/workflows/AffiliateRecovery.d.ts +46 -0
- package/dist/react/workflows/AffiliateRecovery.d.ts.map +1 -0
- package/dist/react/workflows/AffiliateRecovery.js +84 -0
- package/dist/react/workflows/AffiliateRecovery.js.map +1 -0
- package/dist/react/workflows/index.d.ts +2 -0
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +1 -0
- package/dist/react/workflows/index.js.map +1 -1
- package/dist/testing/affiliate-recovery.d.ts +10 -0
- package/dist/testing/affiliate-recovery.d.ts.map +1 -0
- package/dist/testing/affiliate-recovery.js +126 -0
- package/dist/testing/affiliate-recovery.js.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/testing/index.js.map +1 -1
- package/docs/affiliate-clawbacks.md +306 -0
- package/docs/read-contracts.md +40 -5
- package/docs/settlement.md +17 -0
- package/package.json +2 -1
- package/src/client/affiliateRecovery/disputes.ts +62 -0
- package/src/client/affiliateRecovery/engine.ts +196 -0
- package/src/client/affiliateRecovery/payoutGate.ts +65 -0
- package/src/client/affiliateRecovery/provider.ts +127 -0
- package/src/client/affiliateRecovery/review.ts +117 -0
- package/src/client/affiliateRecovery/validators.ts +38 -0
- package/src/client/affiliateRecovery.ts +173 -0
- package/src/client/connect/commissionReceipts.test.ts +157 -0
- package/src/client/connect/commissionReceipts.ts +23 -0
- package/src/client/connect/payoutSync.test.ts +313 -0
- package/src/client/connect/payoutSync.ts +93 -0
- package/src/client/connect/payoutSyncTestHelpers.ts +82 -0
- package/src/client/connect/payoutSyncValidation.ts +74 -0
- package/src/client/connect/payouts.ts +75 -15
- package/src/client/connect/refundPrincipal.test.ts +46 -0
- package/src/client/connect/refundPrincipal.ts +26 -0
- package/src/client/connect/reversalExecution.ts +130 -0
- package/src/client/connect/transfers.test.ts +3 -3
- package/src/client/connect/transfers.ts +93 -92
- package/src/client/index.ts +20 -18
- package/src/client/readContracts.ts +12 -0
- package/src/client/settlement/execution.test.ts +5 -0
- package/src/client/settlement/execution.ts +50 -3
- package/src/client/settlement/reconciliation.ts +20 -2
- package/src/client/webhooks/disputeRecovery.ts +74 -0
- package/src/client/webhooks/processors.test.ts +36 -53
- package/src/client/webhooks/processors.ts +18 -31
- package/src/component/_generated/api.ts +34 -0
- package/src/component/_generated/component.ts +696 -1
- package/src/component/affiliate-clawbacks.test.ts +370 -0
- package/src/component/affiliate-component-pagination.test.ts +83 -0
- package/src/component/affiliate-direct-payout.test.ts +160 -0
- package/src/component/affiliate-recovery-lifecycle.test.ts +587 -0
- package/src/component/affiliateEarnings/mutations.ts +196 -0
- package/src/component/affiliatePayouts/mutations.ts +121 -0
- package/src/component/affiliatePayouts/queries.ts +28 -0
- package/src/component/affiliatePayouts/recipientGuard.ts +42 -0
- package/src/component/affiliateRecovery/accounting.ts +111 -0
- package/src/component/affiliateRecovery/mutations.ts +275 -0
- package/src/component/affiliateRecovery/queries.ts +138 -0
- package/src/component/affiliateRecovery/schema.ts +86 -0
- package/src/component/connect/mutations.ts +13 -190
- package/src/component/connect/payoutWrites.ts +25 -0
- package/src/component/connect/queries.ts +4 -47
- package/src/component/connect/reversalClaims.ts +232 -0
- package/src/component/connect/reversalDiagnostics.ts +61 -0
- package/src/component/connect/reversalReceipts.ts +147 -0
- package/src/component/connect/schema.ts +3 -3
- package/src/component/connect/validators.ts +2 -0
- package/src/component/payout-recovery-integration.test.ts +172 -0
- package/src/component/payout-sync.test.ts +117 -0
- package/src/component/payoutRelease/mutations.ts +9 -0
- package/src/component/payoutRelease/queries.ts +3 -1
- package/src/component/payoutSync/helpers.ts +86 -0
- package/src/component/payoutSync/mutations.ts +102 -0
- package/src/component/payoutSync/queries.ts +10 -0
- package/src/component/payoutSync/schema.ts +25 -0
- package/src/component/payoutSync/validators.ts +21 -0
- package/src/component/schema.ts +20 -0
- package/src/component/settlement/clawbackSchema.ts +78 -0
- package/src/component/settlement/clawbacks.ts +233 -0
- package/src/component/settlement/mutations.ts +54 -0
- package/src/component/settlement/queries.ts +35 -0
- package/src/component/summary-arithmetic.test.ts +9 -4
- package/src/react/workflows/AffiliateRecovery.test.tsx +106 -0
- package/src/react/workflows/AffiliateRecovery.tsx +273 -0
- package/src/react/workflows/index.ts +9 -0
- package/src/testing/affiliate-recovery.ts +137 -0
- package/src/testing/index.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,GACb,MAAM,oBAAoB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vD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EAC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C;AACnE,YAAY,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -40,5 +40,6 @@ export { Pagination, useCursorPagination } from "./Pagination.js";
|
|
|
40
40
|
export { PlanPricingEditor } from "./PlanPricingEditor.js";
|
|
41
41
|
export { AffiliateRateEditor } from "./AffiliateRateEditor.js";
|
|
42
42
|
export { AffiliatePayoutEditor } from "./AffiliatePayoutEditor.js";
|
|
43
|
+
export { AffiliateRecovery, AffiliateRecoveryHistory, } from "./AffiliateRecovery.js";
|
|
43
44
|
export { EvidenceUpload } from "./EvidenceUpload.js";
|
|
44
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AASzC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,OAAO,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE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C;AAOnE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AffiliateRecoverySnapshot } from "../client/affiliateRecovery.js";
|
|
2
|
+
export type AffiliateRecoveryScenario = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
evidence: "simulated";
|
|
6
|
+
snapshot: AffiliateRecoverySnapshot;
|
|
7
|
+
};
|
|
8
|
+
/** Presentation fixtures only. These IDs are not Stripe or bank-payout receipts. */
|
|
9
|
+
export declare function affiliateRecoveryScenarios(): AffiliateRecoveryScenario[];
|
|
10
|
+
//# sourceMappingURL=affiliate-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affiliate-recovery.d.ts","sourceRoot":"","sources":["../../src/testing/affiliate-recovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,yBAAyB,CAAC;CACrC,CAAC;AACF,oFAAoF;AACpF,wBAAgB,0BAA0B,IAAI,yBAAyB,EAAE,CAgIxE"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/** Presentation fixtures only. These IDs are not Stripe or bank-payout receipts. */
|
|
2
|
+
export function affiliateRecoveryScenarios() {
|
|
3
|
+
const cases = [
|
|
4
|
+
{
|
|
5
|
+
id: "one-time-refund",
|
|
6
|
+
label: "One-time full refund",
|
|
7
|
+
finalized: 1001,
|
|
8
|
+
recovered: 1001,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "invoice-refund",
|
|
12
|
+
label: "Recurring invoice refund",
|
|
13
|
+
finalized: 1001,
|
|
14
|
+
recovered: 1001,
|
|
15
|
+
invoice: "fixture_invoice_renewal",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "partial-refund",
|
|
19
|
+
label: "Partial refund and rounding",
|
|
20
|
+
finalized: 501,
|
|
21
|
+
recovered: 501,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "open-dispute",
|
|
25
|
+
label: "Open monetary dispute",
|
|
26
|
+
finalized: 0,
|
|
27
|
+
provisional: 1001,
|
|
28
|
+
recovered: 1001,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "lost-dispute",
|
|
32
|
+
label: "Lost dispute finalized",
|
|
33
|
+
finalized: 1001,
|
|
34
|
+
recovered: 1001,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "won-dispute",
|
|
38
|
+
label: "Won dispute restored",
|
|
39
|
+
finalized: 0,
|
|
40
|
+
recovered: 1001,
|
|
41
|
+
restored: 1001,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "overlap",
|
|
45
|
+
label: "Refund retained after dispute win",
|
|
46
|
+
finalized: 501,
|
|
47
|
+
recovered: 1001,
|
|
48
|
+
restored: 500,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "paid-out",
|
|
52
|
+
label: "Insufficient balance after external payout",
|
|
53
|
+
finalized: 1001,
|
|
54
|
+
recovered: 0,
|
|
55
|
+
state: "insufficient_balance",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "future-offset",
|
|
59
|
+
label: "Debt recovered from future commission",
|
|
60
|
+
finalized: 1001,
|
|
61
|
+
recovered: 0,
|
|
62
|
+
offset: 1001,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "unknown",
|
|
66
|
+
label: "Provider timeout awaiting receipt",
|
|
67
|
+
finalized: 1001,
|
|
68
|
+
recovered: 0,
|
|
69
|
+
reserved: 1001,
|
|
70
|
+
state: "unknown",
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
return cases.map((c) => {
|
|
74
|
+
const recoveredAmount = c.recovered, offsetAmount = c.offset ?? 0, restoredAmount = c.restored ?? 0;
|
|
75
|
+
const debt = Math.max(0, c.finalized +
|
|
76
|
+
(c.provisional ?? 0) -
|
|
77
|
+
recoveredAmount -
|
|
78
|
+
offsetAmount +
|
|
79
|
+
restoredAmount);
|
|
80
|
+
const row = {
|
|
81
|
+
_id: `fixture_${c.id}`,
|
|
82
|
+
_creationTime: 0,
|
|
83
|
+
sourceChargeId: `fixture_charge_${c.id}`,
|
|
84
|
+
sourceInvoiceId: c.invoice,
|
|
85
|
+
paymentIntentId: "fixture_payment",
|
|
86
|
+
affiliateAccountId: "fixture_affiliate",
|
|
87
|
+
currency: "usd",
|
|
88
|
+
chargeAmount: 10000,
|
|
89
|
+
originalCommission: 1001,
|
|
90
|
+
refundedPrincipal: c.finalized ? 10000 : 0,
|
|
91
|
+
disputedPrincipal: c.provisional ? 10000 : 0,
|
|
92
|
+
lostPrincipal: 0,
|
|
93
|
+
finalizedAmount: c.finalized,
|
|
94
|
+
provisionalAmount: c.provisional ?? 0,
|
|
95
|
+
recoveredAmount,
|
|
96
|
+
offsetAmount,
|
|
97
|
+
restoredAmount,
|
|
98
|
+
reservedRecovery: c.reserved ?? 0,
|
|
99
|
+
debtAmount: debt,
|
|
100
|
+
creditAmount: 0,
|
|
101
|
+
needsReconciliation: false,
|
|
102
|
+
lastState: c.state ?? "succeeded",
|
|
103
|
+
};
|
|
104
|
+
const snapshot = {
|
|
105
|
+
balance: {
|
|
106
|
+
_id: `fixture_balance_${c.id}`,
|
|
107
|
+
_creationTime: 0,
|
|
108
|
+
affiliateAccountId: "fixture_affiliate",
|
|
109
|
+
currency: "usd",
|
|
110
|
+
originalCommission: 1001,
|
|
111
|
+
recoveredAmount,
|
|
112
|
+
offsetAmount,
|
|
113
|
+
restoredAmount,
|
|
114
|
+
outstandingDebt: debt,
|
|
115
|
+
reservedRecovery: c.reserved ?? 0,
|
|
116
|
+
reservedRestoration: 0,
|
|
117
|
+
restorationDue: 0,
|
|
118
|
+
withheldAmount: offsetAmount,
|
|
119
|
+
netPayable: 0,
|
|
120
|
+
},
|
|
121
|
+
obligations: { page: [row], continueCursor: "", isDone: true },
|
|
122
|
+
};
|
|
123
|
+
return { id: c.id, label: c.label, evidence: "simulated", snapshot };
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=affiliate-recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affiliate-recovery.js","sourceRoot":"","sources":["../../src/testing/affiliate-recovery.ts"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,MAAM,UAAU,0BAA0B;IACxC,MAAM,KAAK,GAAG;QACZ;YACE,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,IAAI;SAChB;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,0BAA0B;YACjC,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,yBAAyB;SACnC;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,6BAA6B;YACpC,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;SACf;QACD;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,uBAAuB;YAC9B,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;SAChB;QACD;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,wBAAwB;YAC/B,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,IAAI;SAChB;QACD;YACE,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE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,CAAC,CAAC;AACL,CAAC"}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { assertTestEnvironment } from "./assert-test-env.js";
|
|
2
2
|
export { createTestAccount, createTestProduct, createTestPrice, createTestSubscription, } from "./fixtures.js";
|
|
3
3
|
export { mockCheckoutCompleted, mockSubscriptionUpdated, mockAccountUpdated, mockInvoicePaid, } from "./mock-webhooks.js";
|
|
4
|
+
export { affiliateRecoveryScenarios } from "./affiliate-recovery.js";
|
|
5
|
+
export type { AffiliateRecoveryScenario } from "./affiliate-recovery.js";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,YAAY,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/testing/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { assertTestEnvironment } from "./assert-test-env.js";
|
|
2
2
|
export { createTestAccount, createTestProduct, createTestPrice, createTestSubscription, } from "./fixtures.js";
|
|
3
3
|
export { mockCheckoutCompleted, mockSubscriptionUpdated, mockAccountUpdated, mockInvoicePaid, } from "./mock-webhooks.js";
|
|
4
|
+
export { affiliateRecoveryScenarios } from "./affiliate-recovery.js";
|
|
4
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# Affiliate commission clawbacks
|
|
2
|
+
|
|
3
|
+
Affiliate recovery extends the original Connect transfer ledger. It records
|
|
4
|
+
original commission economics, refund/dispute exposure, provider receipts,
|
|
5
|
+
unrecovered debt, future-commission offsets, and dispute-win restoration.
|
|
6
|
+
Seller processing and dispute-cost recovery remain separate.
|
|
7
|
+
|
|
8
|
+
## Accounting and overlap
|
|
9
|
+
|
|
10
|
+
Each commission has an `affiliateObligations` row with its original charge,
|
|
11
|
+
available store/payment/invoice references, recipient, currency, and allocated
|
|
12
|
+
commission. Percentage and fixed commissions use the actual original allocation,
|
|
13
|
+
not current payout rules. Each recurring invoice is independent. Refunds do not
|
|
14
|
+
reset one-time subscription commission eligibility.
|
|
15
|
+
|
|
16
|
+
Finalized refund principal is the sum of live Stripe refunds whose status is
|
|
17
|
+
`succeeded`. Pending, failed, canceled, and action-required refunds are excluded;
|
|
18
|
+
`charge.amount_refunded` alone can include pending refunds.
|
|
19
|
+
|
|
20
|
+
Refund and monetary-dispute exposure share an original-principal axis. The
|
|
21
|
+
combined commission target is the larger cumulative successful-refund or active
|
|
22
|
+
monetary-dispute exposure, capped at the original charge, multiplied by the
|
|
23
|
+
original commission and rounded half up using integer arithmetic. This is a
|
|
24
|
+
conservative overlap policy: independently disjoint portions of a charge would
|
|
25
|
+
need additional provider allocation evidence. Warning/inquiry and prevented
|
|
26
|
+
payloads do not create monetary recovery.
|
|
27
|
+
|
|
28
|
+
For example, a 1,001-unit commission on a 10,000-unit charge has a 501-unit
|
|
29
|
+
finalized obligation after a successful 5,000-unit refund. A full-charge dispute
|
|
30
|
+
raises the combined target to 1,001 units, including 500 provisional units. A win
|
|
31
|
+
leaves the independent 501-unit refund deducted. A lost dispute finalizes its
|
|
32
|
+
existing exposure without another debit. Persisted terminal states prevent old
|
|
33
|
+
opening events from reopening a won dispute.
|
|
34
|
+
|
|
35
|
+
Net recovery is confirmed reversals plus applied future-commission offsets minus
|
|
36
|
+
confirmed restorations. Outstanding debt is the positive difference between the
|
|
37
|
+
current target and net recovery. Restoration owed is the excess actually
|
|
38
|
+
recovered over the current target. Unrecovered dispute debt disappears on a win;
|
|
39
|
+
only actual reversals or offsets can become restoration owed.
|
|
40
|
+
|
|
41
|
+
## Provider operations and insufficient balance
|
|
42
|
+
|
|
43
|
+
`affiliateRecoveryOperations` stores immutable amounts and operation identities
|
|
44
|
+
before money moves. Outcomes distinguish `pending`, `unknown`,
|
|
45
|
+
`insufficient_balance`, `unsupported`, `failed`, `succeeded`, and `canceled`.
|
|
46
|
+
An unknown provider outcome retains its reservation and blocks another collection
|
|
47
|
+
or future commission release until receipt reconciliation finishes.
|
|
48
|
+
|
|
49
|
+
The client verifies the actual V2 Connect recipient's active
|
|
50
|
+
`configuration.recipient.capabilities.stripe_balance.stripe_transfers` capability
|
|
51
|
+
and the exact original transfer's destination, charge, currency and amount.
|
|
52
|
+
Reversals use that original transfer. Requests carry `bsRecoveryOperation`
|
|
53
|
+
metadata and a stable operation-specific idempotency key. Replay searches exact
|
|
54
|
+
provider receipts before issuing another request, including beyond the provider's
|
|
55
|
+
idempotency cache window. An unrelated aggregate reversal is not a receipt for
|
|
56
|
+
this operation. Confirmation records the receipt and accounting changes atomically.
|
|
57
|
+
|
|
58
|
+
A confirmed insufficient-balance response leaves durable debt instead of failing
|
|
59
|
+
indefinitely through webhook retries. Before a subsequent settlement creates an
|
|
60
|
+
affiliate transfer, the component atomically reserves the earning and applies
|
|
61
|
+
same-affiliate, same-currency debt offsets. Concurrent settlements cannot spend
|
|
62
|
+
one debt twice, and replay uses the original withheld/release amounts. A fully
|
|
63
|
+
withheld commission gets an earning record without a fabricated Stripe transfer.
|
|
64
|
+
Refunding that later commission creates its own obligation for the original full
|
|
65
|
+
commission, including units previously applied to older debt.
|
|
66
|
+
|
|
67
|
+
A later recovery attempt sizes itself from the remaining debt and reversible
|
|
68
|
+
provider funds. It cannot collect amounts already offset. Restorations use
|
|
69
|
+
platform-funded transfers, exact receipts and independent operation identities.
|
|
70
|
+
Funding, country/currency or capability failures remain visible and retryable;
|
|
71
|
+
failed restoration is not shown as paid.
|
|
72
|
+
|
|
73
|
+
Transfer reversal does not recall a completed bank payout. Available balance and
|
|
74
|
+
negative-balance behavior remain account/provider-specific. Global Payouts is
|
|
75
|
+
unsupported by this Connect recovery path and is never routed through a Connect
|
|
76
|
+
API by assumption. No card or bank debit is introduced.
|
|
77
|
+
|
|
78
|
+
## Trusted server APIs
|
|
79
|
+
|
|
80
|
+
The host must authenticate callers and derive affiliate accounts server-side.
|
|
81
|
+
Operator retry, legacy review and maintenance endpoints must not be exposed as
|
|
82
|
+
unrestricted browser mutations.
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
const snapshot = await stripe.affiliateRecovery.snapshot(ctx, {
|
|
86
|
+
affiliateAccountId: authorizedAffiliateAccountId,
|
|
87
|
+
currency: "usd",
|
|
88
|
+
paginationOpts: { numItems: 20, cursor: null },
|
|
89
|
+
});
|
|
90
|
+
const attempts = await stripe.affiliateRecovery.history(ctx, {
|
|
91
|
+
obligationId: authorizedObligationId,
|
|
92
|
+
paginationOpts: { numItems: 20, cursor: null },
|
|
93
|
+
});
|
|
94
|
+
// Authenticated operator only; reconciles receipts before attempting recovery.
|
|
95
|
+
await stripe.affiliateRecovery.retry(ctx, {
|
|
96
|
+
obligationId: authorizedObligationId,
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Snapshot responses contain an exact per-account/currency `balance` and a
|
|
101
|
+
paginated `obligations` result (`page`, `continueCursor`, `isDone`). The balance
|
|
102
|
+
contains original commission, cumulative reversed, offset and restored amounts,
|
|
103
|
+
outstanding debt, reserved recovery/restoration, restoration owed, withheld
|
|
104
|
+
future earnings and net payable. Net payable means platform-held commission
|
|
105
|
+
reserved for release; it is not the connected account's bank balance. Read
|
|
106
|
+
provider balances and bank payouts separately with `getPayoutSnapshot`.
|
|
107
|
+
|
|
108
|
+
Rows retain original references, exposure snapshots, original/released commission,
|
|
109
|
+
confirmed recovery/offset/restoration, debt, latest state/error, and reconciliation
|
|
110
|
+
flags. A fully withheld row can omit `stripeTransferId`. History includes operation
|
|
111
|
+
amounts, outcomes and confirmed receipt IDs. Paginate history; do not sum a preview
|
|
112
|
+
page for account totals.
|
|
113
|
+
|
|
114
|
+
`createPayout` uses an atomic release gate for accounts with affiliate recovery
|
|
115
|
+
balances. Supply a stable `idempotencyKey` and an optional host-authorized
|
|
116
|
+
`minimumAmount` in that currency (default one minor unit). Debt, uncertain money
|
|
117
|
+
movement and concurrent payout reservations block release. The configured minimum
|
|
118
|
+
is application policy, not a discovered Stripe regional floor; provider floors
|
|
119
|
+
and balance requirements are still enforced by Stripe. A payout receipt marks
|
|
120
|
+
submission, not arrival in a bank. Combined seller/affiliate releases through
|
|
121
|
+
`stripe.payoutPolicy.release` share this recovery reservation. Debt and unresolved
|
|
122
|
+
recovery block both reservation and the final provider attempt. An uncertain payout
|
|
123
|
+
retains the lock until a verified outcome or rejection; an unattempted claim can
|
|
124
|
+
be canceled. Direct payouts recheck recovery after receipt lookup and before
|
|
125
|
+
calling Stripe. Once a direct operation is 23 hours old, it requires receipt
|
|
126
|
+
reconciliation and cannot create another payout with an expired idempotency key.
|
|
127
|
+
Maintenance can confirm an existing payout receipt despite newly recorded debt;
|
|
128
|
+
confirmation does not erase that debt. Locks are scoped to the recipient and currency. Stripe-managed automatic bank payouts cannot
|
|
129
|
+
be intercepted by this gate; future commissions are offset before their Connect
|
|
130
|
+
transfers leave the platform.
|
|
131
|
+
|
|
132
|
+
## Migration and operator reconciliation
|
|
133
|
+
|
|
134
|
+
Deploy the additive schema and matching component code together. Regenerate the
|
|
135
|
+
component and example bindings against the target deployment.
|
|
136
|
+
|
|
137
|
+
Call `components.betterStripe.settlement.mutations.migrateAffiliateObligations`
|
|
138
|
+
from an authenticated operator wrapper with:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
{ paginationOpts: { numItems: 100, cursor: null } }
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Pass each returned `continueCursor` until `isDone`. Replay is safe. `migrated` and
|
|
145
|
+
`skipped` describe that page, including already-existing obligations; they are not
|
|
146
|
+
cumulative counters. The backfill uses immutable settlement allocations and
|
|
147
|
+
initializes account totals. Legacy legs without allocations are skipped for
|
|
148
|
+
manual source review rather than assigned invented original economics.
|
|
149
|
+
|
|
150
|
+
Existing reversals/reservations without attributable provenance set
|
|
151
|
+
`needsReconciliation=true`. They retain their confirmed balance, but automatic
|
|
152
|
+
collection/restoration is paused for review. An operator can select exact
|
|
153
|
+
commission-reversal and prior reinstatement receipts:
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
await stripe.affiliateRecovery.reviewLegacy(ctx, {
|
|
157
|
+
obligationId: authorizedObligationId,
|
|
158
|
+
reversalIds: ["trr_original_commission_reversal"],
|
|
159
|
+
restorationTransferIds: [], // Include any prior dispute-win reinstatements.
|
|
160
|
+
note: "Reviewed original allocation and provider receipt history.",
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
This verifies the original transfer, each selected receipt, live successful
|
|
165
|
+
refunds and the monetary dispute, then commits the reviewed attribution and note.
|
|
166
|
+
Choose commission principal receipts, not unrelated adjustments. More than one
|
|
167
|
+
monetary dispute on a legacy source requires manual allocation. Inspect the new
|
|
168
|
+
snapshot before retrying recovery. The older generic reversal-claim reclaimer
|
|
169
|
+
delegates tracked affiliate operations to this ledger; its release mode cannot
|
|
170
|
+
delete an affiliate exposure audit record.
|
|
171
|
+
|
|
172
|
+
## Maintained reconciliation and bounds
|
|
173
|
+
|
|
174
|
+
Run both `reconcilePending` and `reconcilePayouts` for `pending` and `unknown`
|
|
175
|
+
states from a host cron. Pass `paginationOpts` and schedule the returned
|
|
176
|
+
`continueCursor` until `isDone`. The example's internal jobs run every five
|
|
177
|
+
minutes and process one row per invocation. Insufficient/unsupported recovery
|
|
178
|
+
remains collectible through future offsets; an operator can retry it after
|
|
179
|
+
account capability or funding changes.
|
|
180
|
+
|
|
181
|
+
Charge transfer/obligation reads and provider refund/receipt histories have
|
|
182
|
+
explicit bounds of 1,000 rows; exceeding a bound stops instead of applying partial
|
|
183
|
+
financial state. Offset transactions accept at most 1,000 open same-currency debt
|
|
184
|
+
rows. Snapshot, audit and migration queries are paginated with bounded pages.
|
|
185
|
+
Legacy review accepts at most 100 selected receipts and requires an operator note.
|
|
186
|
+
|
|
187
|
+
Subscribe to `refund.created`, `refund.updated`, `refund.failed`, and existing
|
|
188
|
+
`charge.dispute.created`, `.funds_withdrawn`, `.closed`, `.funds_reinstated` events.
|
|
189
|
+
Retain component financial records while events, provider operations or payouts
|
|
190
|
+
can still be retried.
|
|
191
|
+
|
|
192
|
+
## Reusable React views and example
|
|
193
|
+
|
|
194
|
+
`AffiliateRecovery` from `@fantastic.dev/better-stripe/react` accepts `snapshot`,
|
|
195
|
+
`currency`, optional locale/source-link/reconcile callbacks and a render function.
|
|
196
|
+
Its unstyled default view and headless view expose the same metrics and
|
|
197
|
+
package-formatted adjustment rows. `AffiliateRecoveryHistory` displays outcomes
|
|
198
|
+
and receipts. Use them alongside earnings, referred sales and payouts; seller
|
|
199
|
+
cost recovery remains a separate view.
|
|
200
|
+
|
|
201
|
+
The example uses the existing demo persona picker. Recovery reads derive the
|
|
202
|
+
account from the selected affiliate's server-stored user record, and reject
|
|
203
|
+
requests for another affiliate's account or obligation. Admin personas can
|
|
204
|
+
inspect other affiliates and retry recovery only with a Stripe test-mode key.
|
|
205
|
+
These checks bind resources to a claimed demo persona. They do not authenticate
|
|
206
|
+
the caller or prove production ownership. Production hosts must authenticate
|
|
207
|
+
callers and derive their account and operator permissions server-side.
|
|
208
|
+
|
|
209
|
+
Visit `/demo/affiliate-recovery` for ten **simulated** scenarios covering orders,
|
|
210
|
+
recurring invoices, partial refunds, open/lost/won disputes, overlap, insufficient
|
|
211
|
+
balance after external payout, future offsets and unknown provider outcomes.
|
|
212
|
+
`affiliateRecoveryScenarios()` is exported from the testing package. These are
|
|
213
|
+
presentation fixtures, not fabricated sandbox or bank-payout receipts.
|
|
214
|
+
|
|
215
|
+
## Stripe sandbox scenario driver
|
|
216
|
+
|
|
217
|
+
With the example deployed, its webhook endpoint registered, a test-mode key and
|
|
218
|
+
active distinct store/affiliate Connect recipients, run the internal fixture
|
|
219
|
+
from `example/`:
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
pnpm exec convex run affiliateRecoverySandbox:seed '{"runKey":"recovery-partial-1","storeAccountId":"acct_store","affiliateAccountId":"acct_affiliate","scenario":"refund_partial"}'
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The driver creates a real test payment, settles the original allocation, creates
|
|
226
|
+
the selected refund and returns actual provider IDs/balances. A stable `runKey`
|
|
227
|
+
prevents duplicate payment/refund creation. `refund_full` covers a full refund;
|
|
228
|
+
`future_offset` creates the next commission against existing debt. For a recurring
|
|
229
|
+
invoice, supply its existing `paymentIntentId`, `invoiceId` and `subscriptionId`
|
|
230
|
+
from the subscription/test-clock fixtures so the driver verifies those links.
|
|
231
|
+
|
|
232
|
+
`dispute` uses Stripe's dispute-producing test payment method. The provider can
|
|
233
|
+
mark its charge disputed before the fixture settles. In that case the driver
|
|
234
|
+
returns `not_payable` and creates no affiliate transfer, so this is not evidence
|
|
235
|
+
of post-transfer clawback, dispute loss, or restoration. Use a provider-supported
|
|
236
|
+
post-settlement dispute workflow for those checks. Do not manufacture terminal
|
|
237
|
+
webhooks as proof that provider funds were restored.
|
|
238
|
+
|
|
239
|
+
`paid_out` uses Stripe's `pm_card_bypassPending` test method and first returns
|
|
240
|
+
`operator_step_required`. Run internal `affiliateRecoverySandbox:externalPayout`
|
|
241
|
+
with the same `runKey`, `affiliateAccountId` and actual affiliate
|
|
242
|
+
`stripeTransferId`. It verifies fixture provenance, checks actual available
|
|
243
|
+
balance and creates an external test payout for that transfer's amount. Replays
|
|
244
|
+
read the existing payout. Wait for actual `paid` status, then rerun `seed` with
|
|
245
|
+
its `completedPayoutId`. The driver verifies paid status, currency, amount and
|
|
246
|
+
creation order before requesting the refund. Unsupported payout/account controls
|
|
247
|
+
must be reported as blocked. Recovery may still succeed using other account
|
|
248
|
+
funds; a paid payout does not itself prove insufficient-balance debt.
|
|
249
|
+
|
|
250
|
+
If prior sandbox refunds/disputes depleted platform funding, internal
|
|
251
|
+
`affiliateRecoverySandbox:fundPlatform` creates a bounded test payment using
|
|
252
|
+
`runKey` and `amount` of at most 100,000 USD minor units. It returns the actual
|
|
253
|
+
payment and before/after available balances. Balance updates can be asynchronous.
|
|
254
|
+
Retain the funding receipt and do not label it commission recovery.
|
|
255
|
+
|
|
256
|
+
For isolated recurring sources, run internal
|
|
257
|
+
`affiliateRecoveryBillingSandbox:prepare` with a stable `runKey` and fixed
|
|
258
|
+
`frozenTime` Unix timestamp. Retain those exact arguments on replay. It creates
|
|
259
|
+
an isolated test-clock customer and monthly subscription and returns the actual
|
|
260
|
+
paid `invoiceId`, `paymentIntentId`, `subscriptionId`, `clockId` and `periodEnd`.
|
|
261
|
+
Pass the invoice/payment/subscription references to `seed` with a distinct run
|
|
262
|
+
key per invoice. `affiliateRecoveryBillingSandbox:advance` accepts that fixture's
|
|
263
|
+
`runKey`, `clockId` and a new `frozenTime`; after the clock finishes advancing,
|
|
264
|
+
rerun `prepare` to read the next paid invoice. Existing persona subscriptions
|
|
265
|
+
are not changed by these helpers.
|
|
266
|
+
|
|
267
|
+
The raw-payment fixture uses trusted internal settlement and does not establish
|
|
268
|
+
seller checkout ownership. For the seller refund UI, create a purchase through
|
|
269
|
+
the storefront so its server-selected merchant routing is present. Keep the
|
|
270
|
+
ownership guard intact. The example's fixed-rate settings use major currency
|
|
271
|
+
units, so `$10.01` is entered as `10.01`; component commission amounts and the
|
|
272
|
+
raw driver's 1,001-unit allocation use minor units.
|
|
273
|
+
|
|
274
|
+
The driver rejects live/missing Stripe keys. It makes real sandbox transactions
|
|
275
|
+
and does not delete their receipts. Record its JSON output and demo-persona
|
|
276
|
+
snapshots as release evidence; an API response alone does not establish a bank
|
|
277
|
+
payout recall.
|
|
278
|
+
|
|
279
|
+
## Verification evidence
|
|
280
|
+
|
|
281
|
+
Automated integration tests execute the real component and client with an
|
|
282
|
+
idempotent provider fixture and exact-money assertions. They cover concurrent
|
|
283
|
+
offsets, fully withheld invoice refunds, timeout-after-success replay,
|
|
284
|
+
refund/dispute ordering, partial disputes, lost/won events, receipt matching,
|
|
285
|
+
payout reservations, migration and ownership enforcement. React tests verify
|
|
286
|
+
native/headless figures and unconfirmed restoration states.
|
|
287
|
+
|
|
288
|
+
[Verification report](evidence/affiliate-recovery-verification.md),
|
|
289
|
+
[UI recording](evidence/affiliate-recovery.webm) and
|
|
290
|
+
[screenshot](evidence/affiliate-recovery.png) show simulated fixtures and both
|
|
291
|
+
presentations. Reproduce with the frontend running, from `example/`:
|
|
292
|
+
|
|
293
|
+
```sh
|
|
294
|
+
node scripts/record-affiliate-recovery.mjs
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Use `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` for a system Chromium installation.
|
|
298
|
+
The recording requires a Playwright-compatible FFmpeg executable.
|
|
299
|
+
|
|
300
|
+
For account preview prerequisites, see [Accounts v2 setup](accounts-v2-preview.md).
|
|
301
|
+
|
|
302
|
+
Deployment-backed generation and sandbox verification status are recorded in
|
|
303
|
+
the verification report. The simulated artifacts do not establish account-specific
|
|
304
|
+
negative-balance behavior or successful external-payout recall. Before release,
|
|
305
|
+
verify actual supported Connect accounts, currencies, insufficient-balance and
|
|
306
|
+
restoration behavior in a configured sandbox, and retain the provider receipts.
|
package/docs/read-contracts.md
CHANGED
|
@@ -126,14 +126,49 @@ accounts and direct callers to the new methods. Their historical scans remain
|
|
|
126
126
|
subject to Convex read limits; migrate busy accounts to the maintained summaries.
|
|
127
127
|
Full referred-sale history uses `paginateTransfersByAccount`, not the preview.
|
|
128
128
|
|
|
129
|
+
## Current payout observations
|
|
130
|
+
|
|
131
|
+
Call `betterStripe.syncPayoutFromStripe(ctx, { stripePayoutId, scope })` from an
|
|
132
|
+
authorized server action. Use `scope: { type: "connected", accountId }` for the
|
|
133
|
+
recipient's connected account or explicitly use `scope: { type: "platform" }`
|
|
134
|
+
for a platform payout. Resolve scope from trusted host configuration and recipient
|
|
135
|
+
ownership. Never accept an arbitrary account or platform mode from the browser.
|
|
136
|
+
The method reads Stripe and updates the existing component payout record; it
|
|
137
|
+
never creates, cancels or releases a bank payout.
|
|
138
|
+
|
|
139
|
+
The operation works for Stripe-managed automatic and manually triggered payouts.
|
|
140
|
+
It retrieves the current payout under that account's Stripe request scope and
|
|
141
|
+
validates the payout identity, original amount and currency, status, arrival date,
|
|
142
|
+
method and failure details. It does not require a mature balance transaction or a
|
|
143
|
+
manual execution claim. A current status observation does not establish funding
|
|
144
|
+
maturity, payout eligibility or a policy minimum.
|
|
145
|
+
|
|
146
|
+
A durable claim assigns each read a per-payout generation. Only the newest
|
|
147
|
+
claimed generation can commit. A delayed older response returns `superseded`
|
|
148
|
+
without changing the financial row. A successful result returns `accepted`, its
|
|
149
|
+
generation, `changed` and the stored payout. Identical observations preserve the
|
|
150
|
+
financial row and exact currency totals. Retrying the same committed generation
|
|
151
|
+
also preserves its acceptance timestamp. A later current provider observation
|
|
152
|
+
can legitimately change paid to failed; no terminal-status ranking is applied.
|
|
153
|
+
|
|
154
|
+
Provider errors or invalid snapshots throw and leave the last accepted financial
|
|
155
|
+
observation intact. The latest incomplete claim becomes unknown when that marker
|
|
156
|
+
can be saved. A lost mutation response may leave a pending or already accepted
|
|
157
|
+
claim. Retry the operation to obtain a new generation and read Stripe again.
|
|
158
|
+
Never substitute the webhook event body when the current provider read fails.
|
|
159
|
+
The claim table holds reconciliation metadata, not a second money ledger.
|
|
160
|
+
|
|
161
|
+
This method does not yet replace the existing signed webhook dispatcher. The
|
|
162
|
+
prepared generation must be integrated into the shared host callback transaction.
|
|
163
|
+
Until that wiring is adopted, legacy webhook deliveries still apply
|
|
164
|
+
event-body snapshots and can regress on distinct out-of-order events. Do not call
|
|
165
|
+
this method and then blindly apply an old event-body upsert afterward.
|
|
166
|
+
|
|
129
167
|
## Payout failures
|
|
130
168
|
|
|
131
169
|
Component payout rows and live `RecipientPayoutRow` snapshots expose optional
|
|
132
|
-
`failureCode` and `failureMessage`.
|
|
133
|
-
|
|
134
|
-
or null provider failure fields clears stored details. Legacy rows remain valid.
|
|
135
|
-
Ordinary event replay is deduplicated. This is snapshot reconciliation and does
|
|
136
|
-
not guarantee convergence for globally out-of-order events.
|
|
170
|
+
`failureCode` and `failureMessage`. A later accepted snapshot with absent or null
|
|
171
|
+
provider failure fields clears stored details. Legacy rows remain valid.
|
|
137
172
|
|
|
138
173
|
Host apps should translate known codes into safe recovery instructions and a
|
|
139
174
|
settings link. Do not log or blindly render raw provider messages. Authorize
|
package/docs/settlement.md
CHANGED
|
@@ -76,6 +76,23 @@ The Vite example exposes a [fee-first allocation preview](http://localhost:5173/
|
|
|
76
76
|
from Admin → Testing Utilities. Its illustrative inputs use the public helper
|
|
77
77
|
and the package React `SplitBreakdown`; they do not alter store settings.
|
|
78
78
|
|
|
79
|
+
## Affiliate commission recovery
|
|
80
|
+
|
|
81
|
+
Refund and monetary-dispute recovery uses each original affiliate transfer's
|
|
82
|
+
allocated commission, including fixed amounts, rather than current payout rules.
|
|
83
|
+
Successful refunds accumulate independently for each original invoice payment;
|
|
84
|
+
refunds do not reset one-time subscription eligibility. Refund and dispute
|
|
85
|
+
exposure share the same original-principal axis, capped at the original commission.
|
|
86
|
+
New affiliate reversal operations retain exact provider receipt references and
|
|
87
|
+
separate reserved funds from confirmed recovery.
|
|
88
|
+
|
|
89
|
+
The recovery ledger reserves same-currency debt offsets before future affiliate
|
|
90
|
+
transfers leave the platform, including fully withheld commissions with no Stripe
|
|
91
|
+
transfer. Won disputes restore actual reversals/offsets while retaining independent
|
|
92
|
+
refunds. Unknown outcomes retain reservations until exact receipt reconciliation. Before migrating or
|
|
93
|
+
using these records, read the [clawback API, migration and reconciliation guide](affiliate-clawbacks.md).
|
|
94
|
+
Seller cost recovery remains separate from affiliate commission principal.
|
|
95
|
+
|
|
79
96
|
## Subscription commission terms
|
|
80
97
|
|
|
81
98
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fantastic.dev/better-stripe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "A Convex component for Stripe V2 Accounts API integration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stripe",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"src",
|
|
60
60
|
"docs/react-workflows.md",
|
|
61
61
|
"docs/settlement.md",
|
|
62
|
+
"docs/affiliate-clawbacks.md",
|
|
62
63
|
"docs/accounts-v2-preview.md",
|
|
63
64
|
"docs/react-workflows-audit.md",
|
|
64
65
|
"CHANGELOG.md",
|