You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Congratulations, @SagaciousBoss! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @SagaciousBoss: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
PayoutEngine had no execution path. Auto-approved and manually approved batches were stamped completed without anything being sent, executing was unreachable dead state, and there was no failure or retry path.
Added a guarded pending -> executing -> completed | failed transition table. A batch is only marked completed when the rail returns a transaction hash, and a rail that resolves without one is treated as a failed attempt.
Added an injected executor that actually settles the batch and receives a stable idempotencyKey on every attempt, so a rail can deduplicate a replay.
Added exponential backoff with jitter, capped by maxAttempts. payout.delayed events carry the scheduled retry time.
daily / weekly / monthly now respect their period, and calendar batches are keyed by period bucket so a replayed evaluation pass cannot pay the same period twice. Previously all three cadences fired on every pass whenever a balance was pending.
thresholdAmount of 0 or undefined is now rejected instead of falling through to the "pay anything" branch.
Emit payout.created, payout.pending_review, payout.executing, payout.completed, payout.failed and payout.delayed through a pluggable sink. A subscriber that throws is ignored, so a webhook outage cannot abort a payout decision.
Exhausted batches keep their reservation rather than auto-releasing it. Returning the funds would immediately mint a fresh batch and spin against a rail that is already down; an approver calls releaseReservedFunds instead. The held amount is visible in stats().reservedAmount.
The retry worker never pushes a batch that owed human review past that review — it returns to the approval queue.
One merchant's misconfiguration is isolated so it cannot block every other merchant in the same pass.
Added the /api/v1/payouts REST surface, mounted in backend/src/index.ts. This also implements payout.completed, which the webhook subscriptions UI already advertised but nothing emitted server-side.
Tests:services/payouts/__tests__/payout-engine.test.ts covers execution, stable idempotency keys across attempts, backoff growth (30s -> 60s -> 120s), attempt exhaustion, reservation release, calendar cadence, period-bucket cycle keys, event emission, per-merchant isolation and concurrent-pass collapse. New routes/__tests__/payouts.test.ts covers the HTTP lifecycle.
😎 @SagaciousBoss: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Activity
Obaara293 commentedon Oct 17, 2026
@Obaara293 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Obaara293 to this issue.
SagaciousBoss commentedon Oct 17, 2026
@SagaciousBoss has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @SagaciousBoss to this issue.
drips-wave commentedon Oct 17, 2026
Congratulations, @SagaciousBoss! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @SagaciousBoss: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
feat: payout execution, money correctness and payout API security (#1183
SagaciousBoss commentedon Oct 17, 2026
Delivered in #1290 (merged).
Payout reliability work in that PR:
PayoutEnginehad no execution path. Auto-approved and manually approved batches were stampedcompletedwithout anything being sent,executingwas unreachable dead state, and there was no failure or retry path.pending -> executing -> completed | failedtransition table. A batch is only markedcompletedwhen the rail returns a transaction hash, and a rail that resolves without one is treated as a failed attempt.executorthat actually settles the batch and receives a stableidempotencyKeyon every attempt, so a rail can deduplicate a replay.maxAttempts.payout.delayedevents carry the scheduled retry time.daily/weekly/monthlynow respect their period, and calendar batches are keyed by period bucket so a replayed evaluation pass cannot pay the same period twice. Previously all three cadences fired on every pass whenever a balance was pending.thresholdAmountof0orundefinedis now rejected instead of falling through to the "pay anything" branch.payout.created,payout.pending_review,payout.executing,payout.completed,payout.failedandpayout.delayedthrough a pluggable sink. A subscriber that throws is ignored, so a webhook outage cannot abort a payout decision.releaseReservedFundsinstead. The held amount is visible instats().reservedAmount./api/v1/payoutsREST surface, mounted inbackend/src/index.ts. This also implementspayout.completed, which the webhook subscriptions UI already advertised but nothing emitted server-side.Tests:
services/payouts/__tests__/payout-engine.test.tscovers execution, stable idempotency keys across attempts, backoff growth (30s -> 60s -> 120s), attempt exhaustion, reservation release, calendar cadence, period-bucket cycle keys, event emission, per-merchant isolation and concurrent-pass collapse. Newroutes/__tests__/payouts.test.tscovers the HTTP lifecycle.Docs:
docs/PAYOUT_RELIABILITY.md.drips-wave commentedon Oct 17, 2026
This issue has been completed by @SagaciousBoss as part of the Stellar Wave Program's 10th Wave 🥳
😎 @SagaciousBoss: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
fix: correct the type errors introduced in Smartdevs17#1290 (Smartdev…