Skip to content

Move per-transaction spending limits onto cards - #818

Draft
DhruvPareek wants to merge 1 commit into
mainfrom
dp/card-spend-limits-api
Draft

Move per-transaction spending limits onto cards#818
DhruvPareek wants to merge 1 commit into
mainfrom
dp/card-spend-limits-api

Conversation

@DhruvPareek

@DhruvPareek DhruvPareek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Card spending limits are tied to delegated keys, so custodial-funded cards cannot use the same control. Move the optional single per-transaction limit to card create, update, and resource schemas and remove it from delegated-key contracts; omitted or empty means unlimited, and state=CLOSED cannot be combined with a limit update. This is intentionally breaking because the card program has no active production cards, so no legacy contract or backfill is retained.

Test Plan

  • npm run lint:openapi bundles and validates both published OpenAPI documents

@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Aug 12, 2026, 9:48 PM

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Aug 12, 2026 9:47pm
grid-wallet-demo Ignored Ignored Preview Aug 12, 2026 9:47pm

Request Review

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

oasdiff reports 2 error / 4 warning changes to openapi.yaml.
This PR will need approval from an API reviewer before merge.

Errors (2)

  • POST webhook:card-funding-source-change — added the new required request property allOf[subschema #2]/data/spendingLimits [new-required-request-property].
  • POST webhook:card-state-change — added the new required request property allOf[subschema #2]/data/spendingLimits [new-required-request-property].

Warnings (4)

Show sample
  • GET /auth/delegated-keys — removed the optional property data/items/spendingLimits from the response with the 200 status [response-optional-property-removed].
  • POST /auth/delegated-keys — removed the request property spendingLimits [request-property-removed].
  • POST /auth/delegated-keys — removed the optional property spendingLimits from the response with the 201 status [response-optional-property-removed].
  • GET /auth/delegated-keys/{id} — removed the optional property spendingLimits from the response with the 200 status [response-optional-property-removed].

Detected by oasdiff. Full report: job summary or the oasdiff-report artifact.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@DhruvPareek DhruvPareek changed the title feat(grid-api): move card spending limits onto cards Move per-transaction spending limits onto cards Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

feat(api): add spendingLimits to cards update and issue

go

feat(api): add spendingLimits to card create, update, response, and webhooks

kotlin

feat(api): add spendingLimits field to Card model and create/update requests

openapi

feat(api): add spendingLimits to cards create/update, remove from delegated keys

php

feat(api): add spendingLimits field and parameters to cards

python

feat(api): add spending_limits to cards issue/update methods and response

ruby

feat(api): add spending_limits to card create/update methods and response

typescript

feat(api): add spendingLimits parameter and field to cards

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/75d50feff8d0e737e4e16e4e02114450a999cfe3/dist.tar.gz
New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-openapi studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-ruby studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ✅test ✅

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-go studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@4d696599f423366dc1663a43530191182e3466a8
New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-kotlin studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ✅lint ✅test ❗

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
⚠️ grid-python studio · code · diff

Your SDK build had a failure in the build CI job, which is a regression from the base state.
generate ✅build ❗ (prev: build ✅) → lint ❗test ❗

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-php studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅lint ✅test ✅

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`
grid-cli studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ❗lint ❗test ❗

New diagnostics (1 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/CardSpendingLimit`

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-08-12 21:53:24 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant