Add bankName as a required field to GTQ and JMD account types#632
Conversation
GTQ and JMD corridors have multiple bank payers, so bank_name is needed to disambiguate the destination during payout discovery. Add bankName (string, 1-255) as a required field on GtqAccountInfoBase and JmdAccountInfoBase; derived create/info types inherit it via allOf. Rebundled openapi.yaml.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript ✅ grid-ruby studio · code
|
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the schema addition is intentional and unblocks calls that were already failing at runtime. The new bankName field is defined consistently with existing multi-payer corridor schemas (PHP, NGN, IDR): same type, same constraints, same description. The bundled YAML files are correctly regenerated from the source. No MDX documentation pages reference GTQ or JMD accounts, so there are no docs gaps. The field being required matches what the backend already demands during payout discovery. No files require special attention — all four changed files are straightforward and internally consistent.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/GtqAccountInfoBase.yaml | Adds bankName as a required field with consistent definition (minLength: 1, maxLength: 255, description, example); matches the pattern used by PHP, NGN, and IDR schemas. |
| openapi/components/schemas/common/JmdAccountInfoBase.yaml | Adds bankName as a required field with the same definition as GtqAccountInfoBase; consistent with other multi-payer corridor schemas. |
| openapi.yaml | Rebundled output correctly reflects the source schema changes for both GtqAccountInfoBase and JmdAccountInfoBase; matches mintlify/openapi.yaml exactly. |
| mintlify/openapi.yaml | Mintlify copy of the bundled spec correctly updated to include bankName for both GTQ and JMD schemas; identical to openapi.yaml changes. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Caller
participant GridAPI as Grid API
participant Payer as Bank Payer GTQ/JMD
Caller->>GridAPI: POST /quotes (accountInfo with bankName)
GridAPI->>GridAPI: Validate accountInfo schema
Note over GridAPI: bankName now required in schema
GridAPI->>Payer: Payout discovery using payeeBankName
Note over Payer: Multiple payers exist, bankName disambiguates
Payer-->>GridAPI: Payer selected, quote created
GridAPI-->>Caller: 200 OK quote response
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Caller
participant GridAPI as Grid API
participant Payer as Bank Payer GTQ/JMD
Caller->>GridAPI: POST /quotes (accountInfo with bankName)
GridAPI->>GridAPI: Validate accountInfo schema
Note over GridAPI: bankName now required in schema
GridAPI->>Payer: Payout discovery using payeeBankName
Note over Payer: Multiple payers exist, bankName disambiguates
Payer-->>GridAPI: Payer selected, quote created
GridAPI-->>Caller: 200 OK quote response
Reviews (1): Last reviewed commit: "Add bankName as a required field to GTQ ..." | Re-trigger Greptile
Reason
GTQ (Guatemala) and JMD (Jamaica) corridors have multiple bank payers, so the destination bank must be disambiguated during payout discovery (same as PHP/NGN/IDR/etc.). The receiving side already advertises
payeeBankNameas required for these corridors, but the account schema had nobankNamefield — so callers couldn't supply it and quotes failed with"payeeBankName is not a sender key this API accepts."Change
bankName(string, 1–255 chars) as a required field onGtqAccountInfoBaseandJmdAccountInfoBase. Derived create/info types inherit it viaallOf.openapi.yaml(+ mintlify copy).Follow-up
After this merges, the webdev monorepo regenerates
grid-api/grid_api/models/*.py(viaupdate_schema.sh) sobank_nameis parsed into the account model, paired with the sparkcore mapping in lightsparkdev/webdev#29480.