Skip to content

docs(openapi): document card pending auth state#591

Merged
DhruvPareek merged 1 commit into
mainfrom
dp/card-pending-auth-docs
Jun 18, 2026
Merged

docs(openapi): document card pending auth state#591
DhruvPareek merged 1 commit into
mainfrom
dp/card-pending-auth-docs

Conversation

@DhruvPareek

@DhruvPareek DhruvPareek commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Reason

Cards funded by Embedded Wallet internal accounts need card-specific delegated signing authorization before they can transact. The card issuance docs should expose the interim state that occurs after POST /cards but before POST /auth/delegated-keys completes for that card.

Overview

  • Add PENDING_AUTH to CardState.
  • Document that POST /cards may return cards in PENDING_AUTH when an Embedded Wallet internal account is used as a funding source.
  • Keep the documented progression as PENDING_AUTHPROCESSINGACTIVE for cards that complete delegated auth before issuer processing finishes.
  • Rebuild openapi.yaml and mintlify/openapi.yaml from the OpenAPI source.

Test Plan

  • make build
  • make lint-openapi

@vercel

vercel Bot commented Jun 16, 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 Jun 18, 2026 6:11pm
grid-wallet-demo Ignored Ignored Preview Jun 18, 2026 6:11pm

Request Review

DhruvPareek commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@DhruvPareek DhruvPareek marked this pull request as ready for review June 16, 2026 22:41
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli

docs(api): add Embedded Wallet requirements to funding-source parameter

csharp

feat(api): add PendingAuth state to card enums

go

feat(api): add PENDING_AUTH state to card lifecycle

kotlin

feat(api): add PENDING_AUTH state to cards

openapi

feat(api): add PENDING_AUTH state to card state enum

php

feat(api): add PENDING_AUTH state to cards

python

feat(api): add PENDING_AUTH state to cards

ruby

feat(api): add PENDING_AUTH state to card

typescript

feat(api): add PENDING_AUTH state to cards
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

grid-ruby studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-go studio · code

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

go get github.com/stainless-sdks/grid-go@102528a1f6992bd5910eafab9ec17247a5789067
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-python studio · code

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

pip install https://pkg.stainless.com/s/grid-python/8f609854f558c17e2e57856de0b26b177b441883/grid-0.0.1-py3-none-any.whl
⚠️ grid-csharp studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
generate ⚠️build ❗lint ✅test ❗

grid-php studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅lint ✅test ✅

grid-typescript studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/225d436a0923663cfe8e0152d5abdc0a12b160cc/dist.tar.gz
⚠️ grid-cli studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
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-06-18 18:51:51 UTC

@DhruvPareek DhruvPareek marked this pull request as draft June 16, 2026 22:43
@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR documents the new PENDING_AUTH card state introduced for cards backed by Embedded Wallet internal accounts. The source OpenAPI schema and both generated YAML files (openapi.yaml, mintlify/openapi.yaml) are updated consistently.

  • Adds PENDING_AUTH to the CardState enum and its description table, clearly explaining the state occurs before delegated-key authorization is completed via POST /auth/delegated-keys.
  • Updates the POST /cards operation description and 201 response description to document the PENDING_AUTHPROCESSINGACTIVE lifecycle for Embedded Wallet–funded cards.
  • Updates the webhook note to reflect that card.state_change fires on each state transition (not just ACTIVE).

Confidence Score: 5/5

Documentation-only change with no runtime code; all four files are internally consistent and the new state is accurately described.

The change adds a new enum value and accompanying prose to OpenAPI schema and generated YAML files. The lifecycle description, state table, 201 response description, and webhook note are all mutually consistent. The two generated files match each other and the source exactly.

No files require special attention.

Important Files Changed

