Repository navigation
feat(cards): add PENDING_AUTH funding authorization status - #1108
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
| Revoke an `ACTIVE` delegated signing key. An active card using this funding | ||
| source becomes `PENDING` with `statusReason: "DELEGATION_REQUIRED"`. Frozen | ||
| and closed cards retain their status. Grid uses the custodied |
There was a problem hiding this comment.
Revocation guidance conflicts The new contract says revoking a delegated key moves an active card to
PENDING, but the Embedded Wallet funding guide still says the card stays ACTIVE and every authorization declines. Please align the guide so integrators expect the right status and troubleshoot a missing key using the right flow.
Knowledge Base Used: Cards API
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/paths/auth/auth_delegated-keys_{id}.yaml
Line: 48-50
Comment:
**Revocation guidance conflicts** The new contract says revoking a delegated key moves an active card to `PENDING`, but the Embedded Wallet funding guide still says the card stays `ACTIVE` and every authorization declines. Please align the guide so integrators expect the right status and troubleshoot a missing key using the right flow.
**Knowledge Base Used:** [Cards API](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/cards-api.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
af80af0 to
0e7033f
Compare
| PROCESSING ──► ACTIVE ◄──► FROZEN | ||
| │ | ||
| └──► CLOSED | ||
| USD: PROCESSING ──► ACTIVE ◄──► FROZEN |
There was a problem hiding this comment.
hmm, this is missing PENDING_KYC?
There was a problem hiding this comment.
or maybe we remove PENDING_KYC and make sure its represented as a statusReason?
There was a problem hiding this comment.
Also just curious but what if it needs KYC AND delegation. Are we sure this will still work properly in that case?
There was a problem hiding this comment.
Yea if we need KYC and delegation, we are in PROCESSING status because something still needs to be done on our side. If:
- KYC completes, status moves to PENDING
- Delegation completes, status moces to PROCESSING
There was a problem hiding this comment.
PROCESSING is also the status when KYC needs to be approved on our side
| | State | When you see it | | ||
| |-------|-----------------| | ||
| | `PROCESSING` | Returned synchronously from `POST /cards`. The card cannot transact yet. | | ||
| | `PENDING` | The issuer has provisioned the card, but its USDB Embedded Wallet funding source has no active delegated key. Complete delegated-key setup. | |
There was a problem hiding this comment.
Can we make this more specific? PENDING_DELEGATED_AUTH?
There was a problem hiding this comment.
ah nvm i see 'statusReason'
|
🦣 Congratulations @benwgold - your substantive review earned a Giant moa! (common)
View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/benwgold?section=ice-age |
| enum: | ||
| - PENDING_KYC | ||
| - PROCESSING | ||
| - PENDING |
There was a problem hiding this comment.
should we call it PENDING_AUTH or NEEDS_AUTH, i feel like PENDING is kinda confusing with PENDING_KYC
|
🦣 Congratulations @shreyav - your substantive review earned a Sinomastodon! (common)
View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/shreyav?section=ice-age |
0e7033f to
0ed23fc
Compare
0ed23fc to
fc54e5a
Compare
Merge activity
|

Reason
A provisioned USDB Embedded Wallet card cannot fund purchases until its delegated signing key is usable. Exposing it as ACTIVE hides the remaining signed authorization steps, including when an active USD card is switched to USDB.
Overview
PENDING_AUTHandDELEGATION_REQUIREDto the public card lifecycle.CLOSEDtransitions in both USD and USDB lifecycle diagrams, including closure from pending and frozen cards.PENDING_AUTH → FROZENstatus-change webhooks, and automatic activation after the final delegated-key retry or a switch back to USD.409 INVALID_STATE_TRANSITION; callers cannot request PENDING_AUTH.CARD_NOT_ACTIVEdeclines on new synchronous authorizations, and recovery through both signed retries. Preserve the existing state definitions and asynchronous issuance wording, and rebuild both bundled specifications.make lintuses the tools installed bynpm ci; the global install was failing on an unpublished dependency before lint ran.The webdev implementation is separately gated by
card_program.pending_state.enabled, default off. Coordinate this contract with webdev #36815 (generated artifacts) and the implementation stack: core lifecycle #36857, delegation/backfill #36859, issuer provisioning #36860, and dashboard #36816. Publishing these docs does not enable the rollout. The webdev stack has been rebased and validated against currentmain.The card status
PENDING_AUTHdistinguishes funding authorization fromPENDING_KYC. Delegated keys retain their separatePENDINGstatus.Test Plan
make build— passed; regeneratedopenapi.yamlandmintlify/openapi.yaml.make lint— passed with 0 errors and existing warnings/informational findings.node_modules/.bin/markdownlint mintlify/snippets/cards/funding-sources.mdx mintlify/snippets/cards/implementation-overview.mdx mintlify/snippets/cards/intro.mdx mintlify/snippets/cards/issuing-cards.mdx mintlify/snippets/cards/quickstart.mdx mintlify/snippets/cards/webhooks.mdx— passed.git diff --check— passed.node_modules/.bin/markdownlint mintlify/snippets/cards/embedded-wallet-funding.mdx— passed after aligning the pending/revocation guidance.CI refresh: restacked onto Grid API main at
a80638013eadc4675ddbd762cca83e4851bf4a14;npm run lintpassed with 0 errors, Markdown lint passed for all changed card snippets, and the bundled source matches webdev’s vendored spec byte-for-byte. The webdevgrid-api-speccheck still requires this PR to merge before the generated-artifact PR.