Skip to content

feat(cards): add VOIDED card transaction status - #993

Merged
whoisglover merged 4 commits into
mainfrom
ajay/at-6592-voided-contract
Sep 14, 2026
Merged

whoisglover merged 4 commits into
mainfrom
ajay/at-6592-voided-contract

Conversation

@jaymantri

@jaymantri jaymantri commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Jira: AT-6592

Follow-up contract for webdev #34889.

What this does

Adds the terminal VOIDED card transaction status and matching CARD_TRANSACTION.VOIDED webhook event. DECLINED means the authorization was refused before approval. VOIDED means an approved authorization was fully reversed or expired before any clearing posted, with authorizedAmount: 0 and no settledAmount. SETTLED means clearing posted.

The source schemas, generated OpenAPI bundles, and the three card lifecycle snippets now describe the same contract.

Verification

  • make build
  • make lint

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri
jaymantri requested a review from jklein24 September 14, 2026 18:08
@mintlify

mintlify Bot commented Sep 14, 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 14, 2026, 8:49 PM

@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Sep 14, 2026 8:47pm UTC
grid-flow-builder Ignored Ignored Preview Sep 14, 2026 8:47pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 14, 2026 8:47pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli

chore(internal): regenerate SDK with no functional changes

go

feat(api): add VOIDED status to card transaction and webhook event types

kotlin

feat(api): add VOIDED status and webhook event to card transactions

openapi

feat(api): add VOIDED status to card transaction lifecycle and webhooks

php

feat(api): add VOIDED status to card transactions and webhook events

python

feat(api): add VOIDED status/event to card_transaction

ruby

feat(api): add VOIDED status to card_transaction and card_transaction_webhook_event

typescript

feat(api): add VOIDED status and webhook event to card transactions
⚠️ grid-typescript studio · conflict

Your SDK build had at least one error diagnostic.

⚠️ grid-openapi studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗

⚠️ grid-ruby studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

⚠️ grid-kotlin studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

⚠️ grid-go studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

go get github.com/stainless-sdks/grid-go@7188a44872cace1f7b1beb778e41c700a0f214ab
⚠️ grid-python studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️

⚠️ grid-php studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → lint ⏭️ → test ⏭️

⚠️ grid-cli studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗ → build ⏭️ → lint ⏭️ → test ⏭️


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-14 22:19:30 UTC

@greptile-apps

greptile-apps Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the contract and documentation consistently represent the new voided lifecycle outcome.

Summary

This PR extends the card transaction contract with the terminal VOIDED status for approved authorizations that expire or are fully reversed before clearing.

  • Adds VOIDED to the card transaction status and CARD_TRANSACTION.VOIDED to the webhook type and payload schemas.
  • Updates sandbox reversal and expiry behavior, webhook examples, generated OpenAPI bundles, and card lifecycle documentation.
  • Clarifies that DECLINED is an authorization decision rather than a later transition from an approved authorization.
  • Both previous review findings are resolved in the current code.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    REQUEST[Authorization request] -->|refused| DECLINED
    REQUEST -->|approved| AUTHORIZED
    AUTHORIZED -->|fully reversed or expired| VOIDED
    AUTHORIZED -->|clearing posts| PARTIAL[PARTIALLY_SETTLED]
    AUTHORIZED -->|all clearing posts| SETTLED
    PARTIAL -->|remaining clearing posts| SETTLED
    AUTHORIZED -->|network settles but pull fails| EXCEPTION
    PARTIAL -->|network settles but pull fails| EXCEPTION
Loading

Reviews (4) · Last reviewed commit: "docs(cards): clarify declined authorizat..."

Comment thread openapi/components/schemas/webhooks/WebhookType.yaml
Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai review

@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

@jaymantri

Copy link
Copy Markdown
Contributor Author

@faraday review

@ls-bolt

ls-bolt Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

