Haoxuanxu/add retrieve approval policy route - #342
Open
haoxuanxu-stripe wants to merge 4 commits into
Open
haoxuanxu-stripe wants to merge 4 commits into
haoxuanxu-stripe wants to merge 4 commits into
Conversation
haoxuanxu-stripe
force-pushed
the
haoxuanxu/add-retrieve-spending-policy-route
branch
from
September 21, 2026 16:24
37b861b to
7e848f7
Compare
haoxuanxu-stripe
force-pushed
the
haoxuanxu/add-retrieve-spending-policy-route
branch
from
September 21, 2026 16:32
7e848f7 to
7da0945
Compare
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
Add Approval Policy retrieval support to
link-cliand@stripe/link-sdk, aligned with the server contract from [mint#2599662](https://git.corp.stripe.com/stripe-internal/mint/pull/2599662).
link-cli approval-policy retrieveLink.approvalPolicy.retrieve()to the SDKGET /approval-policyspend_request_createrules with required per-purchase limits and optional allowed payment methodsResponse examples
Configured policy:
{ "rules": [ { "action": "spend_request_create", "limits": { "per_purchase": { "amount": 5000, "currency": "usd" } }, "allowed_payment_methods": ["balance"] } ] } An explicitly configured empty policy: { "rules": [] } No configured policy returns HTTP 404: { "error": { "message": "No approval policy has been configured", "code": "approval_policy_not_found" } }Motivation
The original implementation targeted the Spending Policy API from mint#2586017. That API was subsequently replaced by Approval Policy, and /spending-policy now intentionally returns
404.
Test plan
Rollout/revert plan
The server endpoint is already deployed behind enable_approval_policy_api. This is an unreleased client feature, so no compatibility alias or migration is required. Safe to revert.