Conversation
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-python studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
✅ grid-openapi studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
780647d to
2032fbc
Compare
Greptile SummaryThis PR refactors the external account schemas from mechanism-based naming (US_ACCOUNT, PIX, CLABE, UPI) to currency-based naming (USD_ACCOUNT, BRL_ACCOUNT, MXN_ACCOUNT, etc.), adding support for 9 new currencies (BRL, DKK, HKD, IDR, INR, MXN, MYR, THB, VND) alongside existing GBP, PHP, SGD, and the renamed USD. Key Changes:
Issues Found:
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/UsdAccountInfo.yaml | New USD schema replaces UsAccountInfo but lacks accountCategory, validation patterns, and examples that existed in original |
| openapi/components/schemas/common/BrlAccountInfo.yaml | New BRL schema with PIX support, but field descriptions incorrectly attribute account holder data to "the bank" |
| openapi/components/schemas/common/IdrAccountInfo.yaml | Uses sortCode field which is UK-specific terminology, should be bankCode for Indonesian banking |
| openapi/components/schemas/common/InrAccountInfo.yaml | New INR schema with UPI/IMPS support, but VPA description incorrectly attributes it to "the bank" |
| openapi/components/schemas/common/HkdAccountInfo.yaml | New HKD schema with redundant descriptions and missing validation patterns/examples |
| openapi/components/schemas/common/ThbAccountInfo.yaml | New THB schema with same issues as HKD - redundant descriptions, no validation patterns |
| openapi/components/schemas/common/VndAccountInfo.yaml | New VND schema with redundant descriptions and missing validation patterns |
| openapi/components/schemas/common/MyrAccountInfo.yaml | New MYR schema with redundant descriptions and missing validation patterns |
| openapi/components/schemas/common/DkkAccountInfo.yaml | New DKK schema with SEPA support but missing validation patterns for IBAN and SWIFT BIC |
Entity Relationship Diagram
%%{init: {'theme': 'neutral'}}%%
erDiagram
BaseExternalAccountInfo ||--o{ UsdExternalAccountInfo : extends
BaseExternalAccountInfo ||--o{ BrlExternalAccountInfo : extends
BaseExternalAccountInfo ||--o{ GbpExternalAccountInfo : extends
BaseExternalAccountInfo ||--o{ InrExternalAccountInfo : extends
UsdAccountInfo ||--|| UsdExternalAccountInfo : "account info"
BrlAccountInfo ||--|| BrlExternalAccountInfo : "account info"
GbpAccountInfo ||--|| GbpExternalAccountInfo : "account info"
InrAccountInfo ||--|| InrExternalAccountInfo : "account info"
UsdExternalAccountInfo ||--o{ UsdBeneficiary : "individual"
UsdExternalAccountInfo ||--o{ BusinessBeneficiary : "business"
BrlExternalAccountInfo ||--o{ BrlBeneficiary : "individual"
BrlExternalAccountInfo ||--o{ BusinessBeneficiary : "business"
UsdAccountInfo {
string accountType "USD_ACCOUNT"
array countries "US"
array paymentRails "ACH,WIRE,RTP,FEDNOW"
string accountNumber
string routingNumber
}
BrlAccountInfo {
string accountType "BRL_ACCOUNT"
array countries "BR"
array paymentRails "PIX"
string pixKey
string pixKeyType
string taxId
}
InrAccountInfo {
string accountType "INR_ACCOUNT"
array countries "IN"
array paymentRails "UPI,IMPS"
string vpa
}
UsdBeneficiary {
string beneficiaryType "INDIVIDUAL"
string fullName
string birthDate
string nationality
}
BusinessBeneficiary {
string beneficiaryType "BUSINESS"
string legalName
string registrationNumber
string taxId
}
Last reviewed commit: 1460f90
Additional Comments (2)
This example still uses This example will now fail validation against the updated schema. It needs to be updated to use the new Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_external_accounts.yaml
Line: 127:131
Comment:
**Stale example using removed account type**
This example still uses `accountType: US_ACCOUNT` with `accountCategory: CHECKING` and `bankName`, but this PR removes `US_ACCOUNT` from the `ExternalAccountType` enum and replaces it with `USD_ACCOUNT`. The new `UsdAccountInfo` schema does not include `accountCategory` or `bankName` fields.
This example will now fail validation against the updated schema. It needs to be updated to use the new `USD_ACCOUNT` type and only include the fields defined in `UsdAccountInfo` (`accountNumber`, `routingNumber`).
```suggestion
accountType: USD_ACCOUNT
accountNumber: "12345678901"
routingNumber: "123456789"
```
How can I resolve this? If you propose a fix, please make it concise.
Same issue as in Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/platform/platform_external_accounts.yaml
Line: 89:93
Comment:
**Stale example using removed account type**
Same issue as in `customers_external_accounts.yaml`: this example uses `accountType: US_ACCOUNT` with `accountCategory: CHECKING` and `bankName`, but `US_ACCOUNT` is no longer a valid `ExternalAccountType` value in this PR, and the new `UsdAccountInfo` schema does not include `accountCategory` or `bankName`.
```suggestion
accountType: USD_ACCOUNT
accountNumber: "12345678901"
routingNumber: "123456789"
```
How can I resolve this? If you propose a fix, please make it concise. |
Added beneficiary name verification fields to the External Account schema. - Added a new `BeneficiaryVerificationStatus` enum with values: `MATCHED`, `PARTIAL_MATCH`, `NOT_MATCHED`, `UNSUPPORTED`, `CHECKED_BY_RECEIVING_FI`, and `PENDING` - Added a new `VerifiedBeneficiaryData` object schema with a `fullName` property - Extended the `ExternalAccount` schema to include: - `beneficiaryVerificationStatus` field to indicate the result of name verification - `beneficiaryVerifiedData` field to store verified account holder information 1. Create an external account with a beneficiary name 2. Verify that the API returns the appropriate verification status and verified data 3. Test each possible verification status to ensure proper handling This change enables beneficiary name verification for external accounts, which helps prevent misdirected payments by confirming that the account holder name matches the expected beneficiary. This feature enhances security and reduces the risk of fraud or errors when sending payments to external accounts.
d5016b7 to
7fcddff
Compare
| type: string | ||
| description: The IBAN of the bank | ||
| swiftBic: | ||
| type: string | ||
| description: The SWIFT BIC of the bank |
There was a problem hiding this comment.
Missing validation patterns and examples for IBAN and SWIFT BIC. Compare with GbpAccountInfo:27-36 which includes proper validation patterns, examples, and specific constraints (e.g., pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$ for SWIFT code).
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/DkkAccountInfo.yaml
Line: 26-30
Comment:
Missing validation patterns and examples for IBAN and SWIFT BIC. Compare with `GbpAccountInfo:27-36` which includes proper validation patterns, examples, and specific constraints (e.g., `pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$` for SWIFT code).
How can I resolve this? If you propose a fix, please make it concise.| type: string | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number of the bank |
There was a problem hiding this comment.
Same redundant description issue as HkdAccountInfo - "bank name of the bank" and "account number of the bank". Also missing validation patterns and examples. Compare with NgnAccountInfo:26-34 which has precise descriptions, validation patterns, and examples.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/ThbAccountInfo.yaml
Line: 26-30
Comment:
Same redundant description issue as `HkdAccountInfo` - "bank name of the bank" and "account number of the bank". Also missing validation patterns and examples. Compare with `NgnAccountInfo:26-34` which has precise descriptions, validation patterns, and examples.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| type: string | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number of the bank |
There was a problem hiding this comment.
Missing validation patterns and examples. Consider adding specific constraints if Vietnamese bank account numbers have a standard format.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/VndAccountInfo.yaml
Line: 26-30
Comment:
Missing validation patterns and examples. Consider adding specific constraints if Vietnamese bank account numbers have a standard format.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| type: string | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number of the bank |
There was a problem hiding this comment.
Redundant descriptions and missing validation patterns. Same issues as ThbAccountInfo and VndAccountInfo.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/MyrAccountInfo.yaml
Line: 26-30
Comment:
Redundant descriptions and missing validation patterns. Same issues as `ThbAccountInfo` and `VndAccountInfo`.
How can I resolve this? If you propose a fix, please make it concise.Update stale references to old payment-method-based schema names (UsAccountExternalAccountInfo, PaymentClabeAccountInfo, etc.) and remove BaseBeneficiary transform that no longer matches bundled output. Co-authored-by: Cursor <cursoragent@cursor.com>
| accountNumber: | ||
| type: string | ||
| description: The account number of the bank | ||
| routingNumber: | ||
| type: string | ||
| description: The routing number of the bank |
There was a problem hiding this comment.
Missing validation patterns and examples. The original UsAccountInfo included:
routingNumberwithminLength: 9,maxLength: 9,pattern: ^[0-9]{9}$, and exampleaccountNumberwith example- More precise descriptions
Also, the required accountCategory field (CHECKING/SAVINGS) was removed - confirm this isn't a breaking change for existing integrations.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/UsdAccountInfo.yaml
Line: 28-33
Comment:
Missing validation patterns and examples. The original `UsAccountInfo` included:
- `routingNumber` with `minLength: 9`, `maxLength: 9`, `pattern: ^[0-9]{9}$`, and example
- `accountNumber` with example
- More precise descriptions
Also, the required `accountCategory` field (CHECKING/SAVINGS) was removed - confirm this isn't a breaking change for existing integrations.
How can I resolve this? If you propose a fix, please make it concise.| sortCode: | ||
| type: string | ||
| description: The sort code of the bank |
There was a problem hiding this comment.
sortCode is UK-specific banking terminology. Indonesian banks use "bank code" (kode bank) for routing. Rename to bankCode for accuracy.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/IdrAccountInfo.yaml
Line: 25-27
Comment:
`sortCode` is UK-specific banking terminology. Indonesian banks use "bank code" (kode bank) for routing. Rename to `bankCode` for accuracy.
How can I resolve this? If you propose a fix, please make it concise.| pixKey: | ||
| type: string | ||
| description: The PIX key of the bank | ||
| pixKeyType: | ||
| type: string | ||
| description: The type of PIX key of the bank | ||
| taxId: | ||
| type: string | ||
| description: The tax ID of the bank account |
There was a problem hiding this comment.
Descriptions incorrectly attribute account holder data to "the bank". PIX keys and tax IDs belong to the beneficiary/account holder, not the bank. Compare with GbpAccountInfo:27 which uses precise language like "UK bank sort code".
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/BrlAccountInfo.yaml
Line: 26-34
Comment:
Descriptions incorrectly attribute account holder data to "the bank". PIX keys and tax IDs belong to the beneficiary/account holder, not the bank. Compare with `GbpAccountInfo:27` which uses precise language like "UK bank sort code".
How can I resolve this? If you propose a fix, please make it concise.| bankName: | ||
| type: string | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: The account number of the bank |
There was a problem hiding this comment.
Redundant descriptions: "bank name of the bank" and "account number of the bank". Use clearer phrasing like SgdAccountInfo:30 ("Name of the beneficiary's bank") and add validation patterns/examples.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/HkdAccountInfo.yaml
Line: 25-30
Comment:
Redundant descriptions: "bank name of the bank" and "account number of the bank". Use clearer phrasing like `SgdAccountInfo:30` ("Name of the beneficiary's bank") and add validation patterns/examples.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| type: string | ||
| description: The IBAN of the bank | ||
| swiftBic: | ||
| type: string | ||
| description: The SWIFT BIC of the bank |
There was a problem hiding this comment.
Missing validation patterns for IBAN and SWIFT BIC. Reference GbpAccountInfo:29 and SgdAccountInfo:33-38 which include proper patterns, length constraints, and examples.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/DkkAccountInfo.yaml
Line: 26-30
Comment:
Missing validation patterns for IBAN and SWIFT BIC. Reference `GbpAccountInfo:29` and `SgdAccountInfo:33-38` which include proper patterns, length constraints, and examples.
How can I resolve this? If you propose a fix, please make it concise.
No description provided.