⚡ Running fastpass on this PR first (https://zeus.dev.dev.sparkinfra.net/#/instance?id=throbbing-keysend). A full council convenes only if fastpass assesses the risk at critical or above. Post a new comment '@faraday full review' to convene one anyway.

@ls-bolt

ls-bolt Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

📌 Bolt Status

2026-09-14 19:37:41 UTC — ⚡ Agent throbbing-keysend(#1) started


Feedback

@lightspark-faraday lightspark-faraday Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings without a diff anchor:

P2 mintlify/changelog.mdx:40 - The changelog still says card-transaction status tracks settlement only, contradicting the newly documented authorization-outcome statuses.

Lines 24-30 define DECLINED and VOIDED for declined or reversed authorizations, while line 40 says "A card transaction's status tracks settlement only." Clients reading the same release note receive incompatible descriptions of what the status represents.

No diff anchor, so there is no thread to reply on. To dismiss this finding, comment on the PR: fastpass dismiss 07b29a4d

P2 openapi.yaml - Generator inputs (source schemas under openapi/) changed to add VOIDED, and the openapi.yaml/mintlify/openapi.yaml bundles were regenerated, but no downstream generated API client in the repo was regenerated alongside them, so any checked-in client SDK may now be out of sync with the new VOIDED enum value.

GENERATED CODE FACTS: "generator inputs changed (mintlify/openapi.yaml, openapi.yaml) but no a regenerated API client changed in this PR - regeneration may be missing (12 non-input changed file(s) were checked at head for a generated-file header marker... none is generator output)".

No diff anchor, so there is no thread to reply on. To dismiss this finding, comment on the PR: fastpass dismiss 84de81e3

Comment thread mintlify/snippets/cards/webhooks.mdx Outdated
@lightspark-faraday

Copy link
Copy Markdown

Faraday review

fastpass advisory - comment-only, never blocks a merge. To retire a finding, either fix it or reply explaining why it is wrong: a rebuttal gets an agree or disagree answer on the thread, and if you reply again after a disagreement we concede. Acknowledging it ("will fix") or resolving the thread does not retire it on its own. This comment is edited in place every round; inline findings still post as new comments each round.

Faraday score: 4/5 (P2/P3 findings) - 5 nothing blocking open | 4 non-blocking only | 3 one blocking open | 2 two | 1 a P0 or 3+ blocking; never drops without a new blocker

Still open:

  • P2 mintlify/changelog.mdx:40 - The changelog still says card-transaction status tracks settlement only, contradicting the newly documented… fp:07b29a4d
  • P2 mintlify/snippets/cards/webhooks.mdx:124 - The 'later deliveries' sentence now omits DECLINED from the list of statuses a later webhook delivery can carry for… · github · graphite fp:0cd46ee3
  • P2 openapi.yaml:n/a (generated bundle) - Generator inputs (source schemas under openapi/) changed to add VOIDED, and the openapi.yaml/mintlify/openapi.yaml… fp:84de81e3

9648d756382e | 1 inline + 2 in-body finding(s) (3 new) | 0 suggestion(s) | 0 refuted pre-post | route_deep: false

fastpass re-review: 3 new finding(s).

This summary supersedes the per-round summary blocks on the faraday reviews above; those are left in place as history and are not edited.

@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai review

@jaymantri

Copy link
Copy Markdown
Contributor Author

Faraday in-body findings:

  • mintlify/changelog.mdx:40 is fixed in 9e084d16: status now tracks authorization outcomes and settlement, which covers terminal DECLINED and VOIDED.
  • The generated-client claim does not apply to this repository. package.json:6-9 defines generation as bundling openapi/openapi.yaml into openapi.yaml and copying it to mintlify/openapi.yaml. SDK generation runs externally through Stainless: openapi/README.md:694-727 documents that flow, and .github/workflows/stainless-action.yml:34-40 submits the bundled spec for PR preview builds. The only checked-in generated TypeScript files are bank-account field maps; their generators read only ExternalAccountCreateInfoOneOf (components/grid-wallet-{demo,prod}/scripts/generate-bank-fields.mjs:51-99), so the card-status enum cannot affect them. No generated API client is checked into this repo.

fastpass dismiss 84de81e3

@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

Comment thread mintlify/snippets/cards/webhooks.mdx Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

@greptileai review

@jaymantri

Copy link
Copy Markdown
Contributor Author

@codex review

@whoisglover
whoisglover merged commit 453a9da into main Sep 14, 2026
11 checks passed
@whoisglover
whoisglover deleted the ajay/at-6592-voided-contract branch September 14, 2026 22:16

This branch was successfully deployed

1 active deployment
staging - mintlify — 65f68a1f Deployed Sep 14, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants