API / Reference / Card Transactions
List card transactions
GET
https://api.light.inc/v1/card-transactions
Returns a paginated list of card transactions
The filter and sort field lists below are incomplete. The server also accepts ownerId, amount, originalAmount, originalCurrency, receiptDocumentKey, taxId and accountId as filters and originalAmount as a sort; an unknown field fails with INVALID_QUERY_FIELD listing the real set. The two undocumented flags: onlyPostable=true returns transactions a post would currently succeed for (a flag recomputed in the background after each edit, so it can lag a moment behind a PATCH); missingData=true returns transactions with no receipt, or not yet posted and not postable. Sending both fails with CARD_TRANSACTION_INVALID_FILTER_COMBINATION.
This list (and the single GET) returns the enriched shape with labels and exportedAt, but without editStatus — that field only appears on the PATCH, post and reset responses. amount is an unsigned magnitude; direction (DEBIT for spend, CREDIT for a refund or incoming credit) carries the sign. A refund is a separate transaction with status: REFUNDED, not a change to the original capture, and nothing on the model links the two. If the company's card setup has auto-posting on, a transaction can already be POSTED the first time you see it. A cardholder-only credential must filter on its own ownerId or cardId or it receives 403.
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Query parameters
-
sortstringSort string in the format
field:direction. To provide multiple sort fields, separate them with commas.Available directions:
asc,desc.Available fields:
companyEntityId,status,performedAt. -
filterstringFilter string in the format
field:operator:value. To provide multiple filters, separate them with commas.Available operators:
eq,ne,in,not_in,gt,gte,lt,lte.- For
inandnot_inoperators, provide multiple values separated by the pipe character (|).
Available fields:
transactionId,cardBalanceAccountId,companyEntityId,cardId,status,performedAt,updatedAt. - For
-
limitinteger · int32Maximum number of items to return. Default is 50, maximum is 200.
-
offsetinteger · int64deprecatedNumber of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.
-
cursorstringThe cursor position to start returning results from. To opt-in into cursor-based pagination, provide
0for the initial request. For subsequent requests, usenextCursorandprevCursorfrom the previous response to navigate. Cursor values are opaque and should not be constructed manually. -
onlyPostableboolean -
missingDataboolean -
includeParsedReceiptbooleanIf true, includes the AI-parsed receipt in the response. It is null when this parameter is not set, when no receipt scan is on file, and when the scan parsed something that is not a receipt
Response
-
recordsarray of objectList of records for the current page
-
idstring · uuidThe transaction id, also its accounting document id.
-
companyIdstring · uuidYour company id.
-
companyEntityIdstring · uuidThe entity the card belongs to.
-
companyEntityNamestringThat entity's name.
-
cardBalanceAccountIdstring · uuidThe balance account the card draws on.
-
cardBalanceAccountLabelstringIts name.
-
cardIdstring · uuidThe card that was charged.
-
providerIdstring -
cardVendorIdstring · uuidThe vendor Light matched to the merchant, if any.
-
cardVendorAvatarUrlstringThat vendor's logo URL.
-
cardVendorNamestringThat vendor's name.
-
cardOwnerNamestringThe cardholder's name.
-
cardOwnerIdstring · uuidThe cardholder's user id.
-
cardLastFourstringLast four digits of the card number.
-
originalAmountinteger · int64The amount charged by the merchant, in the merchant's currency, minor units.
-
originalCurrencystringThe merchant's currency.
-
amountinteger · int64Unsigned, in minor units. The sign is
direction:DEBITis money out,CREDITis a refund or incoming credit. -
currencystringThe balance account's currency, which
amountis in. -
directionstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DEBITCREDIT -
transactionReasonstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ACCOUNT_NOT_ACTIVEAMOUNT_LIMIT_EXCEEDEDAPPROVAL_EXPIREDAPPROVEDAUTHENTICATION_FAILEDAUTHENTICATION_REQUIREDBALANCE_ACCOUNT_BLOCKED_BY_RULECALL_REFERRALCANCELLEDCARD_BLOCKEDCARD_CAPTUREDCARD_EXPIREDCARD_LOST_OR_STOLENCARD_RESTRICTEDCARD_VERIFICATION_FAILEDCASHBACK_LIMIT_EXCEEDEDCONTACTLESS_FALLBACKCONTACTLESS_LIMIT_REACHEDCOUNTERPARTY_ACCOUNT_UNAVAILABLECOUNTERPARTY_ADDRESS_REQUIREDCOUNTERPARTY_BANK_UNAVAILABLECRYPTOGRAPHIC_FAILUREDECLINEDDECLINED_BY_BAP_VALIDATIONDECLINED_BY_TRANSACTION_RULEDECLINED_NON_GENERICDOMESTIC_DEBIT_NOT_ALLOWEDDO_NOT_HONORDUPLICATE_TRANSMISSIONFORMAT_ERRORFRAUDHONOR_WITH_IDINSUFFICIENT_FUNDSINTERNAL_TIMEOUTINVALID_ACCOUNTINVALID_AMOUNTINVALID_AUTHORIZATION_LIFECYCLEINVALID_CARDINVALID_ISSUERINVALID_MERCHANTINVALID_TRANSACTIONISSUER_SUSPECTED_FRAUDMOBILE_PIN_REQUIREDNOT_SUBMITTEDNO_ACCOUNT_OF_TYPEOTHERPARTIALLY_APPROVEDPENDINGPIN_INVALIDPIN_NOT_CHANGEDPIN_REQUIREDPIN_TRIES_EXCEEDEDPIN_VALIDATION_NOT_POSSIBLEPROVIDER_ERRORPURCHASE_AMOUNT_ONLY_NO_CASHBACKREFUSED_BY_COUNTERPARTY_BANKREFUSED_BY_CUSTOMERREVOCATION_OF_AUTHROUTE_NOT_FOUNDSCHEME_ADVICESECURITY_VIOLATIONTRANSACTION_NOT_PERMITTEDTRANSFER_INSTRUMENT_NOT_FOUNDTRANSFER_NOT_SUPPORTEDUNKNOWNWITHDRAWAL_AMOUNT_EXCEEDEDWITHDRAWAL_COUNT_EXCEEDED -
purchaseTypestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ATMBALANCE_INQUIRYECOMMERCEPOSRECURRINGUNKNOWNOTHER -
statusstring⚠️ This enum is not exhaustive; new values may be added in the future.
Set by the card issuer, never by this API, apart from
POSTED.AUTHORIZEDmoves toCAPTURED,DECLINEDorVOIDED;CAPTUREDandREFUNDEDcan be posted. AREFUNDEDtransaction is its own record withdirection: CREDIT— the original capture keeps its status and nothing on the model links the two.One of
AUTHORIZEDDECLINEDCAPTUREDREFUNDEDVOIDEDPOSTED -
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PAYMENTREFUNDOTHER -
merchantobjectThe merchant, as reported by the card network.
-
namestringMerchant name as reported by the card network.
-
cleanNamestringThe name cleaned up by Light, used for display and vendor matching.
-
countrystring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
UNDEFINEDACADAEAFAGAIALAMANAOAQARASATAUAWAXAZBABBBDBEBFBGBHBIBJBLBMBNBOBQBRBSBTBUBVBWBYBZCACCCDCFCGCHCICKCLCMCNCOCPCRCSCUCVCWCXCYCZDEDGDJDKDMDODZEAECEEEGEHERESETEUEZFIFJFKFMFOFRFXGAGBGDGEGFGGGHGIGLGMGNGPGQGRGSGTGUGWGYHKHMHNHRHTHUICIDIEILIMINIOIQIRISITJEJMJOJPKEKGKHKIKMKNKPKRKWKYKZLALBLCLILKLRLSLTLULVLYMAMCMDMEMFMGMHMKMLMMMNMOMPMQMRMSMTMUMVMWMXMYMZNANCNENFNGNINLNONPNRNTNUNZOMPAPEPFPGPHPKPLPMPNPRPSPTPWPYQARERORSRURWSASBSCSDSESFSGSHSISJSKSLSMSNSOSRSSSTSUSVSXSYSZTATCTDTFTGTHTJTKTLTMTNTOTPTRTTTVTWTZUAUGUKUMUSUYUZVAVCVEVGVIVNVUWFWSXIXUXKYEYTYUZAZMZRZW -
zipcodestringThe merchant's postal code.
-
idstringThe card network's merchant id.
-
mccstringMerchant category code.
-
acquirerIdstringId of the merchant's acquiring bank.
-
logoUrlstringLogo URL, when Light has one.
-
-
receiptDocumentKeystringFilled asynchronously after a receipt upload with the key of the converted PDF, which is not the
keythe upload endpoint returned. -
linesarray of objectThe accounting split of the transaction: account, tax code and cost center per line.
-
idstring · uuidThe line id.
-
transactionIdstring · uuidThe card transaction the line belongs to.
-
companyIdstring · uuidYour company id.
-
accountIdstring · uuidThe expense account for the line.
-
accountLabelstringIts name.
-
taxCodeIdstring · uuidThe tax code on the line.
-
taxCodeLabelstringIts name.
-
costCenterIdstring · uuidCost center on the line.
-
costCenterNamestringIts name.
-
amountinteger · int64Gross line amount in the balance account currency, minor units.
-
netAmountinteger · int64Line amount excluding tax, minor units.
-
descriptionstringThe line description.
-
createdAtstring · date-timeWhen the line was created.
-
updatedAtstring · date-timeWhen it was last changed.
-
customPropertiesarray of objectCustom property values on the line.
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
amortizationTemplateIdstring · uuidRelease template id when the line is spread over a schedule;
nullotherwise. -
amortizationStartDatestring · dateFirst date of that schedule.
-
amortizationEndDatestring · dateLast date of that schedule.
-
-
failureContextobjectFailure context when vendor onboarding fails.
Set when a batch update or a post fails validation, or when receipt conversion fails; cleared by the next successful post. The description about vendor onboarding is a copy-paste from another model.
-
namestringThe error name
-
typestringThe error type
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
BAD_REQUESTUNAUTHORIZEDFORBIDDENNOT_FOUNDCONFLICTUNPROCESSABLE_CONTENT -
errorsarray of objectList of errors providing details about what went wrong
-
typestringA string code identifying the error type
-
messagestringA human-readable message providing more details about the error
-
patharray of stringOptional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object
-
contextobjectOptional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error
-
-
-
descriptionstringThe transaction description.
-
performedAtstring · date-timeWhen the card was charged.
-
exportedAtstring · date-timeWhen the transaction's export to accounting completed;
nulluntil then. Legacy field from before card transactions posted to the ledger as documents. -
createdAtstring · date-timeWhen Light received the transaction.
-
updatedAtstring · date-timeWhen it was last changed.
-
customPropertiesarray of objectCustom property values on the transaction.
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
parsedReceiptobject-
currencystring -
linesarray of object-
descriptionstring -
quantitynumber -
pricenumber
-
-
-
-
hasMorebooleanBoolean flag indicating if there are more records available
-
totalinteger · int64deprecatedTotal number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.
-
nextCursorstringCursor for fetching the next page (only for cursor pagination)
-
prevCursorstringCursor for fetching the previous page (only for cursor pagination)