Skip to content

feat(payments): operator scope filters, priority_tip and the rotated-secret grace window - #55

Merged
pviti merged 1 commit into
mainfrom
feature/align-gateway-2026-10-09
Oct 12, 2026
Merged

pviti merged 1 commit into
mainfrom
feature/align-gateway-2026-10-09

Conversation

@pviti

@pviti pviti commented Oct 12, 2026

Copy link
Copy Markdown
Member

Summary

Aligns the gem with the gateway surface merged to main on 2026-10-09 (commercelayer/rail0-gateway#383 priority_tip, #389 webhook secret grace, #391 operator redrive, #397 GET /payments?scope=all). types.rb had been generated from the 2026-10-08 spec.

  • payments.list(scope: "all", account_id:, has_error:, expiring_within:) — the operator's cross-account list on the same call, admin session required (403 otherwise). has_error: false goes out as false (a filter, not an absence); expiring_within is seconds. Nothing is sent unless given, so a merchant's call is unchanged on the wire.
  • accounts.update(account_id, priority_tip: false) — the fee setting of the account's own transactions; get documents the new field. The ArgumentError for an empty update now names all three fields.
  • rotate_secret and Rail0::WebhookSignature docs: WEBHOOK_SECRET_GRACE and X-Rail0-Signature-Previous, so an endpoint still on the old secret verifies that header with the same verify.
  • redrive doc: payee-gated, or an operator session (audited as transaction.redrive).
  • lib/rail0/types.rb regenerated from the gateway main spec (operator structs AdminAction, AdministratorFull, CatalogDiff, PolicyReport, PolicySetting; Account#priority_tip). The /admin/* routes stay out of the SDK, as before.
  • README: scope: "all" examples, priority_tip, verifying under the previous signature header.
  • Specs: payments.list scope query (false included), accounts.update with priority_tip: false.

No breaking change; no version bump (cut at release). Twin branches: commercelayer/rail0-go#61, commercelayer/rail0-cli#171, commercelayer/rail0-ts#62.

Test plan

  • rspec (293 examples, 0 failures) and rubocop lib spec (no offenses) — run outside bundler locally (rbsecp256k1 6.0.1 does not build on this machine); CI runs the bundled versions
  • CI green

🤖 Generated with Claude Code

…secret grace window

Aligns the SDK with the gateway surface merged on 2026-10-09 (rail0-gateway #383,
#389, #391, #397); types.rb came from the 2026-10-08 spec.

- `payments.list` gains `scope:` ("mine"/"all"), `account_id:`, `has_error:` and
  `expiring_within:` — the operator's cross-account list on the standard
  GET /payments. Nothing is sent unless given.
- `accounts.update` takes `priority_tip:` (false is sent as false and switches
  the account's own transactions to the chain's minimum tip); `get` documents it.
- `rotate_secret` / `WebhookSignature` docs: the WEBHOOK_SECRET_GRACE window and
  X-Rail0-Signature-Previous; `redrive` doc: payee or an operator (audited).
- `lib/rail0/types.rb` regenerated from the gateway main spec (operator structs,
  Account#priority_tip).
- README: scope: "all" examples, priority_tip, verifying under the previous
  header; specs for the scope query (false included) and priority_tip: false.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pviti
pviti marked this pull request as ready for review October 12, 2026 10:31
@pviti
pviti merged commit 5e5245a into main Oct 12, 2026
2 checks passed
@pviti
pviti deleted the feature/align-gateway-2026-10-09 branch October 12, 2026 10:31
@pviti pviti mentioned this pull request Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant