Skip to content

rename the card transaction EXCEPTION status to DECLINED - #925

Draft
ls-bolt[bot] wants to merge 2 commits into
mainfrom
09-09-rename-card-exception-to-declined
Draft

rename the card transaction EXCEPTION status to DECLINED#925
ls-bolt[bot] wants to merge 2 commits into
mainfrom
09-09-rename-card-exception-to-declined

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the card transaction status EXCEPTION to DECLINED, and the matching webhook type CARD_TRANSACTION.EXCEPTION to CARD_TRANSACTION.DECLINED.

The status is where every card transaction that fails to move money ends up — an auth the issuer refused as well as a settlement whose funding-source pull failed. EXCEPTION reads as an error condition; DECLINED names the transaction outcome, and matches how the rest of the card surface already talks about refused auths (the sandbox suffix table calls 002 and 003 "Decline").

Nothing about the behavior changes: the same transitions reach the status, the payload shape is unchanged, and the status has always been derived on read.

What changed

Spec (openapi/)

  • CardTransactionStatusEXCEPTIONDECLINED. The status-table row now covers both ways a transaction reaches it (refused auth, failed pull) rather than only the post-hoc pull failure.
  • WebhookType and CardTransactionWebhook.typeCARD_TRANSACTION.EXCEPTIONCARD_TRANSACTION.DECLINED.
  • CardPullSummary.pendingCount and the sandbox authorization simulator description — updated to name the new status.
  • webhooks/card-transaction.yaml — the description, the exception example key (now declined), and its type / status values.

Docs (mintlify/snippets/cards/)

reconciliation (status table, transition diagram, and the "The DECLINED path" section), terminology (the "Exception" entry is now "Decline"), webhooks, implementation-overview, sandbox-testing, intro, and the reconciliation page's frontmatter description.

The reconciliation diagram also gained a direct auth refused ──► DECLINED entry path. Broadening the status description to cover refused auths made the old diagram — which showed DECLINED only as a branch off the settlement path — misleading, since it implied every declined transaction must first have been AUTHORIZED.

Changelog

A September 2026 entry recording the rename and what integrators need to update.

Bundles

openapi.yaml and mintlify/openapi.yaml regenerated via make build.

Breaking change

