import LightsparkGrid from '@lightsparkdev/grid';
const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});
const response = await client.platform.listInternalAccounts();
console.log(response.data);{
"data": [
{
"id": "InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"balance": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"fundingPaymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "US_ACCOUNT",
"clabeNumber": "123456789012345678",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Please ensure the reference code is included in the payment memo/description field",
"isPlatformAccount": true
}
],
"createdAt": "2025-10-03T12:30:00Z",
"updatedAt": "2025-10-03T12:30:00Z",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
}
]
}Retrieve a list of all internal accounts that belong to the platform, as opposed to an individual customer.
These accounts are created automatically when the platform is configured for each supported currency. They can be used for things like distributing bitcoin rewards to customers, or for other platform-wide purposes.
import LightsparkGrid from '@lightsparkdev/grid';
const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});
const response = await client.platform.listInternalAccounts();
console.log(response.data);{
"data": [
{
"id": "InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"balance": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"fundingPaymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "US_ACCOUNT",
"clabeNumber": "123456789012345678",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Please ensure the reference code is included in the payment memo/description field",
"isPlatformAccount": true
}
],
"createdAt": "2025-10-03T12:30:00Z",
"updatedAt": "2025-10-03T12:30:00Z",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
}
]
}Was this page helpful?