Skip to content
Merged
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
10 changes: 10 additions & 0 deletions components/grid-visualizer/src/data/account-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,14 @@ export const accountTypeSpecs: Record<string, AccountTypeSpec> = {
],
beneficiaryRequired: true,
},
SLV_ACCOUNT: {
accountType: 'SLV_ACCOUNT',
fields: [
{ name: 'bankName', example: 'Banco Cuscatlan', description: 'BANK_TRANSFER only' },
{ name: 'accountNumber', example: '0123456789', description: 'BANK_TRANSFER only' },
{ name: 'bankAccountType', example: 'CHECKING', description: 'CHECKING or SAVINGS (BANK_TRANSFER only)' },
{ name: 'phoneNumber', example: '+50312345678', description: 'MOBILE_MONEY only (Tigo Money)' },
],
beneficiaryRequired: true,
},
};
10 changes: 10 additions & 0 deletions components/grid-visualizer/src/data/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,14 @@ export const currencies: FiatCurrency[] = [
allRails: ['Mobile Money'],
examplePerson: { fullName: 'Amadou Diallo', nationality: 'SN' },
},
{
code: 'USD',
name: 'US Dollar (El Salvador)',
countryCode: 'sv',
accountType: 'SLV_ACCOUNT',
accountLabel: 'El Salvador Bank/Mobile',
instantRails: [],
allRails: ['Bank Transfer', 'Mobile Money'],
examplePerson: { fullName: 'Carlos Morales', nationality: 'SV' },
},
];
69 changes: 69 additions & 0 deletions mintlify/snippets/external-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,75 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco
<Tip>Key types: `CPF`, `CNPJ`, `EMAIL`, `PHONE`, or `RANDOM`</Tip>
</Tab>

<Tab title="El Salvador">
**Bank Transfer or Mobile Money (Tigo Money)**

El Salvador supports two payment rails: bank transfer and mobile money.

**Bank Transfer:**

```bash cURL
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USD",
"platformAccountId": "sv_bank_001",
"accountInfo": {
"accountType": "SLV_ACCOUNT",
"bankName": "Banco Cuscatlan",
"accountNumber": "0123456789",
"bankAccountType": "CHECKING",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Carlos Morales",
"birthDate": "1990-05-20",
"nationality": "SV",
"address": {
"line1": "Colonia Escalon 123",
"city": "San Salvador",
"postalCode": "01101",
"country": "SV"
}
}
}
}'
```

**Mobile Money (Tigo Money):**

```bash cURL
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USD",
"platformAccountId": "sv_mobile_001",
"accountInfo": {
"accountType": "SLV_ACCOUNT",
"phoneNumber": "+50312345678",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Ana Martinez",
"birthDate": "1985-08-15",
"nationality": "SV",
"address": {
"line1": "Avenida Roosevelt 456",
"city": "San Salvador",
"postalCode": "01101",
"country": "SV"
}
}
}
}'
```

<Note>
Bank transfer requires `bankName`, `accountNumber`, and `bankAccountType` (CHECKING or SAVINGS).
Mobile money requires `phoneNumber` in international format (e.g., +50312345678).
</Note>
Comment on lines +215 to +218
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 bankName listed as required, but OpenAPI schema marks it as optional

The <Note> states "Bank transfer requires bankName, accountNumber, and bankAccountType", but SlvAccountInfoBase.yaml only lists bankAccountType and accountNumber as conditionally required for the BANK_TRANSFER rail — bankName has no required annotation in the schema. Documenting an optional field as mandatory could confuse developers who omit it (expecting it to be optional per the spec) or who encounter a mismatch between the docs and any client-side validation they derive from the OpenAPI spec.

Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/snippets/external-accounts.mdx
Line: 215-218

Comment:
**`bankName` listed as required, but OpenAPI schema marks it as optional**

The `<Note>` states "Bank transfer requires `bankName`, `accountNumber`, and `bankAccountType`", but `SlvAccountInfoBase.yaml` only lists `bankAccountType` and `accountNumber` as conditionally required for the `BANK_TRANSFER` rail — `bankName` has no `required` annotation in the schema. Documenting an optional field as mandatory could confuse developers who omit it (expecting it to be optional per the spec) or who encounter a mismatch between the docs and any client-side validation they derive from the OpenAPI spec.

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

Fix in Claude Code

</Tab>

<Tab title="Europe">
**IBAN/SEPA**

Expand Down
Loading