Repository navigation
plan: ACH companyEntryDescription via quote destination railOptions - #1139
ls-bolt[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
@greptile review |
|
| Add an optional **`railOptions`** object to the two request-side destinations that | ||
| already take a `paymentRail`. Like `railDetails`, it is a oneOf discriminated by | ||
| `paymentRail`, so rail-specific inputs live on a per-rail schema. Its only variant for | ||
| now is `AchRailOptions` (`paymentRail: ACH | ACH_SAME_DAY`, `statementDescriptor`). |
There was a problem hiding this comment.
ah, we should call it something like companyEntryDescription since that's what it literally is for ACH
There was a problem hiding this comment.
Good call, renamed it to companyEntryDescription on both AchRailOptions and AchRailDetails.
|
|
||
| ## Changes | ||
|
|
||
| ### 1. `openapi/components/schemas/transfers/AchRailOptions.yaml` (new) |
There was a problem hiding this comment.
not sure how relevant this is, but we only really care about this on the quote+execute API surface. transfer-in/transfer-out are both deprecated
There was a problem hiding this comment.
Makes sense, I narrowed the scope to the quote + execute surface (AccountDestination) and left the deprecated transfer-in/out alone.
| paymentRail: | ||
| type: string | ||
| enum: [ACH, ACH_SAME_DAY] | ||
| description: Must match `destination.paymentRail`. |
There was a problem hiding this comment.
is there a way to make this more baked-in at a structural level instead of saying "it must match" and catching it in a validator?
There was a problem hiding this comment.
Yes. railOptions now selects the rail: its paymentRail discriminator is the rail choice (AchRailOptions for ACH/ACH_SAME_DAY plus a field-less BasicRailOptions for every other rail), so ACH fields can only appear with an ACH rail and nothing needs to match. The flat destination.paymentRail is deprecated, and a schema not: {required: [paymentRail, railOptions]} says you can't send both.
|
🦣 Congratulations @akanter - your substantive review earned a Giant beaver! (rare)
View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/akanter?section=ice-age |
785e0ed to
6c6babd
Compare
|
⚡ Review ledger Round 1
|
6c6babd to
61e22cc
Compare

Summary
companyEntryDescriptionon a quote. This is the 10-character NACHA batch header field shown on the recipient's statement.POST /quotesAccountDestinationgains an optionalrailOptions. LikerailDetails, it is a oneOf discriminated bypaymentRail, and its discriminator is the rail selection. TheAchRailOptionsvariant (ACHandACH_SAME_DAY) carriescompanyEntryDescription. ABasicRailOptionsvariant lets the platform select any other rail with no extra fields.AchRailDetailsgainscompanyEntryDescription, so the value appears on transactions and webhooks.Approach
The client picks the rail by choosing a
railOptionsvariant, so ACH-only fields cannot be sent with another rail. There is no rule that two fields must match. The flatdestination.paymentRailis marked deprecated and is still accepted. A destination carries one or the other, expressed in the schema asnot: {required: [paymentRail, railOptions]}. Only the quote + execute surface changes.transfer-inandtransfer-outare deprecated and stay as they are. Everything is additive.Changes: about 9 files, plus the bundle
openapi/components/schemas/quotes/AchRailOptions.yaml,BasicRailOptions.yamlandRailOptionsOneOf.yaml(new)quotes/AccountDestination.yaml: addsrailOptions, deprecatespaymentRail, and adds the one-or-the-other ruletransactions/AchRailDetails.yaml: addscompanyEntryDescriptionmake buildbundleFull plan with code sketches, verification and risks:
docs/plans/2026-10-07-ach-statement-descriptor.mdin this PR's diff.Reply with a comment (e.g. LGTM) to approve. Emoji reactions don't notify me here.