From 66ae793b7deee209c3e5c2bb30b24a7eba8b071d Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 08:19:09 +0000 Subject: [PATCH] docs: Sync documentation with new account types Add support for BWP, XAF, and AED account types and update XOF to include required region field, matching OpenAPI schema changes. Co-Authored-By: Claude Opus 4.5 --- .../grid-visualizer/src/data/account-types.ts | 29 ++++ .../grid-visualizer/src/data/currencies.ts | 30 ++++ mintlify/snippets/external-accounts.mdx | 158 ++++++++++++++++++ 3 files changed, 217 insertions(+) diff --git a/components/grid-visualizer/src/data/account-types.ts b/components/grid-visualizer/src/data/account-types.ts index 82983eea..8eb1e8ef 100644 --- a/components/grid-visualizer/src/data/account-types.ts +++ b/components/grid-visualizer/src/data/account-types.ts @@ -231,10 +231,39 @@ export const accountTypeSpecs: Record = { fields: [ { name: 'phoneNumber', example: '+221771234567' }, { name: 'provider', example: 'ORANGE', description: 'Mobile money provider' }, + { name: 'region', example: 'SN', description: 'Country code: BJ, CI, SN, or TG' }, ], paymentRails: ['MOBILE_MONEY'], beneficiaryRequired: true, }, + BWP_ACCOUNT: { + accountType: 'BWP_ACCOUNT', + fields: [ + { name: 'phoneNumber', example: '+26771234567' }, + { name: 'provider', example: 'ORANGE', description: 'Mobile money provider' }, + ], + paymentRails: ['MOBILE_MONEY'], + beneficiaryRequired: true, + }, + XAF_ACCOUNT: { + accountType: 'XAF_ACCOUNT', + fields: [ + { name: 'phoneNumber', example: '+237671234567' }, + { name: 'provider', example: 'MTN', description: 'Mobile money provider' }, + { name: 'region', example: 'CM', description: 'Country code: CM or CG' }, + ], + paymentRails: ['MOBILE_MONEY'], + beneficiaryRequired: true, + }, + AED_ACCOUNT: { + accountType: 'AED_ACCOUNT', + fields: [ + { name: 'iban', example: 'AE070331234567890123456' }, + { name: 'swiftCode', example: 'EBILAEAD', description: 'Optional' }, + ], + paymentRails: ['BANK_TRANSFER'], + beneficiaryRequired: true, + }, SPARK_WALLET: { accountType: 'SPARK_WALLET', fields: [ diff --git a/components/grid-visualizer/src/data/currencies.ts b/components/grid-visualizer/src/data/currencies.ts index fc14d4a4..a00d45c5 100644 --- a/components/grid-visualizer/src/data/currencies.ts +++ b/components/grid-visualizer/src/data/currencies.ts @@ -255,4 +255,34 @@ export const currencies: FiatCurrency[] = [ allRails: ['Mobile Money'], examplePerson: { fullName: 'Amadou Diallo', nationality: 'SN' }, }, + { + code: 'BWP', + name: 'Botswana Pula', + countryCode: 'bw', + accountType: 'BWP_ACCOUNT', + accountLabel: 'Mobile Money', + instantRails: [], + allRails: ['Mobile Money'], + examplePerson: { fullName: 'Kelebogile Mosweu', nationality: 'BW' }, + }, + { + code: 'XAF', + name: 'Central African CFA Franc', + countryCode: 'cm', + accountType: 'XAF_ACCOUNT', + accountLabel: 'Mobile Money', + instantRails: [], + allRails: ['Mobile Money'], + examplePerson: { fullName: 'Jean-Pierre Mballa', nationality: 'CM' }, + }, + { + code: 'AED', + name: 'UAE Dirham', + countryCode: 'ae', + accountType: 'AED_ACCOUNT', + accountLabel: 'UAE Bank Account', + instantRails: [], + allRails: ['Bank Transfer'], + examplePerson: { fullName: 'Ahmed Al-Maktoum', nationality: 'AE' }, + }, ]; diff --git a/mintlify/snippets/external-accounts.mdx b/mintlify/snippets/external-accounts.mdx index 8f860553..3a5d96cf 100644 --- a/mintlify/snippets/external-accounts.mdx +++ b/mintlify/snippets/external-accounts.mdx @@ -432,6 +432,148 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco + +**XOF Mobile 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": "XOF", + "platformAccountId": "xof_mobile_001", + "accountInfo": { + "accountType": "XOF_ACCOUNT", + "phoneNumber": "+221771234567", + "provider": "ORANGE", + "region": "SN", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Amadou Diallo", + "birthDate": "1990-03-15", + "nationality": "SN", + "address": { + "line1": "Avenue Cheikh Anta Diop", + "city": "Dakar", + "postalCode": "10000", + "country": "SN" + } + } + } + }' +``` + + + Region is required: `BJ` (Benin), `CI` (Ivory Coast), `SN` (Senegal), or `TG` (Togo). + + + + +**XAF Mobile 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": "XAF", + "platformAccountId": "xaf_mobile_001", + "accountInfo": { + "accountType": "XAF_ACCOUNT", + "phoneNumber": "+237671234567", + "provider": "MTN", + "region": "CM", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Jean-Pierre Mballa", + "birthDate": "1988-07-22", + "nationality": "CM", + "address": { + "line1": "Boulevard du 20 Mai", + "city": "Yaoundé", + "postalCode": "00237", + "country": "CM" + } + } + } + }' +``` + + + Region is required: `CM` (Cameroon) or `CG` (Congo). + + + + +**BWP Mobile 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": "BWP", + "platformAccountId": "bwp_mobile_001", + "accountInfo": { + "accountType": "BWP_ACCOUNT", + "phoneNumber": "+26771234567", + "provider": "ORANGE", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Kelebogile Mosweu", + "birthDate": "1992-05-10", + "nationality": "BW", + "address": { + "line1": "Plot 123 Main Mall", + "city": "Gaborone", + "postalCode": "00000", + "country": "BW" + } + } + } + }' +``` + + + Phone number must be in format `+267XXXXXXXX`. + + + + +**AED 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": "AED", + "platformAccountId": "aed_bank_001", + "accountInfo": { + "accountType": "AED_ACCOUNT", + "iban": "AE070331234567890123456", + "swiftCode": "EBILAEAD", + "beneficiary": { + "beneficiaryType": "INDIVIDUAL", + "fullName": "Ahmed Al-Maktoum", + "birthDate": "1985-11-30", + "nationality": "AE", + "address": { + "line1": "Sheikh Zayed Road", + "city": "Dubai", + "postalCode": "00000", + "country": "AE" + } + } + } + }' +``` + + + UAE IBAN must be 23 characters starting with `AE`. SWIFT/BIC code is optional. + + + **Bitcoin Lightning (Spark Wallet)** @@ -605,6 +747,22 @@ if (!/^\+260\d{9}$/.test(zmwPhoneNumber)) { if (!/^\+250\d{9}$/.test(rwfPhoneNumber)) { throw new Error("Invalid Rwandan phone number"); } +if (!/^\+267\d{7,8}$/.test(bwpPhoneNumber)) { + throw new Error("Invalid Botswana phone number"); +} + +// XOF/XAF region codes +if (!['BJ', 'CI', 'SN', 'TG'].includes(xofRegion)) { + throw new Error("Invalid XOF region code"); +} +if (!['CM', 'CG'].includes(xafRegion)) { + throw new Error("Invalid XAF region code"); +} + +// UAE IBAN: 23 characters starting with AE +if (!/^AE\d{21}$/.test(aedIban)) { + throw new Error("Invalid UAE IBAN"); +} ```