From b5df8d5969e1eb5447c08c493f565955c0fdc68e Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 08:22:04 +0000 Subject: [PATCH] docs: add NGN and CAD external account examples Add documentation for newly supported Nigerian (NGN) and Canadian (CAD) external account types introduced in c172a95. Updates include: - Add Nigeria and Canada tabs to external-accounts.mdx snippet - Add NGN_ACCOUNT and CAD_ACCOUNT tabs to account-model.mdx - Add validation examples for NGN and CAD account formats Co-Authored-By: Claude Opus 4.5 --- .../core-concepts/account-model.mdx | 31 +++++++ mintlify/snippets/external-accounts.mdx | 89 +++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/mintlify/platform-overview/core-concepts/account-model.mdx b/mintlify/platform-overview/core-concepts/account-model.mdx index d9375d5b..03399b03 100644 --- a/mintlify/platform-overview/core-concepts/account-model.mdx +++ b/mintlify/platform-overview/core-concepts/account-model.mdx @@ -112,6 +112,37 @@ Grid uses two types of accounts: **internal accounts** (Grid-managed balances) a ``` + + ```json + { + "accountType": "NGN_ACCOUNT", + "currency": "NGN", + "accountNumber": "0123456789", + "bankName": "First Bank of Nigeria", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Chukwuemeka Okonkwo" + } + } + ``` + + + + ```json + { + "accountType": "CAD_ACCOUNT", + "currency": "CAD", + "bankCode": "001", + "branchCode": "00012", + "accountNumber": "1234567", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Emily Thompson" + } + } + ``` + + ```json { diff --git a/mintlify/snippets/external-accounts.mdx b/mintlify/snippets/external-accounts.mdx index 810b8d36..ffd775d7 100644 --- a/mintlify/snippets/external-accounts.mdx +++ b/mintlify/snippets/external-accounts.mdx @@ -183,6 +183,79 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco + +**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" + } + } + } + }' +``` + + + Account number must be exactly 10 digits. + + + + +**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" + } + } + } + }' +``` + + + Bank code is 3 digits, branch code is 5 digits, account number is 7-12 digits. + + + **Bitcoin Lightning (Spark Wallet)** @@ -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"); +} ```