Skip to content

chore: Sync account schemas - #385

Closed
lightspark-copybara[bot] wants to merge 2 commits into
mainfrom
auto/sync-grid-schemas-20260423-184756
Closed

chore: Sync account schemas#385
lightspark-copybara[bot] wants to merge 2 commits into
mainfrom
auto/sync-grid-schemas-20260423-184756

Conversation

@lightspark-copybara

Copy link
Copy Markdown
Contributor

Auto-synced account schemas.

These schemas are generated from VASP adapter field definitions in sparkcore.

Synced schemas:

  • common/ — per-currency account info, beneficiary, and payment account schemas
  • common/PaymentInstructions.yaml — payment instructions oneOf (new currencies added)
  • external_accounts/ — per-currency external account schemas (reference common/)

Please review the changes before merging.

@vercel

vercel Bot commented Apr 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Apr 23, 2026 7:07pm

Request Review

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds

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

kotlin

feat(api): add bankName to BDT/EGP/GHS/GTQ/JMD/PKR, move phoneNumber COP to USD, update enums

openapi

fix(types): add bankName to BDT/EGP/GHS/GTQ/JMD/PKR, update USD/COP/GTQ field requirements

python

feat(api): add bank_name to BDT/EGP/GHS/GTQ/JMD/PKR, update USD/COP/GTQ account types

typescript

feat(api): add bankName to BDT/EGP/GHS/GTQ/JMD/PKR accounts, update USD/COP/GTQ account types

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

grid-openapi studio · code · diff

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

grid-kotlin studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ❗build ✅lint ✅test ✅

