chore: Sync account schemas - #385
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
✅ grid-python studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThis 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.
Confidence Score: 4/5Hold 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.
|
| 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
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
| 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}$ |
There was a problem hiding this 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.
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.There was a problem hiding this comment.
this was for SLV bank accounts, but do we use checking/savings for USA bank accounts? does that matter?
There was a problem hiding this comment.
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.
| - WIRE | ||
| - RTP | ||
| - FEDNOW | ||
| - BANK_TRANSFER | ||
| - MOBILE_MONEY |
There was a problem hiding this 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.
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.There was a problem hiding this comment.
I think bank_transfer was specific for el salvador. the other items are usa specific rails. mobile_money is now the only SLV corridor
| @@ -21,13 +25,3 @@ properties: | |||
| enum: | |||
| - CHECKING | |||
| - SAVINGS | |||
There was a problem hiding this 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.
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.There was a problem hiding this comment.
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
There was a problem hiding this comment.
Makes sense — add phoneNumber back as an optional property (omit it from required):
| 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.
| - accountType | ||
| - bankName | ||
| - accountNumber |
There was a problem hiding this 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.
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.There was a problem hiding this comment.
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>
|
Superseded by #387 |
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 schemascommon/PaymentInstructions.yaml— payment instructions oneOf (new currencies added)external_accounts/— per-currency external account schemas (reference common/)Please review the changes before merging.