Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 36 additions & 1 deletion openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions openapi/components/schemas/common/InrAccountInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ allOf:
type: string
enum:
- UPI
- NEFT
- RTGS
39 changes: 38 additions & 1 deletion openapi/components/schemas/common/InrAccountInfoBase.yaml
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'
Comment on lines 2 to +10

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 Conditional Fields Stay Optional

When an INR external account create request uses this base schema, only accountType is required. A payload with accountType: INR_ACCOUNT and missing vpa, or with partial bank details such as accountNumber without ifsc and rail, can pass schema validation even though no supported INR rail has enough destination data to route a payout.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/InrAccountInfoBase.yaml
Line: 2-10

Comment:
**Conditional Fields Stay Optional**

When an INR external account create request uses this base schema, only `accountType` is required. A payload with `accountType: INR_ACCOUNT` and missing `vpa`, or with partial bank details such as `accountNumber` without `ifsc` and `rail`, can pass schema validation even though no supported INR rail has enough destination data to route a payout.

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

properties:
accountType:
type: string
Expand All @@ -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

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

Prompt To Fix With AI
This 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
Loading