-
Notifications
You must be signed in to change notification settings - Fork 9
Add INR bank (NEFT/RTGS) fields to the INR account schema #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ allOf: | |
| type: string | ||
| enum: | ||
| - UPI | ||
| - NEFT | ||
| - RTGS | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| type: object | ||
| required: | ||
| - accountType | ||
| - vpa | ||
| description: 'Required fields depend on the selected paymentRails: | ||
|
|
||
| - NEFT: accountNumber, ifsc, rail | ||
|
|
||
| - RTGS: accountNumber, ifsc, rail | ||
|
|
||
| - UPI: vpa' | ||
| properties: | ||
| accountType: | ||
| type: string | ||
|
|
@@ -14,6 +20,37 @@ properties: | |
| minLength: 3 | ||
| maxLength: 255 | ||
| pattern: ^[a-zA-Z0-9.\-_]+@[a-zA-Z0-9]+$ | ||
| accountNumber: | ||
| type: string | ||
| description: Indian bank account number (9–18 digits) | ||
| minLength: 9 | ||
| maxLength: 18 | ||
| example: '000111222333' | ||
| pattern: ^[0-9]{9,18}$ | ||
| ifsc: | ||
| type: string | ||
| description: The Indian Financial System Code (IFSC) of the beneficiary's bank | ||
| branch (NEFT/RTGS) | ||
| example: HDFC0001234 | ||
| minLength: 11 | ||
| maxLength: 11 | ||
| pattern: ^[A-Z]{4}0[A-Z0-9]{6}$ | ||
| rail: | ||
| type: string | ||
| description: The payment rail to route the payout over, for currencies that support | ||
| more than one (e.g. NEFT or RTGS for INR). | ||
| example: NEFT | ||
| minLength: 1 | ||
| maxLength: 32 | ||
|
Comment on lines
+38
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The create-time Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfoBase.yaml
Line: 38-44
Comment:
**Rail Accepts Unsupported Values**
The create-time `rail` selector is a free-form string while the INR response schema only advertises `UPI`, `NEFT`, and `RTGS`. A create payload with `rail: "IMPS"` or `rail: "NEFTT"` can pass OpenAPI validation and leave the account with a routing value that downstream payout logic cannot match to a supported INR rail.
How can I resolve this? If you propose a fix, please make it concise. |
||
| bankName: | ||
| type: string | ||
| description: The name of the bank | ||
| minLength: 1 | ||
| maxLength: 255 | ||
| example: | ||
| accountType: INR_ACCOUNT | ||
| vpa: user@upi | ||
| accountNumber: '000111222333' | ||
| ifsc: HDFC0001234 | ||
| rail: NEFT | ||
| bankName: Example Bank | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an INR external account create request uses this base schema, only
accountTypeis required. A payload withaccountType: INR_ACCOUNTand missingvpa, or with partial bank details such asaccountNumberwithoutifscandrail, can pass schema validation even though no supported INR rail has enough destination data to route a payout.Prompt To Fix With AI