Repository navigation
Bound checkout payment URL work - #268
Merged
ValeraFinebits merged 2 commits intoNov 25, 2026
Merged
Conversation
Owner
|
@chavic Could we also add a test to make sure the limit of 16 new operations per second kicks in and resets as expected? |
Count new payment URL generations in fixed one-second windows read from an injected TimeProvider, so a test can drive the window without sleeping. The test fills the 16-start window, checks the next start is refused up to the last tick of the window, and checks a full new window opens once it ends.
ValeraFinebits
marked this pull request as ready for review
November 25, 2026 20:42
ValeraFinebits
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rate-limit the public Payjoin checkout payment URL endpoint by remote address. Cap concurrent invoice work and the rate of new work. Concurrent requests for the same invoice share one operation.
Return HTTP 429 with a retry hint at capacity. Checkout can still retry transient failures and fall back to the regular Bitcoin payment URI.