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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); chore: Sync account schemas by lightspark-copybara[bot] · Pull Request #385 · lightsparkdev/grid-api · GitHub
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

vercelBot commented Apr 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderReadyReadyPreview, CommentApr 23, 2026 7:07pm

Request Review

@github-actions

github-actionsBot 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-openapistudio · code · diff

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

grid-kotlinstudio · 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-typescriptstudio · 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-pythonstudio · 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

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

FilenameOverview
openapi/components/schemas/common/UsdAccountInfoBase.yamlBreaking 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.yamlBreaking change: payment method BANK_TRANSFER replaced with MOBILE_MONEY for USD accounts
openapi/components/schemas/common/CopAccountInfoBase.yamlBreaking change: phoneNumber field fully removed; bankName gains minLength/maxLength constraints and is reordered in required list
openapi/components/schemas/common/CopBeneficiary.yamlRequired fields changed: countryOfResidence demoted to optional, documentNumber/documentType promoted to required; address reordered in properties (cosmetic)
openapi/components/schemas/common/GtqAccountInfoBase.yamlphoneNumber removed and bankAccountType (CHECKING/SAVINGS) added as required; bankName also added as required
openapi/components/schemas/common/GtqBeneficiary.yamlphoneNumber added to required list; property is correctly defined in the properties section
openapi/components/schemas/common/BdtAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/EgpAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GhsAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/JmdAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/PkrAccountInfoBase.yamlbankName added as required field with minLength/maxLength constraints
openapi/components/schemas/common/GtqAccountInfo.yamlMOBILE_MONEY removed from GTQ payment method enum; only BANK_TRANSFER remains
openapi/components/schemas/common/CopAccountInfo.yamlMOBILE_MONEY removed from COP payment method enum; only BANK_TRANSFER remains
openapi.yamlGenerated bundle reflecting all source schema changes; identical diff to mintlify/openapi.yaml
mintlify/openapi.yamlGenerated 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.

P1bankAccountType 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.

P1BANK_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.

P1phoneNumber 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.

P1bankName 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
ContributorAuthor

Superseded by #387

@lightspark-copybara
lightspark-copybaraBot deleted the auto/sync-grid-schemas-20260423-184756 branch April 23, 2026 21:57
Sign up for freeto 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

@matthappens@AaryamanBhute