New diagnostics (2 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
grid-typescript studio · code · diff

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

npm install https://pkg.stainless.com/s/grid-typescript/7c086a027b2d71f72a4364f33fdd6ba76200ae52/dist.tar.gz
grid-python studio · code · diff

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

pip install https://pkg.stainless.com/s/grid-python/8f1fbcff5da83efef3469e74993a4f8ffc604386/grid-0.0.1-py3-none-any.whl

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-04-23 19:11:05 UTC

@greptile-apps

greptile-apps Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This auto-synced PR updates account schemas for multiple currency corridors (USD, COP, GTQ, BDT, EGP, GHS, JMD, PKR) to match VASP adapter field definitions in sparkcore. The changes include several breaking field-level modifications that reviewers should verify against live corridor usage before merging.

  • UsdAccountInfoBase: bankAccountType (CHECKING/SAVINGS) fully removed and phoneNumber added as required — the old field was documented as needed for El Salvador; confirm that corridor no longer needs account type.
  • UsdAccountInfo: BANK_TRANSFER payment method swapped for MOBILE_MONEY; the reverse swap happens for COP and GTQ.
  • bankName now required across BDT, EGP, GHS, GTQ, JMD, PKR, and COP — any existing live integrations for these currencies will fail validation.

Confidence Score: 4/5

Hold for explicit confirmation that live corridors (especially USD/El Salvador) are compatible with the removed bankAccountType field and the payment method swaps.

Four P1 findings: a required field removed from USD accounts that was explicitly documented for El Salvador, a payment method swap on USD that could break in-flight transfers, COP phone number silently dropped, and bankName becoming required across six live currencies. All changes are intentional auto-syncs but carry real breaking-change risk for existing integrations.

openapi/components/schemas/common/UsdAccountInfoBase.yaml, openapi/components/schemas/common/UsdAccountInfo.yaml, and openapi/components/schemas/common/CopAccountInfoBase.yaml need the most attention.

Important Files Changed

Filename Overview
openapi/components/schemas/common/UsdAccountInfoBase.yaml Breaking change: bankAccountType (CHECKING/SAVINGS) removed and phoneNumber added as required; previous description noted this was needed for El Salvador corridor
openapi/components/schemas/common/UsdAccountInfo.yaml Breaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yaml Breaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yaml Required fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yaml phoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yaml phoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yaml bankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yaml bankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yaml bankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yaml bankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yaml bankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yaml MOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yaml MOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yaml Generated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yaml Generated bundle for Mintlify docs; mirrors openapi.yaml changes exactly

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph USD["USD Account (UsdAccountInfoBase)"]
        U1["❌ bankAccountType removed\n(CHECKING / SAVINGS)"]
        U2["✅ phoneNumber added (required)"]
        U3["Payment methods:\nWIRE · RTP · FEDNOW\n❌ BANK_TRANSFER → ✅ MOBILE_MONEY"]
    end

    subgraph COP["COP Account (CopAccountInfoBase)"]
        C1["❌ phoneNumber removed entirely"]
        C2["bankName: minLength/maxLength added"]
        C3["Payment methods:\n✅ BANK_TRANSFER\n❌ MOBILE_MONEY removed"]
        CB["CopBeneficiary:\n❌ countryOfResidence (was required)\n✅ documentNumber required\n✅ documentType required"]
    end

    subgraph GTQ["GTQ Account (GtqAccountInfoBase)"]
        G1["❌ phoneNumber removed"]
        G2["✅ bankAccountType added (CHECKING/SAVINGS)"]
        G3["✅ bankName added (required)"]
        G4["Payment methods:\n✅ BANK_TRANSFER\n❌ MOBILE_MONEY removed"]
        GB["GtqBeneficiary:\n✅ phoneNumber added (required)"]
    end

    subgraph MULTI["6 Schemas: BDT · EGP · GHS · JMD · PKR · COP"]
        M1["✅ bankName added as required field\nminLength: 1 · maxLength: 255"]
    end
Loading

Fix All in Claude Code

Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfoBase.yaml
Line: 22-30

Comment:
**`bankAccountType` removed — breaking change for USD corridors**

The `bankAccountType` field (CHECKING/SAVINGS) has been fully deleted from `UsdAccountInfoBase` and replaced with `phoneNumber` as a required field. The old description explicitly called out "Required for certain corridors (e.g., El Salvador)." If any live USD corridors still require the account type distinction, they now have no way to express it. Worth confirming with the corridor owners that El Salvador (and any other affected corridor) no longer needs this field.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfo.yaml
Line: 13-16

Comment:
**`BANK_TRANSFER` replaced with `MOBILE_MONEY` for USD**

`BANK_TRANSFER` is removed from the allowed payment method enum and `MOBILE_MONEY` is added in its place. Simultaneously, `MOBILE_MONEY` is being removed from `CopAccountInfo` and `GtqAccountInfo`. If any live USD transfers are currently routed via `BANK_TRANSFER`, they will fail validation after this change. Please confirm this swap is intentional and that no in-flight payments rely on `USD` + `BANK_TRANSFER`.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/CopAccountInfoBase.yaml
Line: 1-27

Comment:
**`phoneNumber` removed entirely from COP account info**

`phoneNumber` was a required field in `CopAccountInfoBase` and is now completely absent (removed from both `required` and `properties`). Any existing COP account payloads that include `phoneNumber` will now pass a field that is no longer recognised, and callers that relied on the phone number for routing or compliance checks will silently lose that data. Confirm this is intentional and that the COP corridor no longer needs the phone number at the account level.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: openapi/components/schemas/common/BdtAccountInfoBase.yaml
Line: 3-5

Comment:
**`bankName` now required — breaking change across six currency schemas**

`bankName` is added as a required field in `BdtAccountInfoBase`, `EgpAccountInfoBase`, `GhsAccountInfoBase`, `JmdAccountInfoBase`, `PkrAccountInfoBase`, and `CopAccountInfoBase`. Any existing integrations submitting accounts for these currencies without `bankName` will now receive a validation error. If these corridors are already live, this is a breaking change for existing API clients.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "chore: Sync account schemas" | Re-trigger Greptile

Comment on lines 22 to +30
maxLength: 9
pattern: ^[0-9]{9}$
bankAccountType:
phoneNumber:
type: string
description: The bank account type. Required for certain corridors (e.g., El Salvador).
enum:
- CHECKING
- SAVINGS
description: The phone number in international format
example: '+1234567890'
minLength: 7
maxLength: 15
pattern: ^\+[0-9]{6,14}$

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.

P1 bankAccountType removed — breaking change for USD corridors

The bankAccountType field (CHECKING/SAVINGS) has been fully deleted from UsdAccountInfoBase and replaced with phoneNumber as a required field. The old description explicitly called out "Required for certain corridors (e.g., El Salvador)." If any live USD corridors still require the account type distinction, they now have no way to express it. Worth confirming with the corridor owners that El Salvador (and any other affected corridor) no longer needs this field.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfoBase.yaml
Line: 22-30

Comment:
**`bankAccountType` removed — breaking change for USD corridors**

The `bankAccountType` field (CHECKING/SAVINGS) has been fully deleted from `UsdAccountInfoBase` and replaced with `phoneNumber` as a required field. The old description explicitly called out "Required for certain corridors (e.g., El Salvador)." If any live USD corridors still require the account type distinction, they now have no way to express it. Worth confirming with the corridor owners that El Salvador (and any other affected corridor) no longer needs this field.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

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.

this was for SLV bank accounts, but do we use checking/savings for USA bank accounts? does that matter?

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 point — the original description did say "Required for certain corridors (e.g., El Salvador)", so it was corridor-specific, not a USD-universal field.

That said, for USA domestic ACH, bankAccountType (CHECKING/SAVINGS) is actually a standard required field in the ACH network spec. Looking at the schema, UsdAccountInfo.yaml supports ACH as a payment rail but the base schema no longer has a way to express account type.

The question is whether sparkcore handles this implicitly (e.g., always defaults to CHECKING for US ACH) or if it's captured somewhere else. Since these schemas are auto-synced from sparkcore's VASP adapter definitions, if sparkcore dropped it, presumably they have a reason — but it's worth a quick sanity check that US ACH payments aren't failing due to a missing account type downstream.

If SLV was the only corridor that needed it and it's been decommissioned/changed, you're fine to resolve this comment.

Tip: You can give me more context with [.greptile/rules](https://www.greptile.com/docs/code-review/custom-standards) so I get this right next time.

Comment on lines 13 to +16
- WIRE
- RTP
- FEDNOW
- BANK_TRANSFER
- MOBILE_MONEY

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.

P1 BANK_TRANSFER replaced with MOBILE_MONEY for USD

BANK_TRANSFER is removed from the allowed payment method enum and MOBILE_MONEY is added in its place. Simultaneously, MOBILE_MONEY is being removed from CopAccountInfo and GtqAccountInfo. If any live USD transfers are currently routed via BANK_TRANSFER, they will fail validation after this change. Please confirm this swap is intentional and that no in-flight payments rely on USD + BANK_TRANSFER.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfo.yaml
Line: 13-16

Comment:
**`BANK_TRANSFER` replaced with `MOBILE_MONEY` for USD**

`BANK_TRANSFER` is removed from the allowed payment method enum and `MOBILE_MONEY` is added in its place. Simultaneously, `MOBILE_MONEY` is being removed from `CopAccountInfo` and `GtqAccountInfo`. If any live USD transfers are currently routed via `BANK_TRANSFER`, they will fail validation after this change. Please confirm this swap is intentional and that no in-flight payments rely on `USD` + `BANK_TRANSFER`.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

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.

I think bank_transfer was specific for el salvador. the other items are usa specific rails. mobile_money is now the only SLV corridor

Comment on lines 1 to 27
@@ -21,13 +25,3 @@ properties:
enum:
- CHECKING
- SAVINGS

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.

P1 phoneNumber removed entirely from COP account info

phoneNumber was a required field in CopAccountInfoBase and is now completely absent (removed from both required and properties). Any existing COP account payloads that include phoneNumber will now pass a field that is no longer recognised, and callers that relied on the phone number for routing or compliance checks will silently lose that data. Confirm this is intentional and that the COP corridor no longer needs the phone number at the account level.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/CopAccountInfoBase.yaml
Line: 1-27

Comment:
**`phoneNumber` removed entirely from COP account info**

`phoneNumber` was a required field in `CopAccountInfoBase` and is now completely absent (removed from both `required` and `properties`). Any existing COP account payloads that include `phoneNumber` will now pass a field that is no longer recognised, and callers that relied on the phone number for routing or compliance checks will silently lose that data. Confirm this is intentional and that the COP corridor no longer needs the phone number at the account level.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

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.

this one is weird. phone number isn't required in prod, but it is in dev, so it should be optional, rather than removed entirely

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.

Makes sense — add phoneNumber back as an optional property (omit it from required):

Suggested change
type: object
required:
- accountType
- bankName
- accountNumber
- bankAccountType
properties:
accountType:
type: string
enum:
- COP_ACCOUNT
bankName:
type: string
description: The name of the bank
minLength: 1
maxLength: 255
accountNumber:
type: string
description: The account number of the bank
minLength: 1
maxLength: 34
bankAccountType:
type: string
description: The bank account type
enum:
- CHECKING
- SAVINGS
phoneNumber:
type: string
description: The phone number associated with the account

This keeps it out of required so prod payloads without it still validate, while dev payloads that include it are still recognized rather than silently ignored.

Comment on lines 3 to 5
- accountType
- bankName
- accountNumber

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.

P1 bankName now required — breaking change across six currency schemas

bankName is added as a required field in BdtAccountInfoBase, EgpAccountInfoBase, GhsAccountInfoBase, JmdAccountInfoBase, PkrAccountInfoBase, and CopAccountInfoBase. Any existing integrations submitting accounts for these currencies without bankName will now receive a validation error. If these corridors are already live, this is a breaking change for existing API clients.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/BdtAccountInfoBase.yaml
Line: 3-5

Comment:
**`bankName` now required — breaking change across six currency schemas**

`bankName` is added as a required field in `BdtAccountInfoBase`, `EgpAccountInfoBase`, `GhsAccountInfoBase`, `JmdAccountInfoBase`, `PkrAccountInfoBase`, and `CopAccountInfoBase`. Any existing integrations submitting accounts for these currencies without `bankName` will now receive a validation error. If these corridors are already live, this is a breaking change for existing API clients.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

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.

this is needed for all thunes banks in order to look up a thunes payer id

UsdAccountInfoBase.yaml now requires phoneNumber (and no longer
exposes bankAccountType/bankName) after the latest sparkcore adapter
sync. Four hand-authored examples were still using the old shape and
broke oas3-valid-{media,schema}-example lint:

- openapi/paths/customers/customers_external_accounts.yaml (usBankAccount)
- openapi/paths/platform/platform_external_accounts.yaml (usBankAccount)
- openapi/components/schemas/quotes/Quote.yaml (paymentInstructions)
- openapi/components/schemas/transactions/OutgoingTransaction.yaml (paymentInstructions)

Rebuilt openapi.yaml + mintlify/openapi.yaml. Lint: 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lightspark-copybara

Copy link
Copy Markdown
Contributor Author

Superseded by #387

@lightspark-copybara
lightspark-copybara Bot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants