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
});
// Automatically fetches more pages as needed.
for await (const transaction of client.transactions.list()) {
console.log(transaction.id);
}{
"data": [
{
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"id": "Transaction:019542f5-b3e7-1d02-0000-000000000004",
"status": "CREATED",
"type": "INCOMING",
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"currency": "EUR"
},
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"platformCustomerId": "18d3e5f7b4a9c2",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"currency": "USD"
},
"reconciliationInstructions": {
"reference": "UMA-Q12345-REF"
},
"rateDetails": {
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"failureReason": "LNURLP_FAILED",
"settledAt": "2025-08-15T14:30:00Z",
"createdAt": "2025-08-15T14:25:18Z",
"updatedAt": "2025-08-15T14:30:00Z",
"description": "Payment for invoice #1234",
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
}
}
],
"hasMore": true,
"nextCursor": "<string>",
"totalCount": 123
}Retrieve a paginated list of transactions with optional filtering. The transactions can be filtered by customer ID, platform customer ID, UMA address, date range, status, and transaction type.
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
});
// Automatically fetches more pages as needed.
for await (const transaction of client.transactions.list()) {
console.log(transaction.id);
}{
"data": [
{
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"id": "Transaction:019542f5-b3e7-1d02-0000-000000000004",
"status": "CREATED",
"type": "INCOMING",
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"currency": "EUR"
},
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"platformCustomerId": "18d3e5f7b4a9c2",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"currency": "USD"
},
"reconciliationInstructions": {
"reference": "UMA-Q12345-REF"
},
"rateDetails": {
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"failureReason": "LNURLP_FAILED",
"settledAt": "2025-08-15T14:30:00Z",
"createdAt": "2025-08-15T14:25:18Z",
"updatedAt": "2025-08-15T14:30:00Z",
"description": "Payment for invoice #1234",
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
}
}
],
"hasMore": true,
"nextCursor": "<string>",
"totalCount": 123
}API token authentication using format <api token id>:<api client secret>
Filter by system customer ID
Filter by platform-specific customer ID
Filter by sender account identifier
Filter by receiver account identifier
Filter by transaction status Status of a payment transaction
CREATED, PENDING, PROCESSING, COMPLETED, REJECTED, FAILED, REFUNDED, EXPIRED Filter by transaction type Type of transaction (incoming payment or outgoing payment)
INCOMING, OUTGOING Filter by reference
Filter by start date (inclusive) in ISO 8601 format
Filter by end date (inclusive) in ISO 8601 format
Maximum number of results to return (default 20, max 100)
1 <= x <= 100Cursor for pagination (returned from previous request)
Order to sort results in
asc, desc Successful operation
List of transactions matching the criteria
Show child attributes
Indicates if more results are available beyond this page
Cursor to retrieve the next page of results (only present if hasMore is true)
Total number of transactions matching the criteria (excluding pagination)
Was this page helpful?