Card contract: Idempotency-Key + 409s, DECLINED status, CARD_TRANSACTION.DECLINED, threeDSecurePassword#686
Card contract: Idempotency-Key + 409s, DECLINED status, CARD_TRANSACTION.DECLINED, threeDSecurePassword#686kphurley7 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
✱ Stainless preview builds for gridThis PR will update the cli go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-typescript studio · code · diff
✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-go studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-python studio · code · diff
✅ grid-php studio · code · diff
✅ grid-cli studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
…webhook
- POST /cards declares the Idempotency-Key header (same shape as the
money-movement operations); required for EU card programs.
- POST /cards and PATCH /cards/{id} declare 409 conflict responses via
the existing Error409 component (idempotency replay conflicts;
provider state conflicts).
- New CARD.TRANSACTION_UPDATE webhook type + CardTransactionUpdateWebhook
payload (mirrors CardStateChangeWebhook; data = CardTransaction),
registered in the webhook operations and card docs snippets.
Bundles regenerated with make build; lint clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018kzvhCS9mZrkHaH7E5EQ94
Upstream #690 merged a canonical per-status card-transaction webhook contract (CARD_TRANSACTION.AUTHORIZED/PARTIALLY_SETTLED/SETTLED/ REFUNDED/EXCEPTION) that supersedes this branch's single CARD.TRANSACTION_UPDATE type. Drop CardTransactionUpdateWebhook and its operation/registration/enum value, rewrite the card doc snippets to the family semantics, and extend the family with CARD_TRANSACTION.DECLINED (webhook enum, operation description, and a declined example) to match the DECLINED terminal status this branch adds to CardTransactionStatus. Bundles regenerated with make build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018kzvhCS9mZrkHaH7E5EQ94
4e82188 to
2edd585
Compare
Contract prerequisite (C1) for the Striga-under-Grid card work (design: lightsparkdev/webdev#30261; server-side stack lightsparkdev/webdev#30314 → #30403).
Changes
POST /cards: declares theIdempotency-Keyheader, mirroring the money-movement operations' shape. The server now requires it for card programs on EUR-funded (EU) platforms, where card creation is a non-idempotent fee-bearing provider call.POST /cards+PATCH /cards/{id}: declare the 409 responses the server actually emits (key replayed with a different body / same key still processing; provider-reported state conflicts), reusing the existingError409component. No new error codes invented.DECLINEDterminal status onCardTransactionStatus: declined authorizations are first-class transactions (no funds moved, terminal), needed for read parity with the EU provider's decline stream.CARD_TRANSACTION.DECLINEDwebhook type: extends theCARD_TRANSACTION.*family merged in feat(webhooks): add CARD_TRANSACTION webhook contract #690 (this branch originally proposed a singleCARD.TRANSACTION_UPDATEtype; rebased onto the merged family and dropped the competing type). Includes a declined delivery example and doc-snippet rework to the per-status family semantics.threeDSecurePassword(write-only, optional, 8-36 chars) on card create: static 3-D Secure challenge password pass-through for EU card programs; Grid generates when omitted; rejected on programs without a static-password factor.Bundles regenerated with
make build(Redocly).Known conformance note (not changed here)
The existing PATCH 409 prose says
state: CLOSEDon an already-CLOSED card returnsCARD_ALREADY_CLOSED— the server implementation (both providers) actually treats CLOSED→CLOSED as an idempotent 200. Reconciling contract-vs-implementation is part of the card contract-conformance workstream (design §10 Phase 0a).