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
31 changes: 31 additions & 0 deletions mintlify/platform-overview/core-concepts/account-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,37 @@ Grid uses two types of accounts: **internal accounts** (Grid-managed balances) a
```
</Tab>

<Tab title="NGN (Nigeria)">
```json
{
"accountType": "NGN_ACCOUNT",
"currency": "NGN",
"accountNumber": "0123456789",
"bankName": "First Bank of Nigeria",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Chukwuemeka Okonkwo"
}
}
```
</Tab>

<Tab title="CAD (Canada)">
```json
{
"accountType": "CAD_ACCOUNT",
"currency": "CAD",
"bankCode": "001",
"branchCode": "00012",
"accountNumber": "1234567",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Emily Thompson"
}
}
```
</Tab>

<Tab title="Spark Wallet (Crypto)">
```json
{
Expand Down
89 changes: 89 additions & 0 deletions mintlify/snippets/external-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,79 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco

</Tab>

<Tab title="Nigeria">
**NGN 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": "NGN",
"platformAccountId": "ng_bank_001",
"accountInfo": {
"accountType": "NGN_ACCOUNT",
"accountNumber": "0123456789",
"bankName": "First Bank of Nigeria",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Chukwuemeka Okonkwo",
"birthDate": "1990-06-20",
"nationality": "NG",
"address": {
"line1": "15 Marina Street",
"city": "Lagos",
"state": "Lagos",
"postalCode": "100001",
"country": "NG"
}
}
}
}'
```

<Note>
Account number must be exactly 10 digits.
</Note>
</Tab>

<Tab title="Canada">
**CAD 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": "CAD",
"platformAccountId": "ca_bank_001",
"accountInfo": {
"accountType": "CAD_ACCOUNT",
"bankCode": "001",
"branchCode": "00012",
"accountNumber": "1234567",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Emily Thompson",
"birthDate": "1988-09-12",
"nationality": "CA",
"address": {
"line1": "456 Queen Street West",
"city": "Toronto",
"state": "ON",
"postalCode": "M5V 2B3",
"country": "CA"
}
}
}
}'
```

<Note>
Bank code is 3 digits, branch code is 5 digits, account number is 7-12 digits.
</Note>
</Tab>

<Tab title="Cryptocurrency">
**Bitcoin Lightning (Spark Wallet)**

Expand Down Expand Up @@ -321,6 +394,22 @@ if (!/^\d{9}$/.test(routingNumber)) {
if (!/^\d{18}$/.test(clabeNumber)) {
throw new Error("Invalid CLABE number");
}

// NGN: exactly 10-digit account number
if (!/^\d{10}$/.test(ngnAccountNumber)) {
throw new Error("Invalid Nigerian account number");
}

// CAD: 3-digit bank code, 5-digit branch code, 7-12 digit account number
if (!/^\d{3}$/.test(bankCode)) {
throw new Error("Invalid bank code");
}
if (!/^\d{5}$/.test(branchCode)) {
throw new Error("Invalid branch code");
}
if (!/^\d{7,12}$/.test(cadAccountNumber)) {
throw new Error("Invalid Canadian account number");
}
```

</Accordion>
Expand Down