Skip to content

feat(cards): send card authorization requests to webhookEndpoint, configured through platform config - #1247

Merged
AaryamanBhute merged 5 commits into
mainfrom
card-authorization-endpoint-in-config
Oct 28, 2026
Merged

AaryamanBhute merged 5 commits into
mainfrom
card-authorization-endpoint-in-config

Conversation

@AaryamanBhute

@AaryamanBhute AaryamanBhute commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1212, addressing Shreya's review: card authorization needs neither its own resource nor its own URL.

Changes

  • Removes GET/PUT/DELETE /platform/card-authorization-endpoint and CardAuthorizationEndpointRequest.
  • CARD_AUTHORIZATION.REQUEST now goes to the platform's existing webhookEndpoint.
  • Adds cardConfigs.realTimeAuthorization (nullable CardRealTimeAuthorization with one field, timeoutBehavior), set through PATCH /platform/config. Omitting it keeps the setting, null turns real-time authorization off, and an object turns it on or updates it.
  • Drops isTest from CardAuthorizationRequest, along with the test delivery that gated saving the endpoint and its 400 WEBHOOK_DELIVERY_ERROR.
  • The response deadline is a fixed 1.5s, stated in the docs, and is not returned in the config.
  • Updates the real-time authorization docs, the webhook descriptions, the decline-reason and timeout-behavior descriptions, and the Stainless model config.

Nothing calls the removed resource yet. The webdev implementation (lightsparkdev/webdev#38554–#38557) has not merged and is being reworked to match.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 28, 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 Oct 28, 2026 9:20pm UTC
grid-flow-builder Ignored Ignored Preview Oct 28, 2026 9:20pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 28, 2026 9:20pm UTC

Request Review

@mintlify

mintlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 28, 2026, 9:22 PM

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

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

Errors (3)

  • DELETE /platform/card-authorization-endpoint — api path removed without deprecation [api-path-removed-without-deprecation].
  • GET /platform/card-authorization-endpoint — api path removed without deprecation [api-path-removed-without-deprecation].
  • PUT /platform/card-authorization-endpoint — api path removed without deprecation [api-path-removed-without-deprecation].

Warnings (1)

Show sample
  • POST webhook:card-authorization-request — removed the request property allOf[subschema #2]/data/isTest [request-property-removed].

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

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable contract or documentation issues were found.

Summary

Moves real-time card authorization to the platform's existing webhookEndpoint.

  • Card authorization decisions now use the platform’s shared webhook endpoint.
  • The separate card authorization endpoint and test enrollment are removed.

No actionable issues were found.

Diagram

sequenceDiagram
    participant P as Platform
    participant G as Grid
    participant W as webhookEndpoint
    P->>G: PATCH config to enable real-time authorization
    Note over G: Run Grid's authorization checks
    G->>W: Signed CARD_AUTHORIZATION.REQUEST
    alt Valid decision within 1.5 seconds
        W-->>G: APPROVE or DECLINE
    else Late or invalid response
        Note over G: Apply timeoutBehavior
    end
    Note over G: Check funding if proceeding
    G->>W: CARD_TRANSACTION outcome
Loading

Reviews (2) · Last reviewed commit: "docs(cards): tidy real-time authorizatio..." · Reviewed by Greptile

@ls-bolt

ls-bolt Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🦣 Congratulations @shreyav - your substantive review earned a Siberian unicorn! (rare)

This giant grazing rhinoceros carried a huge domed boss that supported a horn.

View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/shreyav?section=ice-age

@ls-bolt

ls-bolt Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

📌 Bolt Status

2026-10-28 20:43:09 UTC — ⚡ Agent lunar-compass-f7(#1) started


Feedback

@ls-bolt

ls-bolt Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Review rounds — updated in place, latest first.

Round 2 · 99eca73

  • Moved the CardRealTimeAuthorization Stainless model under platform config, removed the duplicated schema description, and reworded the PATCH description to call it a decision request (per @shreyav).
  • npm run lint:openapi reports 0 errors. Skipped the adversarial review because this round only changes docs and config placement.
Earlier rounds (1)

Round 1 · 05b5a3e

Commits

  • 429465a feat(cards): set the card authorization endpoint through platform config

  • 637acd1 docs(cards): an unset authorization endpoint reads as null

  • d718c17 docs(cards): state the 1.5s authorization deadline instead of returning it

  • 05b5a3e feat(cards): send card authorization requests to the platform webhookEndpoint

  • CARD_AUTHORIZATION.REQUEST now goes to webhookEndpoint, and cardConfigs.authorizationEndpoint is replaced by cardConfigs.realTimeAuthorization: { timeoutBehavior } | null (per @AaryamanBhute and @shreyav).

  • Dropped isTest, the pre-save test delivery, and the PATCH's 400 WEBHOOK_DELIVERY_ERROR.

  • Rebased onto main and rebuilt both bundles. npm run lint:openapi reports 0 errors. Adversarial review found nothing actionable.

AaryamanBhute and others added 4 commits October 28, 2026 20:46
Moves the endpoint from its own /platform/card-authorization-endpoint
resource into cardConfigs.authorizationEndpoint on PATCH /platform/config,
where every other platform setting lives. The test request now runs on the
PATCH, and a failed test request rejects the whole update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng it

responseTimeoutMs is a single global value that integrators can't act on,
and lowering it would be a breaking change, so the deadline is now part of
the documented contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Endpoint

Replace cardConfigs.authorizationEndpoint with cardConfigs.realTimeAuthorization,
which carries only timeoutBehavior. CARD_AUTHORIZATION.REQUEST now goes to the
platform's webhookEndpoint. Drop the isTest request and the test delivery that
gated saving the endpoint.

Co-Authored-By: AaryamanBhute <AaryamanBhute@users.noreply.github.com>
Co-Authored-By: shreyav <shreyav@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ls-bolt
ls-bolt Bot force-pushed the card-authorization-endpoint-in-config branch from 6f255bb to 05b5a3e Compare October 28, 2026 20:47
@ls-bolt ls-bolt Bot changed the title feat(cards): set the card authorization endpoint through platform config feat(cards): send card authorization requests to webhookEndpoint, configured through platform config Oct 28, 2026

Copy link
Copy Markdown

@ls-bolt

ls-bolt Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Review ledger

Round 1

  1. Use the existing webhook endpoint instead of a separate URL (@shreyav, decided by @AaryamanBhute) → FIXED: openapi/components/schemas/config/CardConfig.yaml realTimeAuthorization, openapi/webhooks/card-authorization-request.yaml
  2. isTest is overly complicated (@shreyav, @AaryamanBhute: drop it) → FIXED: removed from CardAuthorizationRequest.yaml along with the test delivery
  3. responseTimeoutMs shouldn't be returned (@shreyav) → FIXED: earlier round. 1.5s is a documented constant.

Round 2

  1. Stainless model should move near platform config (@shreyav) → FIXED: .stainless/stainless.yml platform config models
  2. Duplicated description (@shreyav) → FIXED: removed from CardRealTimeAuthorization.yaml
  3. Reword the PATCH description: "enable real-time card authorization requests" (@shreyav) → FIXED: openapi/paths/platform/config.yaml
  4. Is it a decision request? (@shreyav) → FIXED: the PATCH description now names it a CARD_AUTHORIZATION.REQUEST decision request

Comment thread .stainless/stainless.yml Resolved
Comment thread openapi/paths/platform/config.yaml Resolved
Move the CardRealTimeAuthorization Stainless model under platform config,
keep one description of the setting, and call the request a decision request
in the PATCH description.

Co-Authored-By: shreyav <shreyav@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AaryamanBhute
AaryamanBhute merged commit 3969566 into main Oct 28, 2026
12 checks passed
@AaryamanBhute
AaryamanBhute deleted the card-authorization-endpoint-in-config branch October 28, 2026 21:33

This branch was successfully deployed

1 active deployment
staging - mintlify — 99eca733 Deployed Oct 28, 2026 by mintlify[bot]
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.

4 participants