feat: add Paykit subscriptions - #685
Open
ben-kaufman wants to merge 2 commits into
Open
Conversation
Greptile SummaryAdds payer-side Paykit subscriptions, recurring billing-period requests, notification routing, and payment-proof association.
Confidence Score: 3/5This PR should not merge until persisted proofs remain readable across upgrades and on-chain reconciliation prevents one transaction from proving multiple requests. Existing pending-proof records can permanently block proof reconciliation after upgrade, while address-and-amount-only transaction matching can associate one payment with multiple billing periods. Files Needing Attention: Bitkit/Services/PaykitPaymentProofService.swift
|
| Filename | Overview |
|---|---|
| Bitkit/Services/PaykitPaymentProofService.swift | Adds period-specific and delayed on-chain proof handling, but breaks decoding of existing persisted proofs and can reuse one txid across requests. |
| Bitkit/Services/PaykitPaymentRequestService.swift | Expands request synchronization and manager state for recurring subscriptions, presentation, dismissal, cancellation, and notifications. |
| Bitkit/Services/PaykitSubscription.swift | Defines subscription recurrence, billing periods, persisted state, and notification scheduling. |
| Bitkit/Views/Subscriptions/SubscriptionsView.swift | Adds the subscription proposal, overview, detail, success, and cancellation interfaces. |
| Bitkit/Views/Wallets/Send/SendConfirmationView.swift | Integrates initial subscription payments and uncertain on-chain outcomes into the shared send flow. |
| Bitkit/AppScene.swift | Coordinates subscription notification routing, proposal presentation, and delayed on-chain attribution. |
Sequence Diagram
sequenceDiagram
participant Provider
participant Paykit
participant Manager as Request Manager
participant UI as Subscription UI
participant Send as Send Flow
participant Proof as Proof Service
Provider->>Paykit: Private subscription proposal
Paykit->>Manager: Synchronize proposal
Manager->>UI: Present review
UI->>Manager: Accept subscription
Manager->>Paykit: Accept request
Manager->>Send: Open due billing period
Send->>Proof: Prepare and mark payment started
Send->>Proof: Complete payment
Proof->>Paykit: Submit period-specific proof
Proof-->>UI: Resolve success or retain retry state
Reviews (1): Last reviewed commit: "feat: add Paykit subscription payments" | Re-trigger Greptile
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.
Description
Adds the payer side of Paykit subscriptions, stacked on #683.
This PR intentionally covers payer-side receipt only. Subscription creation, Discover, automatic payment without confirmation, and renewal are not included because they are outside this MVP or are not currently exposed by Paykit.
Dependencies:
0.1.0-rc46Linked Issues/Tasks
Screenshot / Video
Final iOS and cross-platform proof recordings were completed locally; they are not attached to the PR.
QA Notes
Manual coverage:
Automated and static checks:
PaykitPaymentRequestServiceTestsPaykitPaymentProofServiceTestsgit diff --check