Skip to content

Add USD account bank, account type and wire routing fields - #778

Merged
peterrojs merged 2 commits into
mainfrom
07-29-usd-account-wire-fields
Jul 31, 2026
Merged

Add USD account bank, account type and wire routing fields#778
peterrojs merged 2 commits into
mainfrom
07-29-usd-account-wire-fields

Conversation

@peterrojs

@peterrojs peterrojs commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the USD account fields needed to describe a domestic wire beneficiary, and purposeOfPayment on TransferOutRequest.

UsdAccountInfoBase carried only accountNumber and routingNumber, so a USD account could not express which bank holds it, whether it is checking or savings, or how to reach it through a correspondent. Every other bank-account shape in the spec already has at least bankNameSwiftAccountInfoBase requires it, and SlvAccountInfoBase has both bankName and bankAccountType with the same CHECKING/SAVINGS enum reused here.

Two of these fields were already documented but never existed in the spec: the "United States" example in snippets/external-accounts.mdx shows bankAccountType and bankName on a USD_ACCOUNT, and the note below it says "Category must be CHECKING or SAVINGS". This change makes those docs true.

Changes

openapi/components/schemas/common/UsdAccountInfoBase.yaml — five optional properties, no change to required:

Property Type Notes
bankName string, 1–140 Institution holding the account; optional on every rail, recommended for wires
bankAccountType CHECKING | SAVINGS Same enum as SlvAccountInfoBase; optional on every rail, defaults to checking
intermediaryBankName string, 1–140 WIRE rail only
intermediaryRoutingNumber string, 9 digits, ^[0-9]{9}$ WIRE rail only
fiToFiInformation string, ≤210 Bank-to-bank instructions, WIRE rail only

Lengths follow the wire-message field sizes: 140 for party name lines, and 210 for the bank-to-bank field (six 35-character lines). intermediaryRoutingNumber mirrors the existing routingNumber constraints exactly.

openapi/components/schemas/transfers/TransferOutRequest.yaml — adds purposeOfPayment, $ref-ing the existing quotes/PurposeOfPayment.yaml. QuoteRequest already accepts it; transfer-out was the only send shape that could not record a payment purpose, even though it accepts the neighbouring remittanceInformation.

Also rebundled openapi.yaml / mintlify/openapi.yaml via make build, and documented the three wire-only fields plus purposeOfPayment in the two affected MDX pages.

Compatibility

Additive and non-breaking — every new property is optional and nothing existing changed, so info.version is unchanged.

Verified against the same gate CI runs:

$ oasdiff breaking base/openapi.yaml head/openapi.yaml --format singleline --fail-on ERR
No breaking changes to report, but the specs are different
$ echo $?
0

make lint exits 0 ("Woohoo! Your API description is valid. 🎉"). The remaining schema-properties-have-examples / -descriptions findings are pre-existing repo-wide noise; none of them are on the schemas touched here — every property added carries both a description and an example.

Test plan

  • make build — bundle regenerated, diff is additive only
  • make lint — exit 0, no findings on UsdAccountInfoBase or TransferOutRequest
  • oasdiff breaking --fail-on ERR — 0 breaking changes

Original PR: #765

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Jul 30, 2026
@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

feat(api): add purpose_of_payment parameter to transfer out create methods

go

feat(api): add bank fields to external accounts, purpose of payment to transfers

kotlin

feat(api): add bank details to USD account models and purpose field to transfer out

openapi

feat(api): add bank fields to UsdAccountInfo, purposeOfPayment to transfer out requests

php

feat(api): add purposeOfPayment to transfer out, bank fields to USD account types

python

feat(api): add purpose_of_payment to transfer_out/me, add fields to usd_external_account

ruby

feat(api): add purpose_of_payment to transfer_out, bank fields to usd account models

typescript

feat(api): add purposeOfPayment to transfer-out, USD account fields to external accounts
⚠️ grid-openapi studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️

grid-ruby studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-go studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@5e983b56ba58aca242062962faa80a335a9ad761
⚠️ grid-kotlin studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ⚠️build ✅lint ✅test ❗

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

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

Your SDK build had at least one "note" diagnostic.
generate ✅lint ✅test ✅

grid-typescript studio · conflict

Your SDK build had at least one note diagnostic.

⚠️ grid-cli studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
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-31 06:55:17 UTC

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds optional USD bank-account and wire-routing details, exposes purposeOfPayment on transfer-out requests, regenerates both bundled OpenAPI specifications, and updates the related payment and external-account documentation.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The optional schema additions are consistently propagated into both generated bundles, reuse established enum and validation contracts, and align with the accompanying documentation without breaking existing required fields.

Important Files Changed

Filename Overview
openapi/components/schemas/common/UsdAccountInfoBase.yaml Adds five optional, constrained USD account fields with consistent descriptions and examples.
openapi/components/schemas/transfers/TransferOutRequest.yaml Reuses the existing purpose-of-payment enum for an optional transfer-out request field.
openapi.yaml Regenerated bundle accurately reflects the modular schema changes.
mintlify/openapi.yaml Regenerated Mintlify bundle remains synchronized with the root OpenAPI bundle.
mintlify/payouts-and-b2b/payment-flow/send-payment.mdx Documents the optional purpose-of-payment field and its destination-dependent use.
mintlify/snippets/external-accounts.mdx Documents the three wire-specific USD correspondent-bank fields.

