@fantastic.dev/better-stripe 0.26.0 → 0.28.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 +12 -0
- package/MIGRATION.md +6 -0
- package/README.md +7 -1
- package/dist/client/payoutPolicy.d.ts +1 -0
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/client/payoutPolicy.js +2 -1
- package/dist/client/payoutPolicy.js.map +1 -1
- package/dist/component/_generated/component.d.ts +8 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/payoutPolicy/helpers.d.ts +1 -1
- package/dist/component/payoutPolicy/helpers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/helpers.js +3 -1
- package/dist/component/payoutPolicy/helpers.js.map +1 -1
- package/dist/component/payoutPolicy/mutations.d.ts.map +1 -1
- package/dist/component/payoutPolicy/mutations.js +1 -1
- package/dist/component/payoutPolicy/mutations.js.map +1 -1
- package/dist/component/payoutRelease/allocationTotals.d.ts +8 -0
- package/dist/component/payoutRelease/allocationTotals.d.ts.map +1 -0
- package/dist/component/payoutRelease/allocationTotals.js +43 -0
- package/dist/component/payoutRelease/allocationTotals.js.map +1 -0
- package/dist/component/payoutRelease/planning.d.ts.map +1 -1
- package/dist/component/payoutRelease/planning.js +2 -0
- package/dist/component/payoutRelease/planning.js.map +1 -1
- package/dist/component/payoutRelease/preview.d.ts +35 -2
- package/dist/component/payoutRelease/preview.d.ts.map +1 -1
- package/dist/component/payoutRelease/preview.js +6 -11
- package/dist/component/payoutRelease/preview.js.map +1 -1
- package/dist/component/payoutRelease/progress.d.ts +29 -0
- package/dist/component/payoutRelease/progress.d.ts.map +1 -0
- package/dist/component/payoutRelease/progress.js +40 -0
- package/dist/component/payoutRelease/progress.js.map +1 -0
- package/dist/component/payoutRelease/queries.d.ts +8 -0
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/react/workflows/PayoutProgress.d.ts +5 -0
- package/dist/react/workflows/PayoutProgress.d.ts.map +1 -0
- package/dist/react/workflows/PayoutProgress.js +23 -0
- package/dist/react/workflows/PayoutProgress.js.map +1 -0
- package/dist/react/workflows/PayoutSettings.d.ts +44 -0
- package/dist/react/workflows/PayoutSettings.d.ts.map +1 -0
- package/dist/react/workflows/PayoutSettings.js +84 -0
- package/dist/react/workflows/PayoutSettings.js.map +1 -0
- package/dist/react/workflows/index.d.ts +4 -0
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +2 -0
- package/dist/react/workflows/index.js.map +1 -1
- package/dist/react/workflows/payout-progress-state.d.ts +50 -0
- package/dist/react/workflows/payout-progress-state.d.ts.map +1 -0
- package/dist/react/workflows/payout-progress-state.js +124 -0
- package/dist/react/workflows/payout-progress-state.js.map +1 -0
- package/docs/react-workflows-audit.md +1 -1
- package/docs/react-workflows.md +88 -0
- package/docs/settlement.md +23 -0
- package/package.json +1 -1
- package/src/client/connect/payoutPreview.test.ts +145 -0
- package/src/client/payoutPolicy.test.ts +13 -0
- package/src/client/payoutPolicy.ts +5 -1
- package/src/component/_generated/api.ts +4 -0
- package/src/component/_generated/component.ts +8 -0
- package/src/component/payoutPolicy/helpers.ts +3 -1
- package/src/component/payoutPolicy/mutations.ts +4 -1
- package/src/component/payoutRelease/allocationTotals.ts +56 -0
- package/src/component/payoutRelease/planning.ts +2 -0
- package/src/component/payoutRelease/preview.ts +10 -20
- package/src/component/payoutRelease/progress.test.ts +63 -0
- package/src/component/payoutRelease/progress.ts +56 -0
- package/src/react/workflows/PayoutProgress.test.tsx +208 -0
- package/src/react/workflows/PayoutProgress.tsx +108 -0
- package/src/react/workflows/PayoutSettings.test.tsx +139 -0
- package/src/react/workflows/PayoutSettings.tsx +209 -0
- package/src/react/workflows/index.ts +13 -0
- package/src/react/workflows/payout-progress-state.ts +199 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayoutSettings.js","sourceRoot":"","sources":["../../../src/react/workflows/Payo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U,EACf,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,UAAU,EAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAC3D,sHAGI,EACR,qJAGI,IACH,CACJ,EACA,KAAK,CAAC,SAAS,IAAI,YAAG,IAAI,EAAC,QAAQ,8CAA6B,EAChE,KAAK,CAAC,UAAU,IAAI,CACnB,YAAG,IAAI,EAAC,QAAQ,0FAGZ,CACL,EACA,KAAK,CAAC,KAAK,IAAI,YAAG,IAAI,EAAC,OAAO,YAAE,KAAK,CAAC,KAAK,GAAK,EAChD,KAAK,CAAC,OAAO,IAAI,YAAG,IAAI,EAAC,QAAQ,YAAE,KAAK,CAAC,OAAO,GAAK,EACtD,iBAAQ,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,YAC3C,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB,GAC9C,EACR,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,OAAO,IAAI,CACpC,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,KAAK,EAAE,4CAG1B,CACV,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,10 @@ export type { CheckoutFormState, CheckoutFormOptions, CheckoutFormProps, } from
|
|
|
8
8
|
export { Connect } from "./Connect.js";
|
|
9
9
|
export type { ConnectProps, ConnectComponent, ConnectRenderProps, } from "./Connect.js";
|
|
10
10
|
export { Payouts } from "./Payouts.js";
|
|
11
|
+
export { PayoutProgress } from "./PayoutProgress.js";
|
|
12
|
+
export { PayoutSettings, usePayoutSettings } from "./PayoutSettings.js";
|
|
13
|
+
export type { PayoutSettingsProps, PayoutSettingsState, PayoutSettingsChange, PayoutSettingsResult, } from "./PayoutSettings.js";
|
|
14
|
+
export type { PayoutProgressProps, PayoutProgressState, PayoutProgressMetric, } from "./PayoutProgress.js";
|
|
11
15
|
export type { PayoutsProps, HeadlessPayoutsProps, PayoutsRenderProps, PayoutSnapshot, PayoutRow, } from "./Payouts.js";
|
|
12
16
|
export { Refunds, useRefunds, parseAmountCents, parseRefundAmount, } from "./Refunds.js";
|
|
13
17
|
export type { RefundsProps, RefundsRenderProps, RefundActionsProps, RefundRequest, ReversalRequest, RefundResult, ReversalResult, } from "./Refunds.js";
|
|
@@ -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,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,EACd,SAAS,G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AAY,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"}
|
|
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,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxE,YAAY,EACV,mBAAmB,EACnB,mBAAmB,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AAM,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;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"}
|
|
@@ -4,6 +4,8 @@ export { Checkout } from "./Checkout.js";
|
|
|
4
4
|
export { CheckoutElementsForm, PaymentIntentForm, CheckoutForm, } from "./CheckoutForms.js";
|
|
5
5
|
export { Connect } from "./Connect.js";
|
|
6
6
|
export { Payouts } from "./Payouts.js";
|
|
7
|
+
export { PayoutProgress } from "./PayoutProgress.js";
|
|
8
|
+
export { PayoutSettings, usePayoutSettings } from "./PayoutSettings.js";
|
|
7
9
|
export { Refunds, useRefunds, parseAmountCents, parseRefundAmount, } from "./Refunds.js";
|
|
8
10
|
export { Collection } from "./Collection.js";
|
|
9
11
|
export { formatRefundAmount, groupRefundPreview } from "./refund-preview.js";
|
|
@@ -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;AAS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;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAMvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAKjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOhE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOnE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { PayoutPolicy, PayoutPreview } from "../../client/payoutPolicy.js";
|
|
3
|
+
export type PayoutProgressMetric = {
|
|
4
|
+
key: "qualifying" | "pending" | "minimum" | "eligible" | "fees" | "liabilities" | "carried" | "withheld" | "reserved" | "released";
|
|
5
|
+
label: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
formattedValue: string;
|
|
8
|
+
};
|
|
9
|
+
export type PayoutProgressState = {
|
|
10
|
+
status: "loading" | "stripe_managed" | "changing" | "unavailable" | "assessed";
|
|
11
|
+
currency: string;
|
|
12
|
+
reason: string | null;
|
|
13
|
+
message: string;
|
|
14
|
+
metrics: PayoutProgressMetric[];
|
|
15
|
+
accounting?: NonNullable<Extract<PayoutPreview, {
|
|
16
|
+
currency: string;
|
|
17
|
+
}>["accounting"]>;
|
|
18
|
+
sources: {
|
|
19
|
+
role: "store" | "affiliate" | "other";
|
|
20
|
+
matureUnpaid: number;
|
|
21
|
+
pendingCredits: number;
|
|
22
|
+
matureLabel: string;
|
|
23
|
+
pendingLabel: string;
|
|
24
|
+
releasedAmount?: number;
|
|
25
|
+
reservedAmount?: number;
|
|
26
|
+
releasedLabel?: string;
|
|
27
|
+
reservedLabel?: string;
|
|
28
|
+
}[];
|
|
29
|
+
progress: {
|
|
30
|
+
value: number;
|
|
31
|
+
max: number;
|
|
32
|
+
} | null;
|
|
33
|
+
nextAttemptAt: number | null;
|
|
34
|
+
holdDeadline: number | null;
|
|
35
|
+
observedAt: number | null;
|
|
36
|
+
};
|
|
37
|
+
export type PayoutProgressProps = {
|
|
38
|
+
policy: Pick<PayoutPolicy, "mode" | "status" | "thresholds" | "holdDeadline"> | null | undefined;
|
|
39
|
+
preview?: PayoutPreview | null;
|
|
40
|
+
currency: string;
|
|
41
|
+
/** Application worker attempt time, never a bank arrival estimate. */
|
|
42
|
+
nextAttemptAt?: number | null;
|
|
43
|
+
locale?: string;
|
|
44
|
+
timeZone?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Compose translated host cards with the same financial state. */
|
|
47
|
+
children?: (state: PayoutProgressState) => ReactNode;
|
|
48
|
+
};
|
|
49
|
+
export declare function payoutProgressState({ policy, preview, currency, nextAttemptAt, locale, }: PayoutProgressProps): PayoutProgressState;
|
|
50
|
+
//# sourceMappingURL=payout-progress-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout-progress-state.d.ts","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EACC,YAAY,GACZ,SAA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I,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAC,GACrE,IAAI,GACJ,SAAS,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,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;AAmBF,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAgB,GACjB,EAAE,mBAAmB,GAAG,mBAAmB,CAkH3C"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { formatPrice } from "../lib/price-helpers.js";
|
|
2
|
+
const reasons = {
|
|
3
|
+
below_threshold: "Below-minimum funds remain owed and carry forward to a later automatic attempt.",
|
|
4
|
+
insufficient_available: "Qualifying earnings meet the minimum, but the supported Stripe payout balance is insufficient.",
|
|
5
|
+
affiliate_recovery_pending: "Commission recovery must settle before a new automatic payout can qualify.",
|
|
6
|
+
unallocated_history: "Previous Stripe activity needs reconciliation before unpaid entitlement can be assessed.",
|
|
7
|
+
pending_claim: "An existing payout is being reconciled before another payout can qualify.",
|
|
8
|
+
payout_unidentified: "A previous payout outcome needs reconciliation. No replacement payout will be created blindly.",
|
|
9
|
+
observations_stale: "Provider observations expired. Refresh the assessment.",
|
|
10
|
+
snapshot_limit: "This account needs continued history reconciliation before eligibility can be assessed.",
|
|
11
|
+
policy_changed: "Payout settings changed. Refresh the assessment.",
|
|
12
|
+
};
|
|
13
|
+
export function payoutProgressState({ policy, preview, currency, nextAttemptAt, locale = "en-US", }) {
|
|
14
|
+
const amount = (value) => formatPrice(value, currency, locale);
|
|
15
|
+
const state = {
|
|
16
|
+
status: "loading",
|
|
17
|
+
currency,
|
|
18
|
+
reason: null,
|
|
19
|
+
message: "Loading payout eligibility…",
|
|
20
|
+
metrics: [],
|
|
21
|
+
sources: [],
|
|
22
|
+
progress: null,
|
|
23
|
+
nextAttemptAt: null,
|
|
24
|
+
holdDeadline: policy?.mode === "custom" ? (policy.holdDeadline ?? null) : null,
|
|
25
|
+
observedAt: null,
|
|
26
|
+
};
|
|
27
|
+
if (policy !== undefined) {
|
|
28
|
+
if (!policy || policy.mode === "stripe_managed") {
|
|
29
|
+
state.status = "stripe_managed";
|
|
30
|
+
state.message =
|
|
31
|
+
"Stripe manages automatic payouts. No additional application minimum is set.";
|
|
32
|
+
}
|
|
33
|
+
else if (policy.status === "changing") {
|
|
34
|
+
state.status = "changing";
|
|
35
|
+
state.message =
|
|
36
|
+
"Payout settings are being verified. Eligibility is unavailable until the change completes.";
|
|
37
|
+
}
|
|
38
|
+
else if (preview !== undefined) {
|
|
39
|
+
state.nextAttemptAt = nextAttemptAt ?? null;
|
|
40
|
+
if (!preview || !("currency" in preview)) {
|
|
41
|
+
state.status = "unavailable";
|
|
42
|
+
state.reason = preview?.reason ?? "assessment_unavailable";
|
|
43
|
+
state.message =
|
|
44
|
+
reasons[state.reason] ??
|
|
45
|
+
"Automatic payout eligibility is unavailable. Refresh or contact support.";
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const configured = policy.thresholds.find((t) => t.currency === currency);
|
|
49
|
+
if (preview.currency !== currency ||
|
|
50
|
+
!configured ||
|
|
51
|
+
configured.amount !== preview.threshold)
|
|
52
|
+
throw new Error("Payout progress currency or policy does not match the assessment.");
|
|
53
|
+
state.status = "assessed";
|
|
54
|
+
state.reason = preview.reason ?? null;
|
|
55
|
+
state.message =
|
|
56
|
+
preview.status === "qualified"
|
|
57
|
+
? "The combined balance qualified at the assessment time. The automatic worker will verify it again before any payout."
|
|
58
|
+
: (reasons[preview.reason ?? ""] ??
|
|
59
|
+
"Automatic payout is on hold. Refresh or contact support.");
|
|
60
|
+
state.observedAt = preview.observedAt;
|
|
61
|
+
state.accounting = preview.accounting;
|
|
62
|
+
state.progress = {
|
|
63
|
+
value: Math.max(0, Math.min(preview.threshold, preview.matureUnpaid)),
|
|
64
|
+
max: preview.threshold,
|
|
65
|
+
};
|
|
66
|
+
const definitions = [
|
|
67
|
+
["qualifying", "Combined qualifying balance", preview.matureUnpaid],
|
|
68
|
+
["pending", "Pending settlement", preview.pendingCredits],
|
|
69
|
+
["minimum", "Combined payout minimum", preview.threshold],
|
|
70
|
+
["eligible", "Eligible at assessment", preview.amount],
|
|
71
|
+
...(preview.accounting
|
|
72
|
+
? [
|
|
73
|
+
[
|
|
74
|
+
"carried",
|
|
75
|
+
"Carried forward",
|
|
76
|
+
preview.accounting.carriedForwardAmount,
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
"withheld",
|
|
80
|
+
"Withheld for costs",
|
|
81
|
+
preview.accounting.withheldAmount,
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"reserved",
|
|
85
|
+
"Payouts in progress",
|
|
86
|
+
preview.accounting.reservedAmount,
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
"released",
|
|
90
|
+
"Paid out, net of returns",
|
|
91
|
+
preview.accounting.releasedAmount,
|
|
92
|
+
],
|
|
93
|
+
]
|
|
94
|
+
: []),
|
|
95
|
+
["fees", "Confirmed payout costs", preview.confirmedFees],
|
|
96
|
+
[
|
|
97
|
+
"liabilities",
|
|
98
|
+
"Other outstanding obligations",
|
|
99
|
+
preview.independentLiabilities,
|
|
100
|
+
],
|
|
101
|
+
];
|
|
102
|
+
state.metrics = definitions.map(([key, label, value]) => ({
|
|
103
|
+
key,
|
|
104
|
+
label,
|
|
105
|
+
amount: value,
|
|
106
|
+
formattedValue: amount(value),
|
|
107
|
+
}));
|
|
108
|
+
state.sources = preview.sources.map((source) => ({
|
|
109
|
+
...source,
|
|
110
|
+
matureLabel: amount(source.matureUnpaid),
|
|
111
|
+
pendingLabel: amount(source.pendingCredits),
|
|
112
|
+
...(source.releasedAmount === undefined
|
|
113
|
+
? {}
|
|
114
|
+
: { releasedLabel: amount(source.releasedAmount) }),
|
|
115
|
+
...(source.reservedAmount === undefined
|
|
116
|
+
? {}
|
|
117
|
+
: { reservedLabel: amount(source.reservedAmount) }),
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return state;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=payout-progress-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout-progress-state.js","sourceRoot":"","sources":["../../../src/react/workflows/payout-progress-state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA0DtD,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,cAAc,EACZ,yFAAyF;IAC3F,cAAc,EAAE,kDAAkD;CACnE,CAAC;AACF,MAAM,UAAU,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAM,GAAG,OAAO,GACI;IACpB,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvE,MAAM,KAAK,GAAwB;QACjC,MAAM,EAAE,SAAS;QACjB,QAAQ;QACR,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE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|
|
|
16
16
|
| Customer invoices | `Invoices` |
|
|
17
17
|
| Customer payment methods | `usePaymentMethodsManager`, `PaymentMethods`, `PaymentMethodsList`, `AddCardForm`, Stripe providers |
|
|
18
18
|
| Seller overview | `PayoutOverview`, `AccountCreateCard`, `ConnectStatusBadge` |
|
|
19
|
-
| Seller and affiliate payouts | `Payouts`, `PayoutHistory`, live balances, upcoming date, history and pagination
|
|
19
|
+
| Seller and affiliate payouts | `Payouts`, `PayoutHistory`, `PayoutProgress`, `PayoutSettings`, live balances, upcoming date, history and pagination |
|
|
20
20
|
| Seller earnings | `EarningsSummary`, `PayoutSchedule`, `PayoutHistory`, `earningsFromBalance`, `useWorkflowResource` |
|
|
21
21
|
| Seller sales | `Sales` |
|
|
22
22
|
| Seller subscriptions | `Subscriptions`, `SubscriptionCard` |
|
package/docs/react-workflows.md
CHANGED
|
@@ -640,6 +640,94 @@ Consumer applications still need to verify their own authenticated adapters and
|
|
|
640
640
|
See [sandbox setup findings](accounts-v2-preview.md#connect-sandbox-setup-findings-2026-10-15)
|
|
641
641
|
for the account eligibility requirement.
|
|
642
642
|
|
|
643
|
+
## Combined automatic payout progress
|
|
644
|
+
|
|
645
|
+
`PayoutProgress` is an unstyled, read-only view of a custom recipient's combined
|
|
646
|
+
eligibility assessment. Load the policy and
|
|
647
|
+
[preview](settlement.md#payout-eligibility-preview) through an authorized server
|
|
648
|
+
adapter. Derive independent liabilities on the server. Read the worker's next
|
|
649
|
+
attempt separately from the provider's actual bank arrival dates.
|
|
650
|
+
|
|
651
|
+
```tsx
|
|
652
|
+
import { PayoutProgress } from "@fantastic.dev/better-stripe/react";
|
|
653
|
+
|
|
654
|
+
<PayoutProgress
|
|
655
|
+
policy={policy}
|
|
656
|
+
preview={preview}
|
|
657
|
+
currency="usd"
|
|
658
|
+
nextAttemptAt={job?.nextAttemptAt}
|
|
659
|
+
locale="en-US"
|
|
660
|
+
timeZone="UTC"
|
|
661
|
+
/>;
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
The default markup uses a single accessible progress indicator, financial
|
|
665
|
+
metrics, source contributions and assessment/attempt/deadline dates. Store and
|
|
666
|
+
affiliate contributions share one minimum. Pending credits are separate, shared
|
|
667
|
+
costs reduce the combined entitlement once, and negative entitlement remains
|
|
668
|
+
visible even though the visual progress indicator stops at zero. A qualified
|
|
669
|
+
assessment is informational; the automatic worker verifies it again before a
|
|
670
|
+
payout. The component has no withdrawal action.
|
|
671
|
+
|
|
672
|
+
When the assessment includes `accounting`, the component also shows carried
|
|
673
|
+
forward funds, funds withheld for costs, in-flight allocations and paid principal
|
|
674
|
+
net of verified payout returns. Its source table separates in-flight and paid
|
|
675
|
+
amounts. These metrics are omitted for older assessments without accounting
|
|
676
|
+
fields. They are never inferred from the current Stripe available balance.
|
|
677
|
+
|
|
678
|
+
`policy={undefined}` means loading. A null policy or `stripe_managed` mode shows
|
|
679
|
+
Stripe-managed defaults without inventing a numeric provider floor. Changing
|
|
680
|
+
policies suppress prior financial progress. For a ready custom policy, an
|
|
681
|
+
undefined preview means loading; a null or minimal held preview shows an
|
|
682
|
+
unavailable assessment rather than fabricated zero balances. A mismatched
|
|
683
|
+
currency or configured minimum rejects the display.
|
|
684
|
+
|
|
685
|
+
Use the `children` render prop for translated labels and application cards. It
|
|
686
|
+
receives `status`, `reason`, `metrics`, `sources`, `progress`, `observedAt`,
|
|
687
|
+
`nextAttemptAt`, `holdDeadline` and optional `accounting`. Accounting metric keys
|
|
688
|
+
are `carried`, `withheld`, `reserved` and `released`. Metrics include raw minor-unit
|
|
689
|
+
amounts as well as formatted values. Render props use the same state calculation
|
|
690
|
+
as the native markup; replace the English message with your own translated copy
|
|
691
|
+
selected by `status` and `reason`.
|
|
692
|
+
|
|
693
|
+
Scope and refresh the host data when the recipient or settlement currency
|
|
694
|
+
changes. Keep currencies separate. This display does not configure policies,
|
|
695
|
+
install a scheduler or bypass the release API's capability/history limits.
|
|
696
|
+
|
|
697
|
+
## Payout settings
|
|
698
|
+
|
|
699
|
+
`PayoutSettings` and `usePayoutSettings` own minimum entry, explicit custom-hold
|
|
700
|
+
consent, loading/error states and callback locking. They never create a payout.
|
|
701
|
+
`onSave` receives `{ currency, mode, expectedRevision, minimum?, consent }`.
|
|
702
|
+
The minimum uses ordinary Stripe currency units. No provider floor is guessed.
|
|
703
|
+
The host must derive the authenticated account/owner, preserve the policy's
|
|
704
|
+
other currency minimums, and call `payoutPolicy.prepare` and `apply` with a
|
|
705
|
+
stable immutable operation identity. Return `{ status, reason? }`; supported
|
|
706
|
+
statuses are `ready`, `unsupported`, `migration_required`, `schedule_drift` and
|
|
707
|
+
`canceled`.
|
|
708
|
+
|
|
709
|
+
When a provider outcome is unknown, refresh the policy instead of inventing
|
|
710
|
+
success or creating a new operation. `onRetry` resumes the server's stored
|
|
711
|
+
pending operation; the installed recurring job also resumes it. The editor
|
|
712
|
+
locks changes while `policy.status` is `changing`. Render props expose the same
|
|
713
|
+
state for translated forms and design-system controls.
|
|
714
|
+
|
|
715
|
+
The example's `recipientPayoutPolicy` actions bind the demo user to its account
|
|
716
|
+
server-side and derive uncollected seller costs through the same query as the
|
|
717
|
+
worker. They preserve other currencies, replay stored changes without rolling
|
|
718
|
+
back newer settings, and restore the original schedule on opt-out. The public
|
|
719
|
+
`payoutPreviewValidator` lets the host validate the package assessment without
|
|
720
|
+
copying its return schema. Production apps must replace demo persona selection
|
|
721
|
+
with authenticated ownership; the demo is not evidence of production auth.
|
|
722
|
+
|
|
723
|
+
Custom schedules affect the entire recipient account. Configure each settlement
|
|
724
|
+
currency. Choosing Stripe-managed mode restores the original schedule for all
|
|
725
|
+
currencies and removes application minimums. Funded accounts needing historical
|
|
726
|
+
adoption show `migration_required`; this form does not guess their source
|
|
727
|
+
allocations or automatically adopt unallocated money. Install worker recovery
|
|
728
|
+
and deadline-expiry jobs before exposing activation, and use the reset guard
|
|
729
|
+
described in the [settlement guide](settlement.md#development-reset-safeguards).
|
|
730
|
+
|
|
643
731
|
## Component history and currency summaries
|
|
644
732
|
|
|
645
733
|
See the [read contract guide](read-contracts.md) for reactive product, price and payout
|
package/docs/settlement.md
CHANGED
|
@@ -643,6 +643,29 @@ pending credits never qualify. `amount` is the amount currently qualified for th
|
|
|
643
643
|
supported bank payout rail, or zero when held. `providerMinimum: null` means the
|
|
644
644
|
numeric Stripe floor is unknown, not zero.
|
|
645
645
|
|
|
646
|
+
Detailed assessments also include an optional `accounting` object, in the
|
|
647
|
+
selected currency's minor units:
|
|
648
|
+
|
|
649
|
+
| Field | Meaning |
|
|
650
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
651
|
+
| `carriedForwardAmount` | Positive combined mature unpaid entitlement minus the amount eligible now. Held funds remain owed. |
|
|
652
|
+
| `withheldAmount` | Mature unpaid funds earmarked for confirmed fees and independent liabilities, capped at the funds available to withhold. |
|
|
653
|
+
| `reservedAmount` | Source allocations reserved for in-flight payouts. These are separate from completed payouts. |
|
|
654
|
+
| `releasedAmount` | Verified paid principal, less verified payout returns. |
|
|
655
|
+
|
|
656
|
+
Each source category also includes `reservedAmount` and `releasedAmount`.
|
|
657
|
+
The component checks source allocation rollups against persisted payout claims
|
|
658
|
+
before reporting these amounts or reserving a new payout. Inconsistent or
|
|
659
|
+
incomplete claim history rejects the assessment. Shared costs are not assigned
|
|
660
|
+
to individual source categories. A refund after a completed bank payout reduces
|
|
661
|
+
future entitlement; it does not erase the paid principal unless Stripe verifies
|
|
662
|
+
that the bank payout itself returned. Full outstanding obligations remain in
|
|
663
|
+
`independentLiabilities` even when funds available to withhold are smaller.
|
|
664
|
+
|
|
665
|
+
Older detailed results can omit `accounting` and the source payout fields.
|
|
666
|
+
Treat omitted fields as unavailable, never as zero. Minimal held results do not
|
|
667
|
+
include accounting totals.
|
|
668
|
+
|
|
646
669
|
Below-threshold funds remain owed. `insufficient_available` distinguishes enough
|
|
647
670
|
qualifying earnings from insufficient provider funds on the supported rail. Some
|
|
648
671
|
holds return only `{ status: "held", reason, amount: 0 }`, including incomplete
|
package/package.json
CHANGED
|
@@ -26,6 +26,12 @@ it("previews combined eligibility and source categories without creating or rese
|
|
|
26
26
|
pendingCredits: 0,
|
|
27
27
|
threshold: 1000,
|
|
28
28
|
providerMinimum: null,
|
|
29
|
+
accounting: {
|
|
30
|
+
carriedForwardAmount: 0,
|
|
31
|
+
withheldAmount: 0,
|
|
32
|
+
reservedAmount: 0,
|
|
33
|
+
releasedAmount: 0,
|
|
34
|
+
},
|
|
29
35
|
sources: [
|
|
30
36
|
{ role: "store", matureUnpaid: 600, pendingCredits: 0 },
|
|
31
37
|
{ role: "affiliate", matureUnpaid: 400, pendingCredits: 0 },
|
|
@@ -48,6 +54,12 @@ it("shows below-threshold carry forward and independent liabilities", async () =
|
|
|
48
54
|
matureUnpaid: 899,
|
|
49
55
|
amount: 0,
|
|
50
56
|
independentLiabilities: 100,
|
|
57
|
+
accounting: {
|
|
58
|
+
carriedForwardAmount: 899,
|
|
59
|
+
withheldAmount: 100,
|
|
60
|
+
reservedAmount: 0,
|
|
61
|
+
releasedAmount: 0,
|
|
62
|
+
},
|
|
51
63
|
});
|
|
52
64
|
expect(s.provider.payouts.create).not.toHaveBeenCalled();
|
|
53
65
|
});
|
|
@@ -71,6 +83,17 @@ it("subtracts a previously paid claim while verifying its current provider recei
|
|
|
71
83
|
reason: "below_threshold",
|
|
72
84
|
matureUnpaid: 0,
|
|
73
85
|
amount: 0,
|
|
86
|
+
accounting: {
|
|
87
|
+
carriedForwardAmount: 0,
|
|
88
|
+
withheldAmount: 0,
|
|
89
|
+
reservedAmount: 0,
|
|
90
|
+
releasedAmount: 1000,
|
|
91
|
+
},
|
|
92
|
+
sources: [
|
|
93
|
+
{ role: "store", releasedAmount: 600, reservedAmount: 0 },
|
|
94
|
+
{ role: "affiliate", releasedAmount: 400, reservedAmount: 0 },
|
|
95
|
+
{ role: "other", releasedAmount: 0, reservedAmount: 0 },
|
|
96
|
+
],
|
|
74
97
|
});
|
|
75
98
|
expect(s.provider.payouts.create).toHaveBeenCalledTimes(1);
|
|
76
99
|
});
|
|
@@ -145,6 +168,12 @@ it("deducts confirmed payout costs without attributing shared costs to a source
|
|
|
145
168
|
reason: "below_threshold",
|
|
146
169
|
matureUnpaid: 950,
|
|
147
170
|
confirmedFees: 150,
|
|
171
|
+
accounting: {
|
|
172
|
+
carriedForwardAmount: 950,
|
|
173
|
+
withheldAmount: 150,
|
|
174
|
+
reservedAmount: 0,
|
|
175
|
+
releasedAmount: 0,
|
|
176
|
+
},
|
|
148
177
|
sources: [
|
|
149
178
|
{ role: "store", matureUnpaid: 700 },
|
|
150
179
|
{ role: "affiliate", matureUnpaid: 400 },
|
|
@@ -259,6 +288,12 @@ it("preserves negative affiliate entitlement when a paid commission is refunded"
|
|
|
259
288
|
reason: "below_threshold",
|
|
260
289
|
amount: 0,
|
|
261
290
|
matureUnpaid: -100,
|
|
291
|
+
accounting: {
|
|
292
|
+
carriedForwardAmount: 0,
|
|
293
|
+
withheldAmount: 0,
|
|
294
|
+
reservedAmount: 0,
|
|
295
|
+
releasedAmount: 1000,
|
|
296
|
+
},
|
|
262
297
|
sources: [
|
|
263
298
|
{ role: "store", matureUnpaid: 0 },
|
|
264
299
|
{ role: "affiliate", matureUnpaid: -100 },
|
|
@@ -267,3 +302,113 @@ it("preserves negative affiliate entitlement when a paid commission is refunded"
|
|
|
267
302
|
});
|
|
268
303
|
expect(s.provider.payouts.create).toHaveBeenCalledTimes(1);
|
|
269
304
|
});
|
|
305
|
+
it("caps actual withholding at mature unpaid funds when obligations exceed them", async () => {
|
|
306
|
+
const s = await preview([60, 40]);
|
|
307
|
+
expect(await s.preview({ independentLiabilities: 1000 })).toMatchObject({
|
|
308
|
+
matureUnpaid: -900,
|
|
309
|
+
accounting: {
|
|
310
|
+
carriedForwardAmount: 0,
|
|
311
|
+
withheldAmount: 100,
|
|
312
|
+
reservedAmount: 0,
|
|
313
|
+
releasedAmount: 0,
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
it("reports unpaid funds outside the supported-rail cap as carried forward", async () => {
|
|
318
|
+
const s = await preview([1000, 500]);
|
|
319
|
+
s.provider.balance.retrieve.mockResolvedValue({
|
|
320
|
+
available: [
|
|
321
|
+
{ currency: "usd", amount: 1500, source_types: { card: 1000 } },
|
|
322
|
+
],
|
|
323
|
+
pending: [],
|
|
324
|
+
});
|
|
325
|
+
expect(await s.preview()).toMatchObject({
|
|
326
|
+
status: "qualified",
|
|
327
|
+
amount: 1000,
|
|
328
|
+
matureUnpaid: 1500,
|
|
329
|
+
accounting: {
|
|
330
|
+
carriedForwardAmount: 500,
|
|
331
|
+
withheldAmount: 0,
|
|
332
|
+
reservedAmount: 0,
|
|
333
|
+
releasedAmount: 0,
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
it("refuses paid allocation totals without corresponding payout claims", async () => {
|
|
338
|
+
const s = await preview();
|
|
339
|
+
await s.t.run((ctx) =>
|
|
340
|
+
ctx.db.insert("payoutSourceAllocations", {
|
|
341
|
+
accountId: scope.accountId,
|
|
342
|
+
ownerKey: scope.ownerKey,
|
|
343
|
+
currency: "usd",
|
|
344
|
+
stripeTransferId: "tr_0",
|
|
345
|
+
paidAmount: 600,
|
|
346
|
+
reservedAmount: 0,
|
|
347
|
+
}),
|
|
348
|
+
);
|
|
349
|
+
await expect(s.preview()).rejects.toThrow(/allocation totals/i);
|
|
350
|
+
expect(s.provider.payouts.create).not.toHaveBeenCalled();
|
|
351
|
+
});
|
|
352
|
+
it("keeps a submitted payout reserved until Stripe verifies it as paid", async () => {
|
|
353
|
+
const s = await preview();
|
|
354
|
+
const create = s.provider.payouts.create.getMockImplementation()!;
|
|
355
|
+
s.provider.payouts.create.mockImplementation(async (args) => {
|
|
356
|
+
const payout = await create(args);
|
|
357
|
+
payout.status = "pending";
|
|
358
|
+
return payout;
|
|
359
|
+
});
|
|
360
|
+
expect(await s.run()).toMatchObject({
|
|
361
|
+
status: "updated",
|
|
362
|
+
claim: { status: "submitted" },
|
|
363
|
+
});
|
|
364
|
+
expect(await s.preview()).toMatchObject({
|
|
365
|
+
matureUnpaid: 0,
|
|
366
|
+
accounting: {
|
|
367
|
+
releasedAmount: 0,
|
|
368
|
+
reservedAmount: 1000,
|
|
369
|
+
carriedForwardAmount: 0,
|
|
370
|
+
withheldAmount: 0,
|
|
371
|
+
},
|
|
372
|
+
sources: [
|
|
373
|
+
{ role: "store", releasedAmount: 0, reservedAmount: 600 },
|
|
374
|
+
{ role: "affiliate", releasedAmount: 0, reservedAmount: 400 },
|
|
375
|
+
{ role: "other", releasedAmount: 0, reservedAmount: 0 },
|
|
376
|
+
],
|
|
377
|
+
});
|
|
378
|
+
(await s.provider.payouts.retrieve())!.status = "paid";
|
|
379
|
+
expect(await s.preview()).toMatchObject({
|
|
380
|
+
accounting: { releasedAmount: 1000, reservedAmount: 0 },
|
|
381
|
+
});
|
|
382
|
+
expect(s.provider.payouts.create).toHaveBeenCalledTimes(1);
|
|
383
|
+
});
|
|
384
|
+
it("removes a verified returned payout from released totals without forfeiting the funds", async () => {
|
|
385
|
+
const s = await preview();
|
|
386
|
+
await s.run();
|
|
387
|
+
Object.assign((await s.provider.payouts.retrieve())!, {
|
|
388
|
+
status: "failed",
|
|
389
|
+
failure_balance_transaction: "txn_return",
|
|
390
|
+
});
|
|
391
|
+
s.setTransactions([
|
|
392
|
+
{
|
|
393
|
+
...s.transactions()[0],
|
|
394
|
+
id: "txn_return",
|
|
395
|
+
source: "po_one",
|
|
396
|
+
amount: 1000,
|
|
397
|
+
net: 1000,
|
|
398
|
+
type: "payout_failure",
|
|
399
|
+
},
|
|
400
|
+
...s.transactions(),
|
|
401
|
+
]);
|
|
402
|
+
expect(await s.preview()).toMatchObject({
|
|
403
|
+
status: "qualified",
|
|
404
|
+
amount: 1000,
|
|
405
|
+
matureUnpaid: 1000,
|
|
406
|
+
accounting: {
|
|
407
|
+
releasedAmount: 0,
|
|
408
|
+
reservedAmount: 0,
|
|
409
|
+
carriedForwardAmount: 0,
|
|
410
|
+
withheldAmount: 0,
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
expect(s.provider.payouts.create).toHaveBeenCalledTimes(1);
|
|
414
|
+
});
|
|
@@ -126,6 +126,19 @@ it("persists original provider settings, verifies manual schedule and restores o
|
|
|
126
126
|
});
|
|
127
127
|
expect((await client.get(ctx, scope))!.mode).toBe("stripe_managed");
|
|
128
128
|
});
|
|
129
|
+
it("replays equivalent threshold objects regardless of transport property order", async () => {
|
|
130
|
+
const { client, ctx, provider } = await setup();
|
|
131
|
+
expect((await client.prepare(ctx, options)).status).toBe("prepared");
|
|
132
|
+
expect(
|
|
133
|
+
(
|
|
134
|
+
await client.prepare(ctx, {
|
|
135
|
+
...options,
|
|
136
|
+
thresholds: [{ amount: 1000, currency: "usd" }],
|
|
137
|
+
})
|
|
138
|
+
).status,
|
|
139
|
+
).toBe("prepared");
|
|
140
|
+
expect(provider.balanceSettings.update).not.toHaveBeenCalled();
|
|
141
|
+
});
|
|
129
142
|
it("recovers provider success after a failed persistence write without changing the request", async () => {
|
|
130
143
|
const { client, ctx, provider } = await setup();
|
|
131
144
|
await client.prepare(ctx, options);
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
type PayoutPreviewOptions,
|
|
4
4
|
} from "./connect/payoutPreview.js";
|
|
5
5
|
export type * from "./connect/payoutPreview.js";
|
|
6
|
+
export { previewResult as payoutPreviewValidator } from "../component/payoutRelease/preview.js";
|
|
6
7
|
import { PayoutWorkerClient } from "./connect/payoutWorker.js";
|
|
7
8
|
export type * from "./connect/payoutWorker.js";
|
|
8
9
|
import {
|
|
@@ -312,7 +313,10 @@ export class PayoutPolicyClient {
|
|
|
312
313
|
if (
|
|
313
314
|
prior.mode !== opts.mode ||
|
|
314
315
|
prior.expectedRevision !== opts.expectedRevision ||
|
|
315
|
-
!equal(
|
|
316
|
+
!equal(
|
|
317
|
+
canonicalThresholds(prior.thresholds, prior.mode === "custom"),
|
|
318
|
+
thresholds,
|
|
319
|
+
) ||
|
|
316
320
|
Boolean(prior.adoption) !== Boolean(opts.adoptExistingBalance)
|
|
317
321
|
)
|
|
318
322
|
throw new Error("Payout policy operation identity cannot be reused.");
|