Skip to content

Commit 9e7a38c

Browse files
claude[bot]github-actions[bot]claude
authored
Remove paymentRails from external account create requests (#335)
## Summary Syncs documentation and sample code with the schema change from #302, which split request and response schemas so that `paymentRails` is only present in responses (not requests). ### Changes **Mintlify Documentation** - `mintlify/snippets/external-accounts.mdx`: Removed `paymentRails` from PHP and GBP create request examples **Kotlin Sample App** - `ExternalAccounts.kt`: Removed `paymentRails` from all account info builders and deleted the now-unused `buildPaymentRails` helper function - `EndToEndTest.kt`: Removed `paymentRails` from test request payloads (MXN and INR accounts) **Grid Visualizer** - `account-types.ts`: Removed `paymentRails` property from `AccountTypeSpec` interface and all account type definitions - `code-generator.ts`: Removed code that added `paymentRails` to generated request bodies ## Test plan - [x] `make lint` passes - [ ] Review generated API code in Grid Visualizer no longer includes `paymentRails` - [ ] Verify Mintlify docs render correctly ## Note Found a pre-existing SDK compatibility issue in `Quotes.kt` (unrelated to this PR) where the `paymentRail` method on `AccountDestination.builder()` is not recognized by SDK 1.1.0, despite being present in the OpenAPI schema. This should be tracked separately. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 98e2b89 commit 9e7a38c

5 files changed

Lines changed: 4 additions & 62 deletions

File tree

components/grid-visualizer/src/data/account-types.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export interface AccountFieldSpec {
77
export interface AccountTypeSpec {
88
accountType: string;
99
fields: AccountFieldSpec[];
10-
paymentRails?: string[];
1110
beneficiaryRequired: boolean;
1211
}
1312

@@ -18,7 +17,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
1817
{ name: 'accountNumber', example: '123456789' },
1918
{ name: 'routingNumber', example: '021000021' },
2019
],
21-
paymentRails: ['ACH', 'WIRE', 'RTP', 'FEDNOW'],
2220
beneficiaryRequired: true,
2321
},
2422
EUR_ACCOUNT: {
@@ -27,7 +25,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
2725
{ name: 'iban', example: 'DE89370400440532013000' },
2826
{ name: 'swiftBic', example: 'DEUTDEFF', description: 'Optional' },
2927
],
30-
paymentRails: ['SEPA', 'SEPA_INSTANT'],
3128
beneficiaryRequired: true,
3229
},
3330
GBP_ACCOUNT: {
@@ -36,7 +33,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
3633
{ name: 'sortCode', example: '20-00-00' },
3734
{ name: 'accountNumber', example: '12345678' },
3835
],
39-
paymentRails: ['FASTER_PAYMENTS'],
4036
beneficiaryRequired: true,
4137
},
4238
BRL_ACCOUNT: {
@@ -46,23 +42,20 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
4642
{ name: 'pixKeyType', example: 'PHONE', description: 'CPF, CNPJ, EMAIL, PHONE, or RANDOM' },
4743
{ name: 'taxId', example: '12345678901' },
4844
],
49-
paymentRails: ['PIX'],
5045
beneficiaryRequired: true,
5146
},
5247
MXN_ACCOUNT: {
5348
accountType: 'MXN_ACCOUNT',
5449
fields: [
5550
{ name: 'clabeNumber', example: '123456789012345678' },
5651
],
57-
paymentRails: ['SPEI'],
5852
beneficiaryRequired: true,
5953
},
6054
INR_ACCOUNT: {
6155
accountType: 'INR_ACCOUNT',
6256
fields: [
6357
{ name: 'vpa', example: 'customer@okbank' },
6458
],
65-
paymentRails: ['UPI'],
6659
beneficiaryRequired: true,
6760
},
6861
DKK_ACCOUNT: {
@@ -71,7 +64,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
7164
{ name: 'iban', example: 'DK5000400440116243' },
7265
{ name: 'swiftBic', example: 'NDEADKKK', description: 'Optional' },
7366
],
74-
paymentRails: ['SEPA', 'SEPA_INSTANT'],
7567
beneficiaryRequired: true,
7668
},
7769
NGN_ACCOUNT: {
@@ -80,7 +72,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
8072
{ name: 'accountNumber', example: '0123456789' },
8173
{ name: 'bankName', example: 'First Bank of Nigeria' },
8274
],
83-
paymentRails: ['BANK_TRANSFER'],
8475
beneficiaryRequired: true,
8576
},
8677
CAD_ACCOUNT: {
@@ -90,7 +81,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
9081
{ name: 'branchCode', example: '00012' },
9182
{ name: 'accountNumber', example: '1234567' },
9283
],
93-
paymentRails: ['BANK_TRANSFER'],
9484
beneficiaryRequired: true,
9585
},
9686
PHP_ACCOUNT: {
@@ -99,7 +89,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
9989
{ name: 'bankName', example: 'BDO Unibank' },
10090
{ name: 'accountNumber', example: '001234567890' },
10191
],
102-
paymentRails: ['BANK_TRANSFER'],
10392
beneficiaryRequired: true,
10493
},
10594
SGD_ACCOUNT: {
@@ -109,7 +98,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
10998
{ name: 'swiftCode', example: 'DBSSSGSG' },
11099
{ name: 'accountNumber', example: '0123456789' },
111100
],
112-
paymentRails: ['PAYNOW', 'FAST', 'BANK_TRANSFER'],
113101
beneficiaryRequired: true,
114102
},
115103
HKD_ACCOUNT: {
@@ -119,7 +107,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
119107
{ name: 'accountNumber', example: '123456789012' },
120108
{ name: 'swiftCode', example: 'HSBCHKHHHKH' },
121109
],
122-
paymentRails: ['BANK_TRANSFER'],
123110
beneficiaryRequired: true,
124111
},
125112
IDR_ACCOUNT: {
@@ -130,7 +117,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
130117
{ name: 'swiftCode', example: 'CENAIDJA' },
131118
{ name: 'phoneNumber', example: '+6281234567890' },
132119
],
133-
paymentRails: ['BANK_TRANSFER'],
134120
beneficiaryRequired: true,
135121
},
136122
KES_ACCOUNT: {
@@ -139,7 +125,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
139125
{ name: 'phoneNumber', example: '+254712345678' },
140126
{ name: 'provider', example: 'M-PESA', description: 'Mobile money provider' },
141127
],
142-
paymentRails: ['MOBILE_MONEY'],
143128
beneficiaryRequired: true,
144129
},
145130
MYR_ACCOUNT: {
@@ -149,7 +134,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
149134
{ name: 'accountNumber', example: '1234567890' },
150135
{ name: 'swiftCode', example: 'MABORUMMYYY' },
151136
],
152-
paymentRails: ['BANK_TRANSFER'],
153137
beneficiaryRequired: true,
154138
},
155139
RWF_ACCOUNT: {
@@ -158,7 +142,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
158142
{ name: 'phoneNumber', example: '+250781234567' },
159143
{ name: 'provider', example: 'MTN', description: 'MTN or AIRTEL' },
160144
],
161-
paymentRails: ['MOBILE_MONEY'],
162145
beneficiaryRequired: true,
163146
},
164147
THB_ACCOUNT: {
@@ -168,7 +151,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
168151
{ name: 'accountNumber', example: '1234567890' },
169152
{ name: 'swiftCode', example: 'BKKBTHBK' },
170153
],
171-
paymentRails: ['BANK_TRANSFER'],
172154
beneficiaryRequired: true,
173155
},
174156
TZS_ACCOUNT: {
@@ -177,7 +159,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
177159
{ name: 'phoneNumber', example: '+255712345678' },
178160
{ name: 'provider', example: 'VODACOM', description: 'AIRTEL or VODACOM' },
179161
],
180-
paymentRails: ['MOBILE_MONEY'],
181162
beneficiaryRequired: true,
182163
},
183164
VND_ACCOUNT: {
@@ -187,7 +168,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
187168
{ name: 'accountNumber', example: '1234567890' },
188169
{ name: 'swiftCode', example: 'BFTVVNVX' },
189170
],
190-
paymentRails: ['BANK_TRANSFER'],
191171
beneficiaryRequired: true,
192172
},
193173
ZAR_ACCOUNT: {
@@ -196,7 +176,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
196176
{ name: 'accountNumber', example: '1234567890' },
197177
{ name: 'bankName', example: 'Standard Bank' },
198178
],
199-
paymentRails: ['BANK_TRANSFER'],
200179
beneficiaryRequired: true,
201180
},
202181
ZMW_ACCOUNT: {
@@ -205,7 +184,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
205184
{ name: 'phoneNumber', example: '+260971234567' },
206185
{ name: 'provider', example: 'MTN', description: 'TNM, AIRTEL, ZAMTEL, or MTN' },
207186
],
208-
paymentRails: ['MOBILE_MONEY'],
209187
beneficiaryRequired: true,
210188
},
211189
MWK_ACCOUNT: {
@@ -214,7 +192,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
214192
{ name: 'phoneNumber', example: '+265991234567' },
215193
{ name: 'provider', example: 'AIRTEL', description: 'Mobile money provider' },
216194
],
217-
paymentRails: ['MOBILE_MONEY'],
218195
beneficiaryRequired: true,
219196
},
220197
UGX_ACCOUNT: {
@@ -223,7 +200,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
223200
{ name: 'phoneNumber', example: '+256771234567' },
224201
{ name: 'provider', example: 'MTN', description: 'Mobile money provider' },
225202
],
226-
paymentRails: ['MOBILE_MONEY'],
227203
beneficiaryRequired: true,
228204
},
229205
XOF_ACCOUNT: {
@@ -232,7 +208,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
232208
{ name: 'phoneNumber', example: '+221771234567' },
233209
{ name: 'provider', example: 'ORANGE', description: 'Mobile money provider' },
234210
],
235-
paymentRails: ['MOBILE_MONEY'],
236211
beneficiaryRequired: true,
237212
},
238213
SPARK_WALLET: {
@@ -290,7 +265,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
290265
{ name: 'iban', example: 'AE070331234567890123456', description: 'UAE IBAN (23 characters)' },
291266
{ name: 'swiftCode', example: 'EBILAEAD', description: 'Optional' },
292267
],
293-
paymentRails: ['BANK_TRANSFER'],
294268
beneficiaryRequired: true,
295269
},
296270
BWP_ACCOUNT: {
@@ -299,7 +273,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
299273
{ name: 'phoneNumber', example: '+26771234567' },
300274
{ name: 'provider', example: 'Orange', description: 'Mobile money provider' },
301275
],
302-
paymentRails: ['MOBILE_MONEY'],
303276
beneficiaryRequired: true,
304277
},
305278
XAF_ACCOUNT: {
@@ -309,7 +282,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
309282
{ name: 'provider', example: 'MTN', description: 'Mobile money provider' },
310283
{ name: 'region', example: 'CM', description: 'Country code (CM or CG)' },
311284
],
312-
paymentRails: ['MOBILE_MONEY'],
313285
beneficiaryRequired: true,
314286
},
315287
BDT_ACCOUNT: {
@@ -320,7 +292,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
320292
{ name: 'phoneNumber', example: '+8801712345678' },
321293
{ name: 'swiftCode', example: 'BABORUMMYYY', description: 'Optional' },
322294
],
323-
paymentRails: ['BANK_TRANSFER', 'MOBILE_MONEY'],
324295
beneficiaryRequired: true,
325296
},
326297
COP_ACCOUNT: {
@@ -330,7 +301,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
330301
{ name: 'bankAccountType', example: 'SAVINGS', description: 'CHECKING or SAVINGS' },
331302
{ name: 'phoneNumber', example: '+573001234567' },
332303
],
333-
paymentRails: ['BANK_TRANSFER', 'MOBILE_MONEY'],
334304
beneficiaryRequired: true,
335305
},
336306
EGP_ACCOUNT: {
@@ -340,7 +310,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
340310
{ name: 'iban', example: 'EG380019000500000000263180002', description: 'Optional' },
341311
{ name: 'swiftCode', example: 'NBEGEGCX', description: 'Optional' },
342312
],
343-
paymentRails: ['BANK_TRANSFER'],
344313
beneficiaryRequired: true,
345314
},
346315
GHS_ACCOUNT: {
@@ -349,7 +318,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
349318
{ name: 'accountNumber', example: '1234567890' },
350319
{ name: 'phoneNumber', example: '+233241234567' },
351320
],
352-
paymentRails: ['BANK_TRANSFER', 'MOBILE_MONEY'],
353321
beneficiaryRequired: true,
354322
},
355323
GTQ_ACCOUNT: {
@@ -358,15 +326,13 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
358326
{ name: 'accountNumber', example: '1234567890' },
359327
{ name: 'phoneNumber', example: '+50212345678' },
360328
],
361-
paymentRails: ['BANK_TRANSFER', 'MOBILE_MONEY'],
362329
beneficiaryRequired: true,
363330
},
364331
HTG_ACCOUNT: {
365332
accountType: 'HTG_ACCOUNT',
366333
fields: [
367334
{ name: 'phoneNumber', example: '+50934567890' },
368335
],
369-
paymentRails: ['MOBILE_MONEY'],
370336
beneficiaryRequired: true,
371337
},
372338
JMD_ACCOUNT: {
@@ -376,7 +342,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
376342
{ name: 'branchCode', example: '12345', description: '5-digit branch code' },
377343
{ name: 'bankAccountType', example: 'CHECKING', description: 'CHECKING or SAVINGS' },
378344
],
379-
paymentRails: ['BANK_TRANSFER'],
380345
beneficiaryRequired: true,
381346
},
382347
PKR_ACCOUNT: {
@@ -386,7 +351,6 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
386351
{ name: 'phoneNumber', example: '+923001234567' },
387352
{ name: 'iban', example: 'PK36SCBL0000001123456702', description: 'Optional' },
388353
],
389-
paymentRails: ['BANK_TRANSFER', 'MOBILE_MONEY'],
390354
beneficiaryRequired: true,
391355
},
392356
};