This renames a value on the public CardTransactionStatus enum and a public webhook type. info.version is unchanged, matching how the PENDING_ISSUEPROCESSING card-state rename (#588) and the REFUNDED removal (#909) landed on this early-stage surface.

info.version is the served path (https://api.lightspark.com/grid/2025-10-13), so bumping it means standing up and serving a second versioned path — a platform-level decision rather than one a single rename can make. It has never been bumped for a breaking change in this repo; #909 removed REFUNDED from this same enum yesterday and #923 removed a webhook type, neither touching it. The rule in CLAUDE.md came from #679, whose purpose was to revert bumps made for additive changes and pin the version to the one served path.

Test plan

  • make build — bundles regenerate cleanly and the bundled output contains no residual EXCEPTION.
  • make lint — Redocly reports "Your API description is valid", 2 warnings and 14 explicitly-ignored problems, identical to the counts on origin/main (verified by re-running lint against a stashed tree). Spectral passes at --fail-severity=error.
  • bolt-adversarial-review — no P0/P1/P2 findings, on both the initial diff and after the diagram fix.
  • Greptile — 5/5 confidence, no unresolved comments. It caught the diagram gap above (fixed) and asked for an info.version bump (declined, reasoning in the thread and below).

Server side

The sparkcore half of the rename is webdev#34632: the ent enum and its derivation branches, the webhook type mapping, the regenerated Python client (0.0.119), the internal GraphQL schema, and the ops/site dashboards. No migration — the status has been derived on read since the stored status column was dropped.

Requested by @AaryamanBhute

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
grid-flow-builder Ignored Ignored Preview Sep 9, 2026 10:20pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 9, 2026 10:20pm UTC

Request Review

@ls-bolt ls-bolt Bot added the bolt label Sep 9, 2026
@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

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

Errors (16)

  • POST webhook:agent-action — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:agent-action — removed the enum value EXCEPTION of the request property allOf[subschema #2]/data/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status [request-property-enum-value-removed].
  • POST webhook:bulk-upload — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-state-change — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-transaction — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-transaction — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[subschema #2]/type [request-property-enum-value-removed].
  • POST webhook:card-transaction — removed the enum value EXCEPTION of the request property allOf[subschema #2]/data/status [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:external-account-status — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:incoming-payment — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:internal-account-status — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:invitation-claimed — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:outgoing-payment — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:test-webhook — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:verification-update — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:wallet-operation — removed the enum value CARD_TRANSACTION.EXCEPTION of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].

Warnings (15)

Show sample
  • GET /agents/approvals — added the new DECLINED enum value to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /agents/me/actions — added the new DECLINED enum value to the data/items/transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /agents/me/actions/{actionId} — added the new DECLINED enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /agents/me/quotes/{quoteId}/execute — added the new DECLINED enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /agents/me/transactions — added the new DECLINED enum value to the data/items/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /agents/me/transactions/{transactionId} — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /agents/{agentId}/actions/{actionId}/approve — added the new DECLINED enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /agents/{agentId}/actions/{actionId}/reject — added the new DECLINED enum value to the transaction/allOf[#/components/schemas/TransactionOneOf]/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /sandbox/send — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /transactions — added the new DECLINED enum value to the data/items/oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • GET /transactions/{transactionId} — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /transactions/{transactionId}/cancel — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /transactions/{transactionId}/confirm — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 200 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /transfer-in — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.
  • POST /transfer-out — added the new DECLINED enum value to the oneOf[subschema #3: Card Transaction]/status response property for the response status 201 [response-property-enum-value-added]. Adding new enum values to response could be unexpected for clients, use x-extensible-enum instead.

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

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

**go**
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

kotlin
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

**openapi**
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

php
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

**python**
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

ruby
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

**typescript**
⏳ (generating...)```
feat: rename the card transaction EXCEPTION status to DECLINED

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

grid-typescript studio
grid-openapi studio
grid-ruby studio
grid-kotlin studio
grid-go studio
grid-python studio
grid-php studio
grid-cli studio

⏳ These are partial results; builds are still running.


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-09-09 22:31:34 UTC

@mintlify

mintlify Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 9, 2026, 8:57 PM

@ls-bolt

ls-bolt Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Server half is up: webdev#34632. It renames the sparkcore ent enum, the webhook type mapping, the regenerated Python client (0.0.119), the internal GraphQL schema, and the ops/site dashboards. No migration is needed — the card transaction status has been derived on read since the stored status column was dropped.


🤖 beaming-lightyear(#1) | Feedback

@ls-bolt

ls-bolt Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Renames the public card transaction failure outcome from EXCEPTION to DECLINED across the modular OpenAPI sources, generated bundles, webhook types, examples, documentation, and changelog.

  • Keeps the card transaction status and corresponding webhook event name aligned.
  • Expands the documented meaning to cover both refused authorizations and failed post-settlement pulls.
  • Adds the previously missing direct authorization-refusal path to the reconciliation diagram.
  • Documents the breaking integration change and the required comparison and subscription updates.

Confidence Score: 5/5

The PR appears safe to merge; the previously reported diagram omission is fixed and no actionable new issue remains.

The current schema, webhook contract, generated bundles, documentation, and changelog consistently use DECLINED. The versioning thread was resolved after Greptile accepted the author’s served-path and pre-GA context, and the direct refused-authorization path is now explicitly represented in the reconciliation diagram.

Important Files Changed

Filename Overview
openapi/components/schemas/cards/CardTransactionStatus.yaml Renames EXCEPTION to DECLINED and documents both refused-authorization and failed-pull outcomes.
openapi/components/schemas/webhooks/WebhookType.yaml Aligns the shared webhook event registry with CARD_TRANSACTION.DECLINED.
openapi/webhooks/card-transaction.yaml Updates card transaction webhook semantics and examples to use the renamed status and event type.
mintlify/snippets/cards/reconciliation.mdx Updates reconciliation guidance and now shows the direct refused-authorization transition requested in the previous review.
mintlify/changelog.mdx Clearly records the breaking rename and tells integrators which comparisons and subscriptions to update.
openapi.yaml Regenerated contract bundle remains aligned with the modular schema and webhook changes.
mintlify/openapi.yaml Regenerated documentation bundle consistently reflects the renamed public values.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    REFUSED[Authorization refused] --> DECLINED
    AUTH[AUTHORIZED] --> PARTIAL[PARTIALLY_SETTLED]
    PARTIAL --> SETTLED
    PARTIAL -->|Funding pull fails| DECLINED
Loading

Reviews (2): Last reviewed commit: "show the direct decline path in the reco..." | Re-trigger Greptile

Comment thread openapi/components/schemas/cards/CardTransactionStatus.yaml
Comment thread mintlify/snippets/cards/reconciliation.mdx
@ls-bolt

ls-bolt Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

⚡ Review ledger

Round 1

  1. Greptile P2 — "Diagram Omits Direct Declines": the transition diagram shows DECLINED only as a branch off the settlement path, while the table and webhook contract now say an auth can be refused directly into itFIXED in mintlify/snippets/cards/reconciliation.mdx: the diagram carries a direct auth refused ──► DECLINED entry plus a line stating such a transaction never passes through AUTHORIZED. This was a real gap I introduced by broadening the status description without updating the picture beside it.
  2. Greptile P1 — "Breaking Rename Lacks Versioning": info.version and servers.url stay at 2025-10-13 despite removing public enum values, against the CLAUDE.md ruleANSWERED, no change. info.version has never been bumped for a breaking change here — remove the REFUNDED card transaction status from the spec #909 removed REFUNDED from this same enum yesterday and remove the CARD.FUNDING_SOURCE_CHANGE webhook from the spec #923 removed a webhook type, neither touching it; Rename card status PENDING_ISSUEPROCESSING #588 renamed a public CardState value the same way. The rule came from Revert info.version to 2025-10-13 and document version-bump rule #679, which existed to revert bumps made for additive changes and pin the version to the single served path; bumping means standing up a second versioned server path, which is a platform-level decision this rename can't make unilaterally. The break is documented in the public changelog with upgrade instructions, and the surface is pre-GA (one SANDBOX platform has ever received a card webhook).

@ls-bolt

ls-bolt Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

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

Labels

bolt breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants