feat: adding external account validation schema#206
Conversation
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript ✅ grid-python studio · code
✅ grid-typescript studio · code
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThis PR adds beneficiary name verification support to the External Account schema. Two new optional fields ( Key Changes:
Implementation Quality:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/BeneficiaryVerificationStatus.yaml | New enum defining beneficiary name verification status with clear documentation |
| openapi/components/schemas/external_accounts/BeneficiaryVerifiedData.yaml | New object schema containing verified account holder name from payment rail |
| openapi/components/schemas/external_accounts/ExternalAccount.yaml | Added two optional fields for beneficiary verification status and verified data |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[External Account Created] --> B{Payment Rail Supports<br/>Name Verification?}
B -->|No| C[Status: UNSUPPORTED]
B -->|Yes| D{Verification Method}
D -->|Immediate Check| E{Name Match Result}
D -->|Deferred to FI| F[Status: CHECKED_BY_RECEIVING_FI]
D -->|Async Process| G[Status: PENDING]
E -->|Exact Match| H[Status: MATCHED]
E -->|Similar Match| I[Status: PARTIAL_MATCH]
E -->|No Match| J[Status: NOT_MATCHED]
H --> K[Store Verified Data]
I --> K
J --> K
G --> L{Async Verification<br/>Complete}
L --> E
K --> M[Return ExternalAccount<br/>with Verification Status]
C --> M
F --> M
Last reviewed commit: ef766e0
b7f21a5 to
ef766e0
Compare

TL;DR
Added beneficiary name verification fields to the External Account schema.
What changed?
BeneficiaryVerificationStatusenum with values:MATCHED,PARTIAL_MATCH,NOT_MATCHED,UNSUPPORTED,CHECKED_BY_RECEIVING_FI, andPENDINGVerifiedBeneficiaryDataobject schema with afullNamepropertyExternalAccountschema to include:beneficiaryVerificationStatusfield to indicate the result of name verificationbeneficiaryVerifiedDatafield to store verified account holder informationHow to test?
Why make this change?
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.