Skip to content

Add bankAccountType to USD, bankName/documentType/documentNumber to COP, and COMPANY_LEGAL_NAME field name#352

Open
matthappens wants to merge 2 commits intomainfrom
04-18-add_company_legal_name_to_customer_info_field
Open

Add bankAccountType to USD, bankName/documentType/documentNumber to COP, and COMPANY_LEGAL_NAME field name#352
matthappens wants to merge 2 commits intomainfrom
04-18-add_company_legal_name_to_customer_info_field

Conversation

@matthappens
Copy link
Copy Markdown
Contributor

@matthappens matthappens commented Apr 18, 2026

TL;DR

Expanded the OpenAPI schema with new fields for COP accounts, USD account info, and customer field definitions.

What changed?

  • Added bankName as a required field to CopAccountInfoBase, capturing the name of the bank for COP accounts.
  • Added documentType and documentNumber fields to CopBeneficiary, allowing identity document information (e.g., national ID, passport) to be associated with a beneficiary.
  • Added bankAccountType (CHECKING or SAVINGS) to UsdAccountInfoBase, required for certain corridors such as El Salvador.
  • Added COMPANY_LEGAL_NAME as a valid enum value to CustomerInfoFieldName, enabling platforms to capture a company's legal name as a customer info field.

How to test?

  • Validate that COP account creation requests require bankName and that the field is correctly documented in the API reference.
  • Confirm that documentType and documentNumber can be submitted as part of a COP beneficiary payload.
  • Test USD account creation for El Salvador corridors to verify that bankAccountType is accepted and enforced where required.
  • Verify that COMPANY_LEGAL_NAME is accepted as a valid CustomerInfoFieldName value in relevant customer info requests.

Why make this change?

These additions support expanded corridor requirements and compliance needs. Certain payment corridors (e.g., El Salvador) require bank account type information for USD transfers, COP beneficiaries may need identity document details for regulatory purposes, and COMPANY_LEGAL_NAME is needed to capture legal entity information for business customers.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2026

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

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Apr 20, 2026 9:48pm

Request Review

Copy link
Copy Markdown
Contributor Author

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 18, 2026

✱ Stainless preview builds

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

kotlin

feat(api): add COMPANY_LEGAL_NAME to CustomerInfoFieldName

openapi

feat(api): add COMPANY_LEGAL_NAME to CounterpartyFieldType enum

python

feat(api): add COMPANY_LEGAL_NAME to CustomerInfoFieldName

typescript

feat(api): add COMPANY_LEGAL_NAME to CustomerInfoFieldName in config

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

grid-python studio · code · diff

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

pip install https://pkg.stainless.com/s/grid-python/c494ab717a510f1f30aa098ede60ae2662821d88/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code · diff

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

grid-openapi studio · code · diff

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

grid-typescript studio · code · diff

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

npm install https://pkg.stainless.com/s/grid-typescript/34cfecdf9e0ea5e4ab263ff1011cc13670c986fb/dist.tar.gz

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-20 21:54:07 UTC

@matthappens matthappens requested a review from shreyav April 18, 2026 23:21
@matthappens matthappens marked this pull request as ready for review April 19, 2026 01:47
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 19, 2026

Greptile Summary

This PR extends the OpenAPI schema with new fields across four components: bankName (required) on CopAccountInfoBase, documentType/documentNumber (optional) on CopBeneficiary, bankAccountType (optional) on UsdAccountInfoBase, and COMPANY_LEGAL_NAME on the CustomerInfoFieldName enum — supporting expanded corridor requirements and compliance needs.

  • Breaking change risk: Making bankName required on CopAccountInfoBase will break any existing COP account creation client not yet passing this field. Confirm whether existing integrations have been updated or whether a migration period is needed before enforcing this in the schema.

Confidence Score: 4/5

Safe to merge once the breaking-change implications of the required bankName field are confirmed or addressed.

One P1 concern: adding bankName to required in CopAccountInfoBase is a breaking schema change that could silently break existing COP account creation clients. All other changes are additive and low-risk. Score is 4 pending confirmation that existing consumers are ready for this requirement.

openapi/components/schemas/common/CopAccountInfoBase.yaml — requires attention due to the newly required bankName field and its potential for breaking existing clients.

Important Files Changed

Filename Overview
openapi/components/schemas/common/CopAccountInfoBase.yaml Adds bankName as a required field — a potentially breaking change for existing COP account creation clients; also lacks string length constraints on the new field.
openapi/components/schemas/common/CopBeneficiary.yaml Adds optional documentType and documentNumber fields; documentType is an unconstrained string that would benefit from an enum of valid values.
openapi/components/schemas/common/UsdAccountInfoBase.yaml Adds optional bankAccountType enum (CHECKING/SAVINGS) for corridor-specific requirements; clean change, consistent with COP account pattern.
openapi/components/schemas/customers/CustomerInfoFieldName.yaml Adds COMPANY_LEGAL_NAME to the enum — clean, additive change with no issues.
openapi.yaml Generated bundle reflecting all source schema changes; consistent with component-level edits.
mintlify/openapi.yaml Mintlify-specific generated bundle; identical changes to openapi.yaml, consistent with source changes.

Entity Relationship Diagram

%%{init: {'theme': 'neutral'}}%%
erDiagram
    CopAccountInfoBase {
        string accountType "enum: COP_ACCOUNT"
        string accountNumber "minLength:1, maxLength:34"
        string bankAccountType "enum: CHECKING|SAVINGS"
        string bankName "NEW - required"
        string phoneNumber "minLength:7, maxLength:15"
    }
    CopBeneficiary {
        string beneficiaryType "enum: INDIVIDUAL"
        string fullName
        string birthDate
        string nationality
        string email
        string phoneNumber
        string countryOfResidence
        string documentType "NEW - optional, no enum"
        string documentNumber "NEW - optional"
        object address
    }
    UsdAccountInfoBase {
        string accountType "enum: USD_ACCOUNT"
        string accountNumber "minLength:1, maxLength:34"
        string routingNumber "pattern: 9 digits"
        string bankAccountType "NEW - optional, enum: CHECKING|SAVINGS"
    }
    CustomerInfoFieldName {
        string enum "...BUSINESS_TYPE"
        string COMPANY_LEGAL_NAME "NEW"
    }
    CopAccountInfoBase ||--o{ CopBeneficiary : "used with"
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/CopAccountInfoBase.yaml
Line: 6

Comment:
**Potentially breaking change: `bankName` added as required**

Adding `bankName` to the `required` array is a breaking schema change for existing API consumers creating COP accounts — any client that doesn't already pass this field will now fail validation. If the backend enforcement is being introduced simultaneously, existing integrations will break without a migration period. Consider whether this should be phased in (e.g., optional first, then required) or whether existing clients have already been notified/updated.

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/CopBeneficiary.yaml
Line: 30-32

Comment:
**`documentType` should use an enum for valid values**

`documentType` is defined as an unconstrained `string`. Without an enum, any arbitrary value (e.g., `"foobar"`) is schema-valid, which makes interoperability and validation harder. Other document-type fields in payment APIs typically enumerate accepted values. Consider adding an enum of known document types such as `NATIONAL_ID`, `PASSPORT`, `DRIVERS_LICENSE`, etc.

```suggestion
  documentType:
    type: string
    description: The type of identity document
    enum:
      - NATIONAL_ID
      - PASSPORT
      - DRIVERS_LICENSE
```

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: 24-26

Comment:
**`bankName` has no string length constraints**

Unlike `accountNumber` (`maxLength: 34`) and `phoneNumber` (`minLength: 7`, `maxLength: 15`), `bankName` has no length bounds. Consider adding `minLength: 1` and a reasonable `maxLength` to prevent empty strings or excessively long values from being submitted.

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

Reviews (2): Last reviewed commit: "Add Thunes COP/USD fields for bankName, ..." | Re-trigger Greptile

- COP: Add required bankName to CopAccountInfoBase (AT-4890)
- COP: Add documentType/documentNumber to CopBeneficiary (AT-4882)
- USD: Add optional bankAccountType to UsdAccountInfoBase for SLV corridor (AT-4884)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matthappens matthappens changed the title Add company legal name to customer info field Add bankAccountType to USD, bankName/documentType/documentNumber to COP, and COMPANY_LEGAL_NAME field name Apr 20, 2026
@matthappens matthappens requested a review from a team April 20, 2026 21:50
Copy link
Copy Markdown
Contributor Author

@greptile please review

- accountType
- accountNumber
- bankAccountType
- bankName
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Potentially breaking change: bankName added as required

Adding bankName to the required array is a breaking schema change for existing API consumers creating COP accounts — any client that doesn't already pass this field will now fail validation. If the backend enforcement is being introduced simultaneously, existing integrations will break without a migration period. Consider whether this should be phased in (e.g., optional first, then required) or whether existing clients have already been notified/updated.

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

Comment:
**Potentially breaking change: `bankName` added as required**

Adding `bankName` to the `required` array is a breaking schema change for existing API consumers creating COP accounts — any client that doesn't already pass this field will now fail validation. If the backend enforcement is being introduced simultaneously, existing integrations will break without a migration period. Consider whether this should be phased in (e.g., optional first, then required) or whether existing clients have already been notified/updated.

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

Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant