Skip to content

feat(payment)!: create_mppx_server consumes dict[str, *RailSpec] - #43

Merged
vvillait88 merged 1 commit into
mainfrom
feat/304d-mppx-server-railspec
May 14, 2026
Merged

feat(payment)!: create_mppx_server consumes dict[str, *RailSpec]#43
vvillait88 merged 1 commit into
mainfrom
feat/304d-mppx-server-railspec

Conversation

@vvillait88

Copy link
Copy Markdown
Contributor

Summary

Drop the legacy MppxRails / TempoChargeRail / TempoSessionRail / StripeRail config wrappers; create_mppx_server now consumes the canonical *RailSpec types every other helper (build_accepted_methods, build_how_to_pay, mpp_payment_handler, ...) already takes.

Migration

# before
mpp = await create_mppx_server(
    secret_key=...,
    rails=MppxRails(tempo=TempoChargeRail(recipient=...)),
)

# after
mpp = await create_mppx_server(
    secret_key=...,
    rails={"tempo": TempoRailSpec(recipient=...)},
)

Keys are rail names (tempo, tempo_session, stripe); values are the matching *RailSpec. First resolvable rail in dict-insertion order wins.

Test plan

  • pytest green (1064 tests pass; coverage 95.24%)
  • ty check clean
  • ruff check clean
  • Example doc updated

BREAKING: drop MppxRails, TempoChargeRail, TempoSessionRail, StripeRail in
favor of the canonical *RailSpec types every other helper already consumes.
Migration:

    create_mppx_server(secret_key=..., rails={
        'tempo': TempoRailSpec(recipient=...),
        'stripe': StripeRailSpec(profile_id=..., secret_key=...),
    })

Single source of truth for rail config across the SDK.
@vvillait88
vvillait88 merged commit 03eecba into main May 14, 2026
7 checks passed
@vvillait88
vvillait88 deleted the feat/304d-mppx-server-railspec branch May 14, 2026 21:21
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