Skip to content

Commit 4d89702

Browse files
Add PaymentRail enum for external accounts (#347)
## Summary - Introduces a new `PaymentRail` enum in `openapi/components/schemas/common/PaymentRail.yaml` containing all 14 payment rails used across external accounts: ACH, BANK_TRANSFER, FAST, FASTER_PAYMENTS, FEDNOW, MOBILE_MONEY, PAYNOW, PIX, RTP, SEPA, SEPA_INSTANT, SPEI, UPI, WIRE - Wires the enum into `AccountDestination.paymentRail` (quotes) and `ExchangeRate.destinationPaymentRail` (exchange rates) which previously used untyped strings - Individual per-currency `AccountInfo` schemas retain their currency-specific subset enums for stricter validation ## Test plan - [x] `make build` succeeds — OpenAPI spec bundles correctly - [x] `npx @redocly/cli lint openapi.yaml` passes validation (16 pre-existing warnings, 0 errors) - [ ] Verify generated SDK clients pick up the new enum type - [ ] Verify Mintlify docs render the enum values on API reference pages 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent a79ac8b commit 4d89702

5 files changed

Lines changed: 82 additions & 21 deletions

File tree

mintlify/openapi.yaml

Lines changed: 26 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 26 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
type: string
2+
enum:
3+
- ACH
4+
- BANK_TRANSFER
5+
- FAST
6+
- FASTER_PAYMENTS
7+
- FEDNOW
8+
- MOBILE_MONEY
9+
- PAYNOW
10+
- PIX
11+
- RTP
12+
- SEPA
13+
- SEPA_INSTANT
14+
- SPEI
15+
- UPI
16+
- WIRE
17+
description: >-
18+
The payment rail used for the transfer. Payment rails represent the underlying
19+
payment network or system used to move funds between accounts.
20+
example: ACH

openapi/components/schemas/exchange_rates/ExchangeRate.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ properties:
3535
destinationCurrency:
3636
$ref: ../common/Currency.yaml
3737
destinationPaymentRail:
38-
type: string
39-
description: The payment rail used for the destination (e.g., UPI, SEPA_INSTANT, MOBILE_MONEY, FASTER_PAYMENTS)
40-
example: UPI
38+
allOf:
39+
- $ref: ../common/PaymentRail.yaml
40+
- description: The payment rail used for the destination (e.g., UPI, SEPA_INSTANT, MOBILE_MONEY, FASTER_PAYMENTS)
41+
example: UPI
4142
receivingAmount:
4243
type: integer
4344
format: int64

openapi/components/schemas/quotes/AccountDestination.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ allOf:
1515
description: Destination account identifier
1616
example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
1717
paymentRail:
18-
type: string
19-
description: >-
20-
The payment rail to use for the transfer. Must be one of the rails
21-
supported by the destination account. If not specified, the system
22-
will select a default rail.
23-
example: ACH
18+
allOf:
19+
- $ref: ../common/PaymentRail.yaml
20+
- description: >-
21+
The payment rail to use for the transfer. Must be one of the rails
22+
supported by the destination account. If not specified, the system
23+
will select a default rail.
2424
description: Destination account details

0 commit comments

Comments
 (0)