feat: sandbox simulate endpoints for the full card-event set#684
feat: sandbox simulate endpoints for the full card-event set#684ls-bolt[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
079aa28 to
61be3a2
Compare
|
✱ 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. |
|
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 |
|
@greptile review |
Greptile SummaryThis PR completes the sandbox card-event simulator family by adding 7 new
Confidence Score: 5/5Safe to merge — adds sandbox-only simulate endpoints with no changes to production paths, and the response-shape correction on the 3 existing simulators is a documentation fix that aligns with the actual async contract. All changes are additive (7 new sandbox endpoints) or corrective (3 existing sandbox endpoints updated from incorrect 200/CardTransaction to 202/SandboxCardSimulationResponse). The new schemas are correctly typed for OpenAPI 3.1. Linting exemptions are scoped tightly. No production paths are touched, no version bump is needed, and the PR description accounts for all intentional design choices. No files require special attention.
|
| Filename | Overview |
|---|---|
| openapi/openapi.yaml | 7 new path $refs added in the paths section; ordered logically after the existing simulate endpoints and before /stablecoin-provider-accounts. |
| .spectral.yaml | paths-kebab-case rule updated to a two-branch regex: the original branch covers all standard paths, a new branch whitelists the 7 snake_case simulate paths. Exemption is correctly scoped (not a blanket relaxation). |
| .redocly.lint-ignore.yaml | Redocly paths-kebab-case ignore entries added for all 7 new snake_case simulate paths; consistent with the Spectral exemption scope. |
| openapi/components/schemas/cards/SandboxCardSimulationResponse.yaml | New shared response schema with a single required issuerTransactionToken string; clean and correctly applied across all 10 simulate endpoints. |
| openapi/components/schemas/cards/SandboxCardAuthorizationAdviceRequest.yaml | New schema for authorization advice; requires cardTransactionId and total amount with exclusiveMinimum: 0 (valid OpenAPI 3.1 JSON Schema semantics). |
| openapi/components/schemas/cards/SandboxCardAuthorizationRequest.yaml | Updated description to list all 5 authorization-family endpoints that reuse this schema; no property changes. |
| openapi/components/schemas/cards/SandboxCardBalanceInquiryRequest.yaml | New schema for balance inquiry; merchant-only (no amount), consistent with $0 implicit nature of balance inquiries. |
| openapi/components/schemas/cards/SandboxCardTransactionRefRequest.yaml | New schema keyed only by cardTransactionId; used for return_reversal, correctly scoped and described. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_authorization.yaml | Corrected from 200/CardTransaction to 202/SandboxCardSimulationResponse to reflect the actual async behavior. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_clearing.yaml | Corrected from 200/CardTransaction to 202/SandboxCardSimulationResponse; response description updated to reflect async delivery. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_return.yaml | Corrected from 200/CardTransaction to 202/SandboxCardSimulationResponse; response description updated to reflect async delivery. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_authorization_advice.yaml | New endpoint for authorization advice simulation; uses the correct SandboxCardAuthorizationAdviceRequest schema, 202 response, and full error set. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_balance_inquiry.yaml | New endpoint for balance inquiry simulation; correctly uses merchant-only SandboxCardBalanceInquiryRequest (no amount, as $0 is implicit), 202 response, full error set. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_credit_authorization.yaml | New endpoint for credit authorization simulation; reuses SandboxCardAuthorizationRequest schema consistently with the authorization-family pattern. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_credit_authorization_advice.yaml | New endpoint for credit authorization advice; intentionally uses SandboxCardAuthorizationRequest (PAN+merchant keyed, not transaction-keyed) as described in the PR. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_financial_authorization.yaml | New endpoint for single-message financial authorization simulation; correctly uses SandboxCardAuthorizationRequest and 202 response. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_financial_credit_authorization.yaml | New endpoint for single-message financial credit authorization simulation; correctly uses SandboxCardAuthorizationRequest and 202 response. |
| openapi/paths/sandbox/cards/sandbox_cards_{id}_simulate_return_reversal.yaml | New endpoint for return reversal simulation; uses SandboxCardTransactionRefRequest (cardTransactionId only), 202 response, and correctly notes the REFUNDED state prerequisite. |
Reviews (2): Last reviewed commit: "feat: sandbox simulate endpoints for the..." | Re-trigger Greptile
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>
61be3a2 to
af66b87
Compare
|
@greptile review |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|

Summary
Adds the 7 remaining sandbox card-event simulate endpoints, completing the set alongside the existing
authorization,clearing, andreturnsimulators. Each isPOST, sandbox-only, and returns202with{ "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/):balance_inquirySandboxCardBalanceInquiryRequest(merchantonly — a $0 inquiry)credit_authorizationSandboxCardAuthorizationRequestfinancial_authorizationSandboxCardAuthorizationRequestfinancial_credit_authorizationSandboxCardAuthorizationRequestauthorization_adviceSandboxCardAuthorizationAdviceRequest(cardTransactionId+ new totalamount)credit_authorization_adviceSandboxCardAuthorizationRequestreturn_reversalSandboxCardTransactionRefRequest(cardTransactionId)New schemas:
SandboxCardBalanceInquiryRequest,SandboxCardAuthorizationAdviceRequest,SandboxCardTransactionRefRequest, and a sharedSandboxCardSimulationResponse({ issuerTransactionToken }).SandboxCardAuthorizationRequestandCardMerchantare reused.Response correction to the existing 3 simulators: they were documented as
200returning a fullCardTransaction, but these simulators are asynchronous — they return an issuer transaction token and deliver the resulting card operation over webhook. This PR correctsauthorization,clearing, andreturnto202/SandboxCardSimulationResponseso the whole simulate family is consistent.Intentionally excluded: authorization expiry and authorization reversal / void — neither has a card-issuer simulate path.
Notes
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.yamland.redocly.lint-ignore.yaml, not a global relaxation).info.versionbump: 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— rebundlesopenapi.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.