Filename Overview
openapi/components/schemas/cards/CardState.yaml Adds PENDING_AUTH to the enum and the description table with an accurate, consistent explanation. Enum ordering is logical (KYC → AUTH → PROCESSING → ACTIVE → FROZEN → CLOSED).
openapi/paths/cards/cards.yaml Adds two paragraphs explaining PENDING_AUTH and the delegated-key flow; updates the 201 response description and the webhook note. Content is accurate to the described lifecycle.
openapi.yaml Generated file, identical changes to the source — enum entry added, description table row added, POST /cards description and 201 response updated correctly.
mintlify/openapi.yaml Generated file, mirrors openapi.yaml changes exactly — no drift between the two generated outputs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([POST /cards]) --> B{Embedded Wallet\nfunding source?}
    B -- Yes --> C[PENDING_AUTH\nCannot transact]
    B -- No --> E[PROCESSING\nIssuer provisioning]
    C -- POST /auth/delegated-keys\ncompletes --> E
    E -- Issuer approves --> F[ACTIVE\nCan transact]
    E -- Issuer rejects --> G[CLOSED\nstateReason: ISSUER_REJECTED]
    F -- Platform freezes --> H[FROZEN\nTemporarily disabled]
    H -- Platform unfreezes --> F
    F -- Platform closes --> G
    H -- Platform closes --> G
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A([POST /cards]) --> B{Embedded Wallet\nfunding source?}
    B -- Yes --> C[PENDING_AUTH\nCannot transact]
    B -- No --> E[PROCESSING\nIssuer provisioning]
    C -- POST /auth/delegated-keys\ncompletes --> E
    E -- Issuer approves --> F[ACTIVE\nCan transact]
    E -- Issuer rejects --> G[CLOSED\nstateReason: ISSUER_REJECTED]
    F -- Platform freezes --> H[FROZEN\nTemporarily disabled]
    H -- Platform unfreezes --> F
    F -- Platform closes --> G
    H -- Platform closes --> G
Loading

Reviews (7): Last reviewed commit: "docs(openapi): document card pending aut..." | Re-trigger Greptile

Comment thread openapi/paths/cards/cards.yaml
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch from a6e46b4 to 1c1d631 Compare June 16, 2026 22:47
@DhruvPareek DhruvPareek marked this pull request as ready for review June 16, 2026 22:48
@DhruvPareek DhruvPareek force-pushed the dp/delegated-keys-endpoints branch from 951aca3 to a5a89b7 Compare June 17, 2026 01:27
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch 2 times, most recently from 808855c to f450dee Compare June 17, 2026 20:12
@DhruvPareek DhruvPareek force-pushed the dp/delegated-keys-endpoints branch from a5a89b7 to b8e1af2 Compare June 17, 2026 20:12
@DhruvPareek DhruvPareek requested a review from shreyav June 17, 2026 21:08
@DhruvPareek DhruvPareek force-pushed the dp/delegated-keys-endpoints branch from b8e1af2 to f0d1d07 Compare June 17, 2026 21:36
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch from f450dee to 4d3da23 Compare June 17, 2026 21:36
@DhruvPareek DhruvPareek force-pushed the dp/delegated-keys-endpoints branch 2 times, most recently from bdc0231 to 8897e44 Compare June 18, 2026 18:03
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch from 4d3da23 to 3f2648c Compare June 18, 2026 18:03
@DhruvPareek DhruvPareek changed the base branch from dp/delegated-keys-endpoints to graphite-base/591 June 18, 2026 18:10
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch from 3f2648c to 014201d Compare June 18, 2026 18:10
@graphite-app graphite-app Bot changed the base branch from graphite-base/591 to main June 18, 2026 18:10
Add PENDING_AUTH to CardState and explain how cards funded by Embedded Wallet internal accounts remain pending until delegated signing authorization is completed via POST /auth/delegated-keys.
@DhruvPareek DhruvPareek force-pushed the dp/card-pending-auth-docs branch from 014201d to 2eb6cd5 Compare June 18, 2026 18:10
@DhruvPareek DhruvPareek merged commit 5ebb4e0 into main Jun 18, 2026
10 of 11 checks passed

Copy link
Copy Markdown
Contributor Author

Merge activity

@DhruvPareek DhruvPareek deleted the dp/card-pending-auth-docs branch June 18, 2026 18:44
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