components/grid-visualizer/src/lib/code-generator.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ function buildAccountInfoBody(sel: CurrencySelection): Record<string, unknown> {
4444
accountType: sel.accountType,
4545
};
4646

47-
if (spec.paymentRails) {
48-
info.paymentRails = spec.paymentRails;
49-
}
50-
5147
for (const field of spec.fields) {
5248
info[field.name] = field.example;
5349
}

mintlify/snippets/external-accounts.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco
197197
"accountType": "PHP_ACCOUNT",
198198
"bankName": "BDO Unibank",
199199
"accountNumber": "001234567890",
200-
"paymentRails": ["BANK_TRANSFER"],
201200
"beneficiary": {
202201
"beneficiaryType": "INDIVIDUAL",
203202
"fullName": "Maria Santos",
@@ -234,7 +233,6 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco
234233
"accountType": "GBP_ACCOUNT",
235234
"sortCode": "123456",
236235
"accountNumber": "12345678",
237-
"paymentRails": ["FASTER_PAYMENTS"],
238236
"beneficiary": {
239237
"beneficiaryType": "INDIVIDUAL",
240238
"fullName": "James Smith",

samples/kotlin/src/main/kotlin/com/grid/sample/routes/ExternalAccounts.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
106106
.accountNumber(accountInfo.requireText("accountNumber"))
107107
.routingNumber(accountInfo.requireText("routingNumber"))
108108
.beneficiary(beneficiary)
109-
.paymentRails(buildPaymentRails(accountInfo) { UsdAccountInfo.PaymentRail.of(it) })
110109
.build()
111110
ExternalAccountInfoOneOf.ofUsdAccount(info)
112111
}
@@ -116,7 +115,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
116115
.accountType(InrAccountInfo.AccountType.INR_ACCOUNT)
117116
.vpa(accountInfo.requireText("vpa"))
118117
.beneficiary(beneficiary)
119-
.paymentRails(buildPaymentRails(accountInfo) { InrAccountInfo.PaymentRail.of(it) })
120118
.build()
121119
ExternalAccountInfoOneOf.ofInrAccount(info)
122120
}
@@ -128,7 +126,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
128126
.pixKeyType(accountInfo.requireText("pixKeyType"))
129127
.taxId(accountInfo.requireText("taxId"))
130128
.beneficiary(beneficiary)
131-
.paymentRails(buildPaymentRails(accountInfo) { BrlAccountInfo.PaymentRail.of(it) })
132129
.build()
133130
ExternalAccountInfoOneOf.ofBrlAccount(info)
134131
}
@@ -138,7 +135,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
138135
.accountType(MxnAccountInfo.AccountType.MXN_ACCOUNT)
139136
.clabeNumber(accountInfo.requireText("clabeNumber"))
140137
.beneficiary(beneficiary)
141-
.paymentRails(buildPaymentRails(accountInfo) { MxnAccountInfo.PaymentRail.of(it) })
142138
.build()
143139
ExternalAccountInfoOneOf.ofMxnAccount(info)
144140
}
@@ -149,7 +145,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
149145
.sortCode(accountInfo.requireText("sortCode"))
150146
.accountNumber(accountInfo.requireText("accountNumber"))
151147
.beneficiary(beneficiary)
152-
.paymentRails(buildPaymentRails(accountInfo) { GbpAccountInfo.PaymentRail.of(it) })
153148
.build()
154149
ExternalAccountInfoOneOf.ofGbpAccount(info)
155150
}
@@ -160,7 +155,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
160155
.bankName(accountInfo.optText("bankCode") ?: accountInfo.requireText("bankName"))
161156
.accountNumber(accountInfo.requireText("accountNumber"))
162157
.beneficiary(beneficiary)
163-
.paymentRails(buildPaymentRails(accountInfo) { PhpAccountInfo.PaymentRail.of(it) })
164158
.build()
165159
ExternalAccountInfoOneOf.ofPhpAccount(info)
166160
}
@@ -170,7 +164,6 @@ private fun buildAccountInfo(accountType: String, accountInfo: JsonNode): Extern
170164
.accountType(EurAccountInfo.AccountType.EUR_ACCOUNT)
171165
.iban(accountInfo.requireText("iban"))
172166
.beneficiary(beneficiary)
173-
.paymentRails(buildPaymentRails(accountInfo) { EurAccountInfo.PaymentRail.of(it) })
174167
.apply {
175168
val swiftCode = accountInfo.optText("swiftCode")
176169
if (swiftCode != null) {
@@ -320,9 +313,4 @@ private fun buildEurBeneficiary(node: JsonNode?): ExternalAccountInfoOneOf.EurAc
320313
)
321314
}
322315

323-
private fun <T> buildPaymentRails(accountInfo: JsonNode, parse: (String) -> T): List<T> {
324-
val railsNode = accountInfo.get("paymentRails")
325-
if (railsNode == null || !railsNode.isArray || railsNode.isEmpty) return emptyList()
326-
return railsNode.map { parse(it.asText()) }
327-
}
328316

0 commit comments

Comments
 (0)