add the sandbox authorization reversal and expiry simulators to the spec - #919
Merged
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Contributor
✱ Stainless preview builds for gridThis PR will update the cli go kotlin openapi php python ruby typescript ⏳ grid-typescript studio⏳ grid-openapi studio⏳ grid-ruby studio⏳ grid-kotlin studio⏳ grid-go studio⏳ grid-python studio⏳ grid-php studio⏳ grid-cli studio⏳ These are partial results; builds are still running. This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Contributor
shreyav
force-pushed
the
claude/sandbox-authorization-reversal-expiry
branch
from
September 9, 2026 17:40
b0762ec to
fc92e88
Compare
shreyav
force-pushed
the
claude/sandbox-authorization-reversal-expiry
branch
from
September 9, 2026 17:43
fc92e88 to
888d175
Compare
shreyav
force-pushed
the
claude/sandbox-authorization-reversal-expiry
branch
from
September 9, 2026 17:47
888d175 to
9047258
Compare
AaryamanBhute
approved these changes
Sep 9, 2026
shreyav
added a commit
that referenced
this pull request
Sep 9, 2026
…tall (#922) ## Summary The `Lint Code & Documentation` job runs `sudo apt-get update && sudo apt-get install -y libsecret-1-dev` before anything else. `apt-get update` exits non-zero if *any* configured source fails a hash check — and the `ubuntu-latest` runner image ships Google's Chrome apt source, which this job never installs from. When that mirror is mid-republish it serves a `Packages.gz` that doesn't match its own `Release` file, and the whole job dies in setup before `npm ci` or a single lint rule runs. That happened on #919 twice in a row today, ten minutes apart, with the identical hash mismatch both times: ``` E: Failed to fetch https://dl.google.com/linux/chrome-stable/deb/dists/stable/main/binary-amd64/Packages.gz Hash Sum mismatch Last modification reported: Wed, 09 Sep 2026 09:41:12 +0000 Release file created at: Wed, 09 Sep 2026 17:16:59 +0000 ##[error]Process completed with exit code 100. ``` Every check that actually exercises the spec on that PR — breaking-change detection, both OpenAPI builds, preview, Mintlify — was green. The lint job was red only because an unrelated third-party mirror had a veto over it. ## What changed One step. The Chrome apt source list is removed before `apt-get update`: ```yaml sudo rm -f /etc/apt/sources.list.d/google-chrome*.list sudo apt-get update && sudo apt-get install -y libsecret-1-dev ``` Nothing about what gets installed changes. `libsecret-1-dev` still installs from Ubuntu's own archive; a mirror this job doesn't use just loses the ability to fail it. ## Test plan - The workflow YAML parses; the job still has six steps and the install step still references `libsecret-1-dev`. - This is the standard mitigation for this runner-image behaviour, and it's purely subtractive — it can't make the install pull from anywhere it didn't already. - Worth knowing for review: `.github/workflows/` is not in the Lint workflow's own `paths:` filter, so the real lint job won't run on this PR; `dummy.yml` reports the check instead. The actual validation is #919 going green once it's rebased onto this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- _Generated by [Claude Code](https://claude.ai/code/session_017bvbs2nhqaqCRn1BiZJU4G)_ Co-authored-by: Claude <noreply@anthropic.com>
POST /sandbox/cards/{id}/simulate/authorization_reversal and
/sandbox/cards/{id}/simulate/authorization_expiry have been live for some
time but were never in the spec, so generated clients could not call
them. The return reversal endpoint's description went further and stated
that neither existed. Both are documented now and that note is gone.
Reversal takes a new SandboxCardReversalRequest: the transaction plus an
optional amount. Omit it to reverse the whole authorization; send an
amount to reverse only that much. The schema does not admit 0 — leaving
the field out is how a full reversal is expressed, the same shape as the
return simulator's amount. Expiry reuses SandboxCardTransactionRefRequest,
whose description now names both of its callers.
The descriptions are written for an integrator deciding whether to call
the endpoint, not for someone who already knows the issuer's event names.
The two paths join the kebab-case allowlist in .spectral.yaml for the
same reason the other simulators are there: they mirror the issuer's
routes verbatim and the SDK must call those exact URLs.
Redocly validates clean at 55 warnings, one fewer than main.
Spectral: ✖ 901 problems (0 errors, 179 warnings, 722 infos, 0 hints)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
shreyav
force-pushed
the
claude/sandbox-authorization-reversal-expiry
branch
from
September 9, 2026 18:48
9047258 to
5d8e6f7
Compare
AaryamanBhute
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /sandbox/cards/{id}/simulate/authorization_reversalandPOST /sandbox/cards/{id}/simulate/authorization_expiryhave been live for some time but were never in the spec, so generated clients could not call them and integrators had no way to discover them.The
return_reversalendpoint's description went further and stated that neither existed:Both are documented now and that note is gone.
What changed
Two new paths
simulate/authorization_reversal— a merchant cancelling an authorization before it settles, in full or in part. Takes a newSandboxCardReversalRequest: the transaction plus an optionalamount. Omitamountto reverse the whole authorization; send one to reverse only that much. The schema does not admit0— leaving the field out is the only way to express a full reversal, the same shape as thereturnsimulator'samount. Same production-platform gating assimulate/authorization.simulate/authorization_expiry— the card network letting an authorization lapse because the merchant never followed through. ReusesSandboxCardTransactionRefRequest, whose description now names both of its callers. Sandbox-only, likereturn_reversal.Both act on an authorization that is still fully open with nothing settled, since the issuer's void simulator rejects a partially-cleared one. Both return
202with the issuer transaction token and land their result via the events webhook, matching the other simulators.The descriptions are written for an integrator deciding whether to call the endpoint — what real-world event it stands in for and what to expect afterwards — rather than for someone who already knows the issuer's event names.
Corrected prose — the incorrect note in
return_reversalis removed.Lint config — the two paths join the kebab-case allowlist in
.spectral.yamlfor the same reason the other simulators are there: they mirror the issuer's routes verbatim and the SDK must call those exact URLs.Breaking-change check
Additive only: two new paths and one new request schema. No existing path, schema, or enum value changes. Nothing a client has already received is affected.
Test plan
This is a spec + docs repo with no application code, so verification is the spec toolchain:
npm run lint:openapi— Redocly validates clean at 55 warnings, one fewer thanmain. Spectral is 901 problems / 0 errors / 179 warnings, identical tomainwhen both are linted in place.npm run build:openapi— rebundledopenapi.yamlandmintlify/openapi.yaml; the two are identical, and the bundle diff contains exactly the source edits.amount, and an expiry with onlycardTransactionId.🤖 Generated with Claude Code