feat: add routes-d billing, wallet, payout, and close endpoints#1083
Closed
HasToBeJames wants to merge 1 commit into
Closed
feat: add routes-d billing, wallet, payout, and close endpoints#1083HasToBeJames wants to merge 1 commit into
HasToBeJames wants to merge 1 commit into
Conversation
|
@HasToBeJames is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@HasToBeJames Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
Superseded by #1088 which contains the same work. Closing this duplicate. |
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
Add the missing routes-d endpoints for billing plan lookup, wallet pending balances, payout method defaulting, and account closure with a reason.
Closes #1046
Closes #1027
Closes #1034
Closes #1047
Changes proposed
What were you told to do?
Implement the four routes-d issues in one PR, using the documented paths, auth/ownership checks, structured errors, and unit tests.
What did I do?
Billing and wallet endpoints
GET /api/routes-d/billing/planto return the authenticated user's active subscription summary.GET /api/routes-d/wallet/pendingto return pending invoice totals for the authenticated wallet owner.Default payout method and account close
PATCH /api/routes-d/payout-methods/[id]/defaultto promote a payout method and clear the previous default.POST /api/routes-d/account/closeto create a pending account closure request with a reason and grace window.Verification
Check List (Check all the applicable boxes)
Screenshots / Testing Evidence
node node_modules\\eslint\\bin\\eslint.jspassed for the touched route files and tests.npx vitest run tests/api.routes-d.billing-plan.test.ts tests/api.routes-d.wallet-pending.test.ts tests/api.routes-d.payout-methods.default.test.ts tests/api.routes-d.account-close.test.tspassed: 4 files, 16 tests.node node_modules\\typescript\\bin\\tsc --noEmitreported no errors in the touched files.