Skip to content

feat: document BENEFICIARY_TRUSTED (409) on customer external-account delete - #769

Closed
ls-bolt[bot] wants to merge 2 commits into
mainfrom
07-30-feat_document_beneficiary_trusted_409_on_customer_external-account_delete
Closed

feat: document BENEFICIARY_TRUSTED (409) on customer external-account delete#769
ls-bolt[bot] wants to merge 2 commits into
mainfrom
07-30-feat_document_beneficiary_trusted_409_on_customer_external-account_delete

Conversation

@ls-bolt

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

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #770.

Summary

DELETE /customers/external-accounts/{externalAccountId} can return 409 when the account is currently a trusted beneficiary, but the spec declared only 204/401/404/500. This documents the missing status and its error code.

  • BENEFICIARY_TRUSTED added to the shared Error409 code enum. Because it was absent, a generated client would raise a validation error while deserializing the response instead of surfacing a code the integrator can branch on.
  • The delete operation now declares 409 and its description states the ordering requirement: an account that is currently a trusted beneficiary must be untrusted first, via POST /customers/external-accounts/{externalAccountId}/untrust (and its /confirm), before it can be deleted.

Trust cannot be revoked as a side effect of a delete — untrusting a beneficiary requires the customer to complete a Strong Customer Authentication challenge, which a DELETE has no way to carry. So the delete is refused while trust is in place rather than leaving the account deleted but still trusted.

Both changes are additive and non-breaking, so info.version stays 2025-10-13.

Test plan

  • make lint exits 0 (Redocly + Spectral, --fail-severity=error): 632 findings, 0 errors, all pre-existing warnings/infos.
  • make build rebundled openapi.yaml and mintlify/openapi.yaml; re-running it is a no-op, so the committed bundles byte-match the build output.
  • The 409/BENEFICIARY_TRUSTED pair is covered by tests asserting the status and code at the HTTP boundary, alongside the trust → refused-delete → untrust → successful-delete lifecycle.
  • Diff is 4 files: 2 spec sources + the 2 generated bundles.

Public

Documents a 409 BENEFICIARY_TRUSTED response on DELETE /customers/external-accounts/{externalAccountId}: an external account that is currently a trusted beneficiary must be untrusted before it can be deleted.

Requested by @jklein24

@vercel

vercel Bot commented Jul 30, 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 30, 2026 6:48am
grid-wallet-demo Ignored Ignored Preview Jul 30, 2026 6:48am

Request Review

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

akanter commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

docs(api): expand usage documentation for customer external accounts delete

go

docs(api): update delete method docs for customer external account

kotlin

docs(api): clarify deletion restrictions for trusted beneficiaries in external accounts

openapi

feat(api): add 409 response to delete customer external account method

php

docs(api): clarify deletion restrictions in customers external_accounts

python

docs(api): add trusted beneficiary details to external_accounts delete method

ruby

docs(api): clarify delete restrictions in customers external_accounts

typescript

docs(api): clarify deletion requirements in external accounts delete method

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

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/07dd63eb34a58806fa798e55ee7d92582b8111a5/dist.tar.gz
grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅ (prev: build ⏭️) → lint ❗test ❗

go get github.com/stainless-sdks/grid-go@c70b383ffb1fb5b8ca2273f7de137ea5bcbf9f04
grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/03195561ebadb9213443aa3c77541b392d4d74ff/grid-0.0.1-py3-none-any.whl
grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗


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-30 06:31:23 UTC

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Jul 30, 2026, 6:27 AM

Comment thread openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml Outdated
@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated (UTC)
Grid 🟡 Building Jul 30, 2026, 6:26 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants