View a Transaction

Estimated time: ~1 minute

Our API makes it easy to query for transactions. Customers typically view transactions in order to:

  • Provide their users with a detailed list of their purchases
  • Audit their users' spending patterns
/*
const lithic = new Lithic({
  apiKey: "{Sandbox API key}", // or "Production API key"
  environment: "sandbox", // or "production". Defaults to "production"
});
*/

const transaction_params: TransactionListParams = {
	card_token: "{Card Token}" // only retrieve transactions for this card
};
const transactions = await lithic.transactions.list(transaction_params);
'''
lithic = Lithic(
  api_key="{Sandbox API key}",  # or "Production API key"
  environment="sandbox",  # or "production". Defaults to "production"
)
'''

transactions = lithic.transactions.list({
	"card_token": "{Card Token}" # only retrieve transactions for this card
})
curl --request GET \
     --url https://sandbox.lithic.com/v1/transactions?card_token={Card Token}\
     --header "Accept: application/json" \
     --header "Authorization: { Sandbox API key }"

For more information on transactions, check out our in-depth guide: Transactions