Skip to content

feat: sandbox simulate endpoints for the full card-event set#684

Draft
ls-bolt[bot] wants to merge 1 commit into
mainfrom
07-13-plan-sandbox-card-event-simulate-endpoints
Draft

feat: sandbox simulate endpoints for the full card-event set#684
ls-bolt[bot] wants to merge 1 commit into
mainfrom
07-13-plan-sandbox-card-event-simulate-endpoints

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Jul 13, 2026

Copy link
Copy Markdown

Summary

Adds the 7 remaining sandbox card-event simulate endpoints, completing the set alongside the existing authorization, clearing, and return simulators. Each is POST, sandbox-only, and returns 202 with { "issuerTransactionToken": string } — the simulate call drives the card issuer's sandbox and the resulting card operation is delivered asynchronously via webhook.

New endpoints (all under /sandbox/cards/{id}/simulate/):

Path Request body
balance_inquiry SandboxCardBalanceInquiryRequest (merchant only — a $0 inquiry)
credit_authorization SandboxCardAuthorizationRequest
financial_authorization SandboxCardAuthorizationRequest
financial_credit_authorization SandboxCardAuthorizationRequest
authorization_advice SandboxCardAuthorizationAdviceRequest (cardTransactionId + new total amount)
credit_authorization_advice SandboxCardAuthorizationRequest
return_reversal SandboxCardTransactionRefRequest (cardTransactionId)

New schemas: SandboxCardBalanceInquiryRequest, SandboxCardAuthorizationAdviceRequest, SandboxCardTransactionRefRequest, and a shared SandboxCardSimulationResponse ({ issuerTransactionToken }). SandboxCardAuthorizationRequest and CardMerchant are reused.

Response correction to the existing 3 simulators: they were documented as 200 returning a full CardTransaction, but these simulators are asynchronous — they return an issuer transaction token and deliver the resulting card operation over webhook. This PR corrects authorization, clearing, and return to 202 / SandboxCardSimulationResponse so the whole simulate family is consistent.

Intentionally excluded: authorization expiry and authorization reversal / void — neither has a card-issuer simulate path.

Notes

  • The simulate/* path segments are snake_case to match the card issuer's simulate routes verbatim, so they're exempted from the repo's kebab-case path convention (scoped carve-outs in .spectral.yaml and .redocly.lint-ignore.yaml, not a global relaxation).
  • No info.version bump: no breaking change to an existing published contract — this documents new endpoints and corrects the stale response shape on the existing simulators.

Test plan

  • make build — rebundles openapi.yaml + mintlify/openapi.yaml; both contain the 7 new paths, 7 operationIds, and the 4 new schemas.
  • make lint — passes (Redocly + Spectral + markdown), 0 errors.

@vercel

vercel Bot commented Jul 13, 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 Jul 13, 2026 10:47pm
grid-wallet-demo Ignored Ignored Preview Jul 13, 2026 10:47pm

Request Review

@ls-bolt ls-bolt Bot added the bolt label Jul 13, 2026

akanter commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

Add 7 sandbox card-event simulate endpoints, mirroring the existing
authorization/clearing/return simulators: balance_inquiry,
credit_authorization, financial_authorization, financial_credit_authorization,
authorization_advice, credit_authorization_advice, return_reversal. All POST,
sandbox-only, 202 -> { issuerTransactionToken }.

Correct the existing 3 simulators' documented success response from
200/CardTransaction to 202/SandboxCardSimulationResponse to match the actual
issuer-driven, webhook-delivered behavior.

Authorization expiry and authorization reversal/void are intentionally excluded
(no card-issuer simulate path).

Co-Authored-By: aaryamanbhute <aaryamanbhute@users.noreply.github.com>
@ls-bolt
ls-bolt Bot force-pushed the 07-13-plan-sandbox-card-event-simulate-endpoints branch from 079aa28 to 61be3a2 Compare July 13, 2026 22:47
@ls-bolt ls-bolt Bot changed the title plan-sandbox-card-event-simulate-endpoints feat: sandbox simulate endpoints for the full card-event set Jul 13, 2026
@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

This PR introduces breaking changes to openapi.yaml:

API Changelog 2025-10-13 vs. 2025-10-13

API Changes

POST /sandbox/cards/{id}/simulate/authorization

  • ⚠️ removed the success response with the status 200

POST /sandbox/cards/{id}/simulate/clearing

  • ⚠️ removed the success response with the status 200

POST /sandbox/cards/{id}/simulate/return

  • ⚠️ removed the success response with the status 200

Detected by oasdiff. This PR will need approval from an API reviewer before merge.

@github-actions

github-actions Bot commented Jul 13, 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

fix(api): update return types for sandbox card simulate methods

kotlin

fix(api): update return types for sandbox cards simulate methods

openapi

feat(api): add 7 sandbox card simulations, update 3 existing to async responses

php

fix(types): use specific response types for sandbox cards simulate methods

python

fix(types): correct return types for sandbox cards simulate methods

ruby

fix(api): correct return types for sandbox cards simulate methods

typescript

fix(types): correct return types in sandbox.cards.simulate methods

Edit this comment to update them. They will appear in their respective SDK's changelogs.

⚠️ grid-typescript studio · code · diff

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅ (prev: build ⏭️) → lint ❗ (prev: lint ⏭️) → test ✅

npm install https://pkg.stainless.com/s/grid-typescript/92d6cc497e9dda8293eadfe492a150eb5cdfa751/dist.tar.gz
New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-openapi studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️

New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-ruby studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ✅test ✅

New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-go studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@d6d1ddc0e76bec303869c9ff81e22b6fa8618347
New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-kotlin studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ✅lint ✅test ❗

New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-python studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/a5b57876de6194b66b69d57ba166a7ccc2eba9c9/grid-0.0.1-py3-none-any.whl
New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-php studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅lint ✅test ✅

New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`
grid-cli studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️build ❗lint ❗test ❗

New diagnostics (7 note)
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/balance_inquiry`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/financial_credit_authorization`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/credit_authorization_advice`
💡 Endpoint/NotConfigured: Skipped endpoint because it's not in your Stainless config: `post /sandbox/cards/{id}/simulate/return_reversal`

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-07-13 22:52:22 UTC

@ls-bolt

ls-bolt Bot commented Jul 13, 2026

Copy link
Copy Markdown
Author

Heads-up for whoever claims/publishes this: the Stainless preview bot derives each SDK's changelog message from the branch name, so it currently shows feat: plan-sandbox-card-event-simulate-endpoints (the branch has a plan- prefix from the planning phase). The bot regenerates on each push, so editing the comment doesn't stick. To get clean SDK changelogs, either publish from a branch without the plan- prefix (e.g. on reauthor/claim) or edit the Stainless comment right before merge. The PR title and commit message are already clean.

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.

2 participants