Reviews (1): Last reviewed commit: "Add USD account bank, account type and w..." | Re-trigger Greptile

@peterrojs
peterrojs requested review from akanter and jklein24 July 30, 2026 23:31
maxLength: 140
bankAccountType:
type: string
description: Whether the account is a checking or a savings account

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For here and name, we might also want to specify that it's only required for Wires like you do for some of the other fields.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in de71c911, though the answer differs slightly between the two fields, so I documented what's actually true rather than copying the "WIRE rail only" wording across.

Neither bankName nor bankAccountType is wire-only, unlike the three intermediary/FI-to-FI fields:

  • bankAccountType matters most on ACH, where checking-vs-savings determines the transaction code. It was previously unexpressible, so the backend hardcoded CHECKING for every account.
  • bankName identifies the beneficiary's institution on a wire message, but it's equally valid on other rails and no rail requires it.

So both are genuinely optional on every rail, and the descriptions now say that explicitly:

bankName:
  description: >-
    The name of the financial institution holding the account. Optional on
    every rail, and recommended for wires, where it identifies the
    beneficiary's institution on the payment message.

bankAccountType:
  description: >-
    Whether the account is a checking or a savings account. Optional on every
    rail; when omitted, the account is treated as a checking account.

Also called out the omitted-means-checking default, since that's the existing backend behaviour and worth being explicit about. make lint clean, oasdiff reports 0 breaking changes.


🤖 bridged-rampart-3(#3) | Feedback

minLength: 9
maxLength: 9
pattern: ^[0-9]{9}$
bankName:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AaryamanBhute is this file one of the autogenerated ones from your workflow or is USD separate?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's autogenerated, I know @JasonCWang and @mohamedwane have been making changes to it though

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the autogenerated question — the history says it's both, which is worth knowing before this merges.

git log on UsdAccountInfoBase.yaml:

Peter.Rojs              Add USD account bank, account type and wire routing fields  (this PR)
lightspark-copybara     chore: Sync account schemas (#398)
Shreya Vissamsetti      Revert "chore: Sync account schemas" (#395)
lightspark-copybara     chore: Sync account schemas (#388)
Matt Davis              Add bankAccountType to USD, bankName/documentType/documentNumber to COP... (#352)
Aaryaman Bhute          Split request and response schemas for external account paymentRails (#302)

So lightspark-copybara[bot] does sync this file, but humans also edit it directly — #352 added bankAccountType to a currency schema by hand, which is exactly the shape of this change. And #395 reverted one of the syncs, so the sync isn't unconditionally authoritative either.

Nothing in this repo generates it locally: no scripts/ entry references it, and make build only bundles openapi/openapi.yaml. The one workflow that mentions the directory (docs-sync.yml) just reads these schemas to prompt reviewers about the grid-visualizer.

The practical risk: if a copybara sync runs from a source that doesn't yet have these five properties, it could silently drop them. If that source is upstream of this repo, the fields may need adding there too — otherwise this merges fine and a later sync quietly reverts it. @AaryamanBhute you'd know where that sync originates; happy to mirror the change there if you point me at it.


🤖 bridged-rampart-3(#3) | Feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — that's useful, and it flags a real risk I've detailed in the thread above: if the copybara sync originates from a source that lacks these five properties, a later sync would silently drop them.

Two questions where you'd know better than I can infer from history:

  1. Where does chore: Sync account schemas originate? If these fields also need to exist there, I'm happy to mirror the change so the sync doesn't revert it.
  2. Do the changes @JasonCWang and @mohamedwane have in flight touch UsdAccountInfoBase? If so, worth sequencing — I'm only adding optional properties (no required changes), so it should merge cleanly either way, but a concurrent sync is the case that would clobber it.

Also worth flagging for whoever merges: this is the spec half only. webdev's generated grid_api client has to be regenerated from the merged spec before the backend can accept these fields — its from_dict whitelists keys, so until then they're silently dropped rather than rejected.


🤖 bridged-rampart-3(#3) | Feedback

@ls-bolt
ls-bolt Bot force-pushed the 07-29-usd-account-wire-fields branch from 03a91be to de71c91 Compare July 30, 2026 23:40
@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 11:40pm
grid-wallet-demo Ignored Ignored Preview Jul 30, 2026 11:40pm

Request Review

@github-actions github-actions Bot removed the breaking-change Introduces a breaking change to the OpenAPI spec label Jul 30, 2026

@akanter akanter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm i think!

peterrojs commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 31, 6:49 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 31, 6:49 AM UTC: @peterrojs merged this pull request with Graphite.

@ls-bolt

ls-bolt Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📌 Bolt Status

2026-07-31 06:49:29 UTC — ⚡ Agent bridged-rampart-4(#4) started


Feedback

@peterrojs
peterrojs merged commit f187b54 into main Jul 31, 2026
10 checks passed
@peterrojs
peterrojs deleted the 07-29-usd-account-wire-fields branch July 31, 2026 06:49
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.